| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Provides an assembly implementation of muldi3 for RISC-V, to solve bug 43388.
Since the implementation is the same as for mulsi3, that code was moved to
`riscv/int_mul_impl.inc` and is now reused by both `mulsi3.S` and `muldi3.S`.
Differential Revision: https://reviews.llvm.org/D80465
(cherry picked from commit e31ccee1b01acf703889312ee86023ff87bd39fe)
|
|
|
|
|
|
|
|
|
| |
i386/x86_64""
Don't build specilised fp_mode.c on MSVC since it does not support
inline ASM on x86_64.
This reverts commit a19f0eec94e195cac676d0d473882b48f4fded90.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements __fixtfti builtin for PowerPC. This builtin converts a
long double (IBM double-double) to a signed int128. The conversion relies on
the unsigned conversion of the absolute value of the long double.
Tests included for both positive and negative long doubles.
Patch By: Baptiste Saleil
Differential Revision: https://reviews.llvm.org/D69730
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Darwin lazily saves the AVX512 context on first use [1]: instead of checking
that it already does to figure out if the OS supports AVX512, trust that
the kernel will do the right thing and always assume the context save
support is available.
[1] https://github.com/apple/darwin-xnu/blob/xnu-4903.221.2/osfmk/i386/fpu.c#L174
Reviewers: ab, RKSimon, craig.topper
Reviewed By: craig.topper
Subscribers: dberris, JDevlieghere, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D70454
|
|
|
|
|
|
|
|
| |
It broke the build with MSVC:
fp_mode.c(20): error C2065: '__asm__': undeclared identifier
> Differential Revision: https://reviews.llvm.org/D69870
|
|
|
|
|
|
|
|
|
|
| |
compiler-rt's getAMDProcessorTypeAndSubtype.
This is the CPUID model used on Ryzen 3000 series (Zen 2/Matisse) CPUs.
Patch by Alex James
Differential Revision: https://reviews.llvm.org/D70279
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D69870
|
|
|
|
|
|
|
|
|
|
|
| |
__fixunstfti converts a long double (IBM double-double) to an unsigned 128 bit
integer. This patch enables it to handle a previously unhandled case in which
a negative low double may impact the result of the conversion.
Collaborated with @masoud.ataei and @renenkel.
Patch By: Baptiste Saleil
Differential Revision: https://reviews.llvm.org/D69193
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generic implementations.
Summary:
Previously the CMake code looked for filepaths of the form
`<arch>/<filename>` as an indication that `<arch>/<filename>` provided a
specialization of a top-level file `<filename>`. For powerpc there was a
bug because the powerpc specialized implementations lived in `ppc/` but
the architectures were `powerpc64` and `powerpc64le` which meant that
CMake was looking for files at `powerpc64/<filename>` and
`powerpc64le/<filename>`.
The result of this is that for powerpc the builtins library contained a
duplicate symbol for `divtc3` because it had the generic implementation
and the specialized version in the built static library.
Although we could just add similar code to what there is for arm (i.e.
compute `${_arch}`) to fix this, this is extremely error prone (until
r375150 no error was raised). Instead this patch takes a different
approach that removes looking for the architecture name entirely.
Instead this patch uses the convention that a source file in a
sub-directory might be a specialization of a generic implementation and
if a source file of the same name (ignoring extension) exists at the
top-level then it is the corresponding generic implementation. This
approach is much simpler because it doesn't require keeping track of
different architecture names.
This convention already existed in repository but previously it was
implicit. This change makes it explicit.
This patch is motivated by wanting to revert r375162 which worked around
the powerpc bug found when r375150 landed.
Once it lands we should revert r375162.
Reviewers: phosek, beanz, compnerd, shiva0217, amyk, rupprecht, kongyi, mstorsjo, t.p.northover, weimingz, jroelofs, joerg, sidneym
Subscribers: nemanjai, mgorny, kristof.beyls, jsji, shchenz, steven.zhang, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D69189
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use new control bits CTR_EL0.DIC and CTR_EL0.IDC to discover the d-cache
cleaning and i-cache invalidation requirements for instruction-to-data
coherence. This matches the behavior in the latest libgcc.
Author: Shaokun Zhang <zhangshaokun@hisilicon.com>
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D69247
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D69021
llvm-svn: 375110
|
|
|
|
|
|
|
|
|
|
|
|
| |
headers include reordering.
Reviewers: phosek, echristo
Reviewed-By: phosek
Differential Revsion: https://reviews.llvm.org/D68045
llvm-svn: 374070
|
|
|
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D67937
M lib/builtins/fp_add_impl.inc
M lib/builtins/fp_lib.h
M lib/builtins/fp_trunc_impl.inc
llvm-svn: 372684
|
|
|
|
|
|
|
|
|
| |
Most builtins accepting or returning long double use the fp_t typedef.
Change the remaining few cases to do so.
Differential Revision: https://reviews.llvm.org/D35034
llvm-svn: 371400
|
|
|
|
|
|
|
|
| |
Test failure fixed.
This reverts commit e204d244badb2e9765a1020f41c773f63da208f4.
llvm-svn: 371003
|
|
|
|
|
|
| |
compiler-rt's cpu indicator.
llvm-svn: 370915
|
|
|
|
|
|
| |
Should silence new C fallthrough warning.
llvm-svn: 369813
|
|
|
|
| |
llvm-svn: 368613
|
|
|
|
|
|
|
| |
- https://reviews.llvm.org/D66023
- amended for ifdef/if gcc errors in previous verison
llvm-svn: 368598
|
|
|
|
|
|
|
|
| |
that tried to fix the build as it's still broken.
This reverts commit 368476 and 368480.
llvm-svn: 368481
|
|
|
|
|
|
|
|
|
| |
That revision broke compilation with this error:
lib/builtins/fixunsxfdi.c:13:2: error: unterminated conditional directive
#if !_ARCH_PPC
llvm-svn: 368480
|
|
|
|
|
|
| |
- https://reviews.llvm.org/D66023
llvm-svn: 368476
|
|
|
|
|
|
|
|
|
| |
See Intel SDM, Vol 2A, Table 3-8:
https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf#page=296
Differential Revision: https://reviews.llvm.org/D65766
llvm-svn: 367929
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compiler-rt's builtin library has generic implementations of many
functions, and then per-arch optimized implementations of some.
In the CMake build, both filter_builtin_sources() and an explicit loop
at the end of the build file (see D37166) filter out the generic
versions if a per-arch file is present.
The GN build wasn't doing this filtering. Just do the filtering manually
and explicitly, instead of being clever.
While here, also remove files from the mingw/arm build that are
redundantly listed after D39938 / r318139 (both from the CMake and the
GN build).
While here, also fix a target_os -> target_cpu typo.
Differential Revision: https://reviews.llvm.org/D65512
llvm-svn: 367448
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While working on https://reviews.llvm.org/D40900, two tests were failing since __clear_cache
aborted. While libgcc's __clear_cache is just empty, this only happens because
gcc (in gcc/config/sparc/sparc.c (sparc32_initialize_trampoline, sparc64_initialize_trampoline))
emits flush insns directly.
The following patch mimics that.
Tested on sparcv9-sun-solaris2.11.
Differential Revision: https://reviews.llvm.org/D64496
llvm-svn: 366822
|
|
|
|
|
|
|
|
|
| |
This assembly is part of a macro that was reformatted in D60351.
The missing space between push and { results in:
Error: bad instruction `push{r4, r5,r6,lr}'
llvm-svn: 365957
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables compiler-rt on SPARC targets. Most of the changes are straightforward:
- Add 32 and 64-bit sparc to compiler-rt
- lib/builtins/fp_lib.h needed to check if the int128_t and uint128_t types exist (which they don't on sparc)
There's one issue of note: many asan tests fail to compile on Solaris/SPARC:
fatal error: error in backend: Function "_ZN7testing8internal16BoolFromGTestEnvEPKcb": over-aligned dynamic alloca not supported.
Therefore, while asan is still built, both asan and ubsan-with-asan testing is disabled. The
goal is to check if asan keeps compiling on Solaris/SPARC. This serves asan in gcc,
which doesn't have the problem above and works just fine.
With this patch, sparcv9-sun-solaris2.11 test results are pretty good:
Failing Tests (9):
Builtins-sparc-sunos :: divtc3_test.c
Builtins-sparcv9-sunos :: compiler_rt_logbl_test.c
Builtins-sparcv9-sunos :: divtc3_test.c
[...]
UBSan-Standalone-sparc :: TestCases/TypeCheck/misaligned.cpp
UBSan-Standalone-sparcv9 :: TestCases/TypeCheck/misaligned.cpp
The builtin failures are due to Bugs 42493 and 42496. The tree contained a few additonal
patches either currently in review or about to be submitted.
Tested on sparcv9-sun-solaris2.11.
Differential Revision: https://reviews.llvm.org/D40943
llvm-svn: 365880
|
|
|
|
|
|
|
|
|
|
|
|
| |
compiler-rt already uses libtool instead of ar when building for
Apple platform, but that's not being used when builtins are being
built separately e.g. as part of the runtimes build. This change
extracts the logic setting up libtool into a separate file and uses
it from both the compiler-rt and standalone builtins build.
Differential Revision: https://reviews.llvm.org/D62820
llvm-svn: 362466
|
|
|
|
|
|
|
|
|
|
| |
If `COMPILER_RT_ARMHF_TARGET` is set , the definition of the AEABI runtime
function `__aeabi_fcmpun` is misspelt: `__aeabi_fcmpum` instead of
`__aeabi_fcmpun`.
Patch by Konstantin Schwarz!
llvm-svn: 362424
|
|
|
|
|
|
|
|
|
| |
This should hopefully address the error we're seeing in older versions
of Clang.
Differential Revision: https://reviews.llvm.org/D62554
llvm-svn: 361909
|
|
|
|
|
|
|
|
|
| |
__builtin_cpu_is.
Using model numbers found in Table 2-1 of the May 2019 version
of the Intel Software Developer's Manual Volume 4.
llvm-svn: 361423
|
|
|
|
|
|
|
|
|
|
|
| |
The only difference between __eqsf2 and __gtsf2 is whether they return
1 or -1 on NaN. Rather than duplicating all the code, use a macro to
define the function twice and use an argument to decide whether to
negate the return value.
Differential Revision: https://reviews.llvm.org/D61919
llvm-svn: 361207
|
|
|
|
|
|
| |
implementation of __builtin_cpu_is.
llvm-svn: 361175
|
|
|
|
|
|
|
|
| |
operations
Differential Revision: https://reviews.llvm.org/D61762
llvm-svn: 360389
|
|
|
|
|
|
|
| |
On MinGW, the same alias mechanism as for ELF, using
__attribute__((__alias__())), is used.
llvm-svn: 359865
|
|
|
|
| |
llvm-svn: 359835
|
|
|
|
|
|
|
| |
The latter doesn't seem to be working for all targets. This addresses
the issue introduced in r359413.
llvm-svn: 359423
|
|
|
|
|
|
| |
This was introduced in r359413.
llvm-svn: 359421
|
|
|
|
|
|
| |
This was introduced in r359413.
llvm-svn: 359419
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Symbol aliases are supported by all platforms that compiler-rt builtins
target, and we can use these instead of function redirects to avoid the
extra indirection.
This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".
Differential Revision: https://reviews.llvm.org/D60931
llvm-svn: 359413
|
|
|
|
|
|
|
|
|
|
|
| |
Use the uniform single line C++/99 style for code comments.
This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".
Differential Revision: https://reviews.llvm.org/D60352
llvm-svn: 359411
|
|
|
|
|
|
|
|
|
|
|
| |
Update formatting to use the LLVM style.
This is part of the cleanup proposed in "[RFC] compiler-rt builtins
cleanup and refactoring".
Differential Revision: https://reviews.llvm.org/D60351
llvm-svn: 359410
|
|
|
|
| |
llvm-svn: 358706
|
|
|
|
|
|
|
|
|
| |
The generic version of comparesf2 defines __cmpsf2 alias for libgcc
compatibility, but the ARM overlay is missing the alias.
Differential Revision: https://reviews.llvm.org/D60805
llvm-svn: 358542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is support for building compiler-rt builtins, The library build
should be complete for a subset of supported platforms, but not all
CMake options have been replicated in GN.
We always use the just built compiler to build all the runtimes, which
is equivalent to the CMake runtimes build. This simplifies the build
configuration because we don't need to support arbitrary host compiler
and can always assume the latest Clang. With GN's toolchain support,
this is significantly more efficient than the CMake runtimes build.
Differential Revision: https://reviews.llvm.org/D60331
llvm-svn: 357821
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids a conflict between stdbool.h, which defines bool to _Bool in
xkeycheck.h. From what I can tell, ymath.h is an internal header, and
the intention is that users should include math.h directly instead. It
doesn't appear to provide declarations of anything required for our
builtins. This include was added back in r249513 from 2015, and it's
possible that ymath.h provided something this code needed at the time,
but today it does not.
llvm-svn: 357728
|
|
|
|
|
|
|
|
| |
This reverts commit 2cabea054e40ae2837da959d0ca89ae25cf1b1f1.
Test failure on buildbots.
llvm-svn: 357048
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement rounding mode support for addxf3/subxf3.
On architectures that implemented the support, this will access the
corresponding floating point environment register to apply the
correct rounding. For other architectures, it will keep the current
behaviour and use IEEE-754 default rounding mode (to nearest, ties
to even).
ARM32/AArch64 support implemented in this change. i386 and AMD64
will be added in a follow up change.
Differential Revision: https://reviews.llvm.org/D57143
llvm-svn: 357035
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch fixes typos in file compiler-rt/lib/builtins/atomic.c.
Reviewers: jasonliu, hubert.reinterpretcast, jfb
Reviewed By: jfb
Subscribers: t.p.northover, theraven, dberris, jfb, jdoerfert, #sanitizers, llvm-commits
Tags: #llvm, #sanitizers
Differential Revision: https://reviews.llvm.org/D59228
Patch by Xing Xue.
llvm-svn: 356844
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also hide __cpu_inicator_init and __cpu_features2
for similar reasons.
Summary: Make __cpu_model a hidden symbol, to match libgcc.
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59561
llvm-svn: 356581
|