Alexander Jung [Tue, 11 Jul 2023 21:25:56 +0000 (21:25 +0000)]
Introduce `Library.uk`
This new file represents the first step towards proper versioning support of
external microlibrary in Unikraft. The file itself acts as mechanism for
holding metadata-only values about the microlibrary. This metadata is designed
to be compatible with GNU Make whilst simultaneously being human-readable and
readable by programs that are not GNU Make (e.g. tools such as KraftKit).
An important feature of this file is the inclusion of microlibrary versions.
In a later step, once relevant integrations have been made to Unikrat's core
build system and to relevant tools such as KraftKit, the user will be able to
see and select from different versions of the microlibrary.
In this initial commit, the relevant metadata is absorbed from both Makefile.uk,
Config.uk, but also includes new information such as SPDX License identifier.
Andrei Tatar [Tue, 5 Sep 2023 12:11:29 +0000 (15:11 +0300)]
Add cpuid.h header
This change adds the cpuid.h header file for both GCC and Clang.
The GCC version is taken verbatim from GCC 13.1.0.
The LLVM version is taken verbatim from LLVM 16.0.0.
Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Eduard Vintilă <eduard.vintila47@gmail.com>
GitHub-Closes: #5
Andrei Tatar [Mon, 14 Aug 2023 19:10:24 +0000 (21:10 +0200)]
Add compatibility with Clang <= 10
Clang versions below 11 do not support the AMX, serialize, and tsxldtrk
intrinsics. This change adds a version check when including the
offending headers.
Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #4
Andrei Tatar [Mon, 14 Aug 2023 18:19:45 +0000 (20:19 +0200)]
Add compatibility with GCC <= 11.2
GCC versions prior to 11.3 do not support the "mwait" target attribute.
This change adds compiler version checks to the pragmas using this
attribute, enabling builds with GCC 11.1 & 11.2.
Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #4
Andrei Tatar [Mon, 17 Jul 2023 17:07:59 +0000 (19:07 +0200)]
Implement support for GCC
This change adds on-par support for GCC by providing the native x86
intrinsics headers from gcc release 13.1.0.
The file `mm_malloc.h` is taken from upstream `pmm_malloc.h`.
Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #3
Andrei Tatar [Mon, 17 Jul 2023 16:25:57 +0000 (18:25 +0200)]
build: Make clang compatibility explicit
This change makes explicit that this library only supports clang by
renaming the include directory and only adding it to the include path if
compiling with clang.
A future change may thus explicitly add GCC-compatible headers.
Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #3
Andrei Tatar [Mon, 17 Jul 2023 13:39:32 +0000 (15:39 +0200)]
Remove GCC compatibility adaptations
This change removes code changes meant for compatibility with GCC,
reverting the headers to ones released with LLVM 7.0.1.
This is in anticipation of an update of upstream code, as well as a
rework of compiler compatibility.
Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #3
Andrei Tatar [Mon, 17 Jul 2023 11:55:23 +0000 (13:55 +0200)]
build: Remove CPU feature config options
This change removes the Kconfig options selecting CPU feature set (i.e.,
`-march=` compiler flag) from the configuration of this library.
CPU feature flags are set elsewhere in the build configuration and the
intrinsics library can already seamlessly pick up these features via
preprocessor defines.
Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #3
Simon Kuenzer [Tue, 13 Jul 2021 19:16:43 +0000 (21:16 +0200)]
Correct license headers introduced by University Politehnica of Bucharest
This commit removes the additional clause
"THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY"
from BSD license headers that got introduced by mistake
with the following commits: 4dcfbc1 - Initial port of Intel Intrinsics on Unikraft (Vlad-Andrei BĂDOIU (78692))
On the one hand, this additional clause is redundant because
the BSD license already states that it must remain and the
copyright notice must be kept.
On the other hand, the clause freezes the file header
and prohibits future contributors from extending the
copyright notice for their contributions. This additional
clause is not part of the official BSD 3-clause.
The original author(s) or an authorized representative from
the author's affiliation consents to the change with a
`Reviewed-by` tag to this commit.
Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu> Reviewed-by: Razvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Sharan Santhanam [Sat, 15 Jun 2019 21:29:14 +0000 (23:29 +0200)]
_mm_alignr_epi8 to use compiler builtin
_mm_alignr_epi8 uses the __builtin_ia32_palignr128 function for its
implementation. The builtin function has a different signature on
gcc vs llvm. We provide compiler guards to use the appropriate builtin
function.
This is our initial port of intel intrinsics to Unikraft as an external library.
This release is based on the LLVM headers which were adapted to work on Unikraft
with GCC.
The library now works with GCC 6+.
Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro> Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>