Age | Commit message (Collapse) | Author |
|
http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/5941
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301935 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
From Phab D32031.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301831 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301820 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Per http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301818 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows.
Reviewers: chh, howard.hinnant
Reviewed By: chh
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D30787
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301350 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This broke the self-host build on Windows (PR32777).
Original commit message:
> [builtins] Implement emulated TLS on Windows.
>
> Summary:
> LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows.
>
> Reviewers: chh, howard.hinnant
>
> Reviewed By: chh
>
> Subscribers: mgorny, llvm-commits
>
> Differential Revision: https://reviews.llvm.org/D30787
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301274 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows.
Reviewers: chh, howard.hinnant
Reviewed By: chh
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D30787
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301089 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299786 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Avoid __attribute__((constructor)) in cpu_model.c.
Use more C99 _Complex emulation in divtc3.c. Joerg Sonnenberger added
this builtin just after the last round of C99 _Complex emulation landed
in r249514 (Oct 2015).
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299784 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Many things were broken:
- We stopped building most builtins on Windows in r261432 for reasons
that are not at all clear to me. This essentially reverts that patch.
- Fix %librt to expand to clang_rt.builtins-$arch.lib on Windows instead
of libclang_rt.builtins-$arch.a.
- Fix memory protection tests (trampoline, enable executable, clear
cache) on Windows. One issue was that the MSVC incremental linker
generates ILT thunks for functions with external linkage, so memcpying
the functions into the executable stack buffer wasn't working. You
can't memcpy an RIP-relative jump without fixing up the offset.
- Disable tests that rely on C99 complex library functions when using
the MSVC CRT, which isn't compatible with clang's C99 _Complex.
In theory, these could all be separate patches, but it would not green
the tests, so let's try for it all at once. Hopefully this fixes the
clang-x64-ninja-win7 bot.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299780 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
During MIPS implementation work for FreeBSD, John Baldwin (jhb@FreeBSD.org)
found that gcc 6.x emits calls to __ffssi2() when compiling libc and some
userland programs in the base system.
Add it to compiler-rt's builtins, based off of the existing __ffsdi2()
implementation. Also update the CMake files and add a test case.
Reviewers: howard.hinnant, weimingz, rengolin, compnerd
Reviewed By: weimingz
Subscribers: dberris, mgorny, llvm-commits, emaste
Differential Revision: https://reviews.llvm.org/D31721
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299675 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: Need to save `lr` before bl to aeabi_div0
Reviewers: rengolin, compnerd
Reviewed By: compnerd
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D31716
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@299628 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Originally, a few tests fail for armhf target due to:
1) COMPILER_RT_ARMHF_TARGET was not set when building the lib
2) COMPILER_RT_ABI should not be defined as `__attribute__((pcs("aapcs")))` for armhf when building for both lib and tests
This address https://bugs.llvm.org//show_bug.cgi?id=32261
mulsc3_test.c is a newly exposed issue, which will be addressed separately.
Reviewers: rengolin, compnerd
Reviewed By: compnerd
Subscribers: aemerson, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D31448
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298974 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Thumb1/Thum2/ARM ISA."
This reverts commit c3709191b6d36c4c936173f4a9a29a734b12cb15.
(commit by mistake)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298715 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Value of __ARM_ARCH_ISA_THUMB isn't based on the actual compilation
mode (-mthumb, -marm), it reflect's capability of given CPU.
Due to this:
- use __tbumb__ and __thumb2__ insteand of __ARM_ARCH_ISA_THUMB
- use '.thumb' directive consistently in all affected files
- decorate all thumb functions using
DEFINE_COMPILERRT_THUMB_FUNCTION()
---------
Note: This patch doesn't fix broken Thumb1 variant of __udivsi3 !
Reviewers: weimingz, rengolin, compnerd
Subscribers: aemerson, dim
Differential Revision: https://reviews.llvm.org/D30938
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298713 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
CFPropertyListCreateFromXMLData that's used in __isOSVersionAtLeast
I forgot to add the pragmas in r297760.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297827 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
symbols dynamically
The CoreFoundation symbols uses by __isOSVersionAtLeast should be loaded at
runtime to ensure that the programs that don't use @available won't have to be
linked to CoreFoundation.
The Clang frontend IRGen library will need to emit a CoreFoundation symbol
when @available is used to ensure that programs that actually use @available
are linked to CoreFoundation.
rdar://31039554
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297760 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
CFPropertyListCreateFromXMLData that's used in __isOSVersionAtLeast
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297613 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297515 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Looks like the problem was a case-insensitive include of dispatch/dispatch.h.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297392 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts r297382, it was causing build failures.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297388 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This predicate compares the host's marketing OS version to one passed as
argument. Currently, only darwin targets are supported. This is done by parsing
the SystemVersion.plist file.
Also added in this patch is some lit testing infrastructure for builtins, which
previously had none. This part of the patch was written by Alex Lorenz (with
some minor modifications).
This patch is part of a feature I proposed here:
http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html
Differential revision: https://reviews.llvm.org/D30136
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297382 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
To avoid depending on kernel headers, we just repeat the single define
we need, which is likely never going to change.
Patch by Joakim Sindholt <opensource@zhasha.com>
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@295738 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: rengolin, compnerd
Reviewed By: compnerd
Subscribers: hans, aemerson
Differential Revision: https://reviews.llvm.org/D29869
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294886 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This patch implements addsf3/__aeabi_fadd in asm for Thumb1.
Compared with generic C version (lib/fp_add_impl.inc), it
1. all constants are materialized instead of loading from constant pool
2. no stack spills (C version uses 136 bytes stack space)
3. clz() is called only when necessary. (C version always calls it)
Reviewers: compnerd, rengolin, asl
Reviewed By: asl
Subscribers: efriedma, aemerson, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D29485
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294172 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
in aeabi_ldivmod and uldivmod, using r6 instead of r12 as the temp reg due to limitation of Thumb1 ISA.
Now, all EABI sources are Thumb1 compatible.
Also added test cases by reusing the test cases from divmodsi4_test.c, udivmodsi4_test and udivmoddi4_test.c
Reviewers: rengolin, compnerd
Reviewed By: rengolin
Subscribers: javed.absar, aemerson, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D29226
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293527 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: compnerd, rengolin
Reviewed By: rengolin
Subscribers: aemerson, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D28985
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293247 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Thanks to Dave Lee for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@293120 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
syntax fix
Summary:
Make the asm of aeabi_memset be assembled for thumb1.
Also fix some instructions to conform with the syntax of ARM reference manual.
For example, muls requires the form of "Rd, Rn, Rd" and orrs requires
the form of "Rd, Rm". Clang-as is benign but it may fail other assembler
if not in the exact form.
Reviewers: rengolin, compnerd, kubamracek
Reviewed By: rengolin, compnerd
Subscribers: aemerson, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D28971
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@292727 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Setting -DCOMPILER_RT_TEST_TARGET_TRIPLE=armv6m-none-eabi will enable the build of builtin functions ARMv6m.
Currently, only those asms that support armv6m are added.
TODO:All asm sin ARM_EABI_Sources are ported for thumb1 so Thumb1_EABI_Sources will be deprecated.
Reviewers: rengolin, compnerd
Reviewed By: compnerd
Subscribers: aemerson, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D28463
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@292504 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The `-target` impacts the CC for the builtins. HF targets (with either
floating point ABI) always use AAPCS VFP for the builtins unless they
are AEABI builtins, in which case they use AAPCS. Non-HF targets (with
either floating point ABI) always use AAPCS for the builtins and AAPCS
for the AEABI builtins. This introduces the thunks necessary to switch
CC for the floating point operations. This is not currently enabled,
and should be dependent on the target being used to build compiler-rt.
However, as a stop-gap, a define can be added for ASFLAGS to get the
thunks.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291677 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The argument adjustment was accidentally removed, resulting in the use
of stale register values.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291591 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: Mainly translate IT block into cmp/branch for functions in comparesf2.S
Reviewers: rengolin, compnerd
Subscribers: aemerson, llvm-commits
Differential Revision: https://reviews.llvm.org/D28016
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291396 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Implement the missing __floattitf() and __floatuntitf() functions, to
convert 128-bit (unsigned) integers to quad-precision floating-point
types. This is needed e.g. on AArch64 where 'long double' is
a quad-precision type.
The code is based on the existing code for __floattixf()
and __floatuntixf(), updated to account for different bit field lengths
of quad-precision float. The tests are also copied, with the rounding
tests adjusted for longer significand.
Differential Revision: https://reviews.llvm.org/D27898
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@291259 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
For idivsi3, convert the Thumb2 only instruction to thumb1.
For aeabi_idivmod, using __divsi3.
Reviewers: rengolin, compnerd
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D27472
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288960 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: Since CLZ is not available for Thumb1, we use __ARM_ARCH_ISA_THUMB != 1 as one of the conditions.
Reviewers: rnk, compnerd, rengolin
Subscribers: aemerson, rengolin, llvm-commits
Differential Revision: https://reviews.llvm.org/D27530
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288954 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This is a resubmit of r288710 due to breakage of Darwin armv7em.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288777 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit r288710.
r288710 breaks building the builtin libraries on Darwin for armv7em.
Build logs may still be avaialable here:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_build/12035/console
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288773 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
The current uidiv supports archs without clz. However, the asm is for thumb2/arm.
For uidivmod, the existing code calls the C version of uidivmodsi4, which then calls uidiv. The extra push/pop/bl makes it less efficient.
Reviewers: jmolloy, jroelofs, joerg, compnerd, rengolin
Subscribers: llvm-commits, aemerson
Differential Revision: https://reviews.llvm.org/D27309
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288710 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The previous change for enabling MinGW did not preserve the Win32 check and
added the EABI specific routines to a Windows build which does not use the EABI
routines. Correct the conditional check for that.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288422 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This fixes an incorrect standard usage of GNU99 when the compiler check was for
the ISO standard C99. Furthermore, bump the dependency up to C11. The
motivation for this change is ARM EHABI compatibility with clang 3.8. We rely
on a type definition redefinition which causes an error with -Werror builds.
This is problematic for FreeBSD builds. Switching to C11 allows the
compatibility without the unnecessary pedantic warning. The alternative would
be to clutter the support header with a `pragma clang diagnostic ignore`. GCC
4.8+ and the supported clang revisions along with MSVC support enough of C11 to
allow building the builtins in C11 mode. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288099 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
When building with clang/LLVM in MSVC mode, the msvcrt libraries contain
these functions.
When building in a mingw environment, we need to provide them somehow,
e.g. via compiler-rt.
The aeabi divmod functions work in the same way as the corresponding
__rt_*div* functions for windows, but their parameters are swapped.
The functions for converting float to integer and vice versa are the
same as their aeabi equivalents, only with different function names.
Differential Revision: https://reviews.llvm.org/D26183
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@287465 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
When the C unwinding personality was corrected to match the ARM EHABI
specification, the unwind header in clang was updated with necessary
declarations. However, when building with an older compiler, we would not have
the necessary declarations. This would result in a build failure. Provide a
supplementary header to ensure that the necessary declarations are present for
the build of the C unwinding personality.
Note that this is NOT an ABI break. It merely is a compile time failure due to
the constants not being present. The constants here are reproduced
equivalently. This header should permit building with clang[<3.9] as well as
gcc.
Addresses PR31035!
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@287359 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
ARM EABI also uses function aliases. Ensure that those aliased functions are
given proper visibility annotations.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285478 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The CMake build system had missed this macro as part of the build of the
builtins. This would result in the builtins exporting symbols which are
implemented in assembly with global visibility. Ensure that the assembly
optimized routines are given the same visibility as the C routines.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285477 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285265 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
clear_cache is using R7 for the SVC call and that's the frame pointer in
GCC, which is only disabled on -O2/3, so Release builds finish, Debug don't.
Fixes PR30797.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@285204 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This code can be built with thumb-2 like many of the other builtin routines.
Enable that here as well.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282530 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
On Linux ARM, the syscall will take 3 arguments (start, end, flags). Ensure
that we do not pass garbage to the flags, which can cause the cacheflush call to
fail, and therefore cause an abort at runtime.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280877 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The atomic builtin source is problematic when cross-compiling builtins because it requires a variable and sometimes large set of system headers. This option allows users to optionally prevent it from being built.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@280416 91177308-0d34-0410-b5e6-96231b3b80d8
|