summaryrefslogtreecommitdiffstats
path: root/gnu/llvm (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make the unwind cache tread-safe by declaring it thread_local. Solvesotto2021-02-201-1/+1
| | | | segfaults seen on exception handling. ok kettenis@
* Shuffle how lldb register contexts are built.mortimer2021-02-148-26/+46
| | | | | | | | | | | | Instead of using #if defined(__arch__) to include / exclude the entire contents of the NativeRegisterContext implementations, use a single NativeRegisterContextOpenBSD_arch which includes the right arch specific register context, and provides a dummy implementation for unsupported architectures. This allows building lldb on architectures which do not have a register context implementation so it can be used as a remote client. ok patrick@
* Cleanup lldb amd64 support.mortimer2021-02-134-474/+213
| | | | | | | | | | | | | | | | - Remove watchpoint support since we do not support hardware watchpoints. - Support floating point regsisters in the ReadAll/WriteAll interface. - Standardize the sizes used in GerGPRSize() and GetFPRSize() to correspond to the sizes we get from ptrace. - Fix the r/w of the mmx registers to map onto the st fp registers instead of xmm registers. - Normalize some variable names to be architecture neutral. ok patrick@
* Fix lldb.mortimer2021-02-092-14/+4
| | | | | | | | Map deliberately invalid signal to zero when passing to PT_STEP and P_CONTINUE. Also clean up getting Environment so setting LLDB_DEBUGSERVER env vars works again. ok patrick@
* switch clang to -fno-common by defaultnaddy2021-02-063-21/+6
| | | | | | | | | | Common variables will be flagged as errors by default. This can be overridden with -fcommon. Cherry-pick this change that will be part of LLVM11. We bring it forward so we can finish fixing the fallout in the ports tree. ok deraadt@ sthen@ mglocker@
* Backport fix to avoid including math.h from stdlib.h.kettenis2021-01-102-62/+63
| | | | | | Fixes building the textproc/groff port (and maybe others). ok naddy@
* Re-apply our libc++ 8.0.0 patches to libc++ 10.0.1.patrick2021-01-027-12/+35
|
* Import libc++abi 10.0.1 release.patrick2021-01-0249-0/+15495
|
* Import libc++ 10.0.1 release.patrick2021-01-02469-0/+220737
|
* Merge compiler-rt 11.0.0.patrick2021-01-027-157/+10
| | | | ok kettenis@
* Import compiler-rt 11.0.0 release.patrick2021-01-02357-3776/+10123
| | | | ok kettenis@
* Adjust local modifications to follow changes made upstream.kettenis2021-01-022-3/+3
| | | | | | Fixes build on powerpc and sparc64. ok patrick@
* Re-apply our libunwind 8.0.0 patches to libunwind 11.0.0. Patches to thepatrick2021-01-0212-23/+407
| | | | | | | PPC ASM had to be re-applied manually due to whitespace changes upstream, other merge conflicts were harmless. "Looks good" kettenis@
* Import libunwind 11.0.0 in new LLVM directory, thus not yet linked topatrick2021-01-0233-0/+19171
| | | | | | build. Encouraged by kettenis@
* Skip leaf function optimization under some circumstances.mortimer2021-01-011-1/+110
| | | | | | | | On architectures that do not always spill the return address to the stack, it is possible for local stack frame data corruption in leaf functions to span stack frames if the retguard cookie is not spilled in the function. In leaf functions on these architectures, now spill the retguard cookie if the function contains arrays or has variables which have their address taken.
* Implement Loongson 2F BTB bug workaround in clangvisa2020-12-017-0/+160
| | | | | | | | | | This adapts the -mfix-loongson2f-btb workaround from as(1) to LLVM/clang. Because LLVM emits machine code directly without using assembly as intermediary form, the workaround has to be applied in the compiler backend in addition to the integrated assembler. Discussed with miod@ OK mortimer@
* Teach lld to link the macppc kernelgkoehler2020-11-291-0/+2
| | | | | | | | | | | | | | | | Add R_PPC_ADDR24 to lld. We need R_PPC_ADDR24 for absolute branches "ba" and "bla" in locore.S in the kernel. In Makefile.macppc, add a gapdummy (like in Makefile.powerpc64) to avoid an lld error. Also adapt a part of Makefile.i386, so my powerpc64 can use clang and lld to build and link the macppc kernel. (I didn't boot that kernel.) My macppc can now build, link, and boot kernels with either ld.bfd or ld.lld. Beware that kernels linked with ld.lld have at least one problem (wrong &etext) not yet fixed. ok kettenis@
* Backport https://reviews.llvm.org/D75419. This adds a workaround forkettenis2020-11-212-4/+9
| | | | | | | undefined references to .got2 on powerpc making it possible to link llvm with lld. ok gkoehler@
* Fix va_arg in C++, Objective-C on 32-bit powerpcgkoehler2020-11-201-3/+2
| | | | | | | | | | | | | | | | | In the PPC32 SVR4 ABI, a va_list has copies of registers from the function call. va_arg looked in the wrong registers for (the pointer representation of) an object in Objective-C, and for some types in C++. Fix va_arg to look in the general-purpose registers, not the floating-point registers. Also fix va_arg for some C++ types, like a member function pointer, that are aggregates for the ABI. Anthony Richardby found the problem in Objective-C. Eli Friedman suggested part of this fix. Fixes https://bugs.llvm.org/show_bug.cgi?id=47921 I have submitted this diff as https://reviews.llvm.org/D90329 ok kettenis@
* Do not reserve PowerPC GOT header entries when creating a relocatablekettenis2020-11-011-1/+1
| | | | | | object file. ok guenther@
* Use all 64 bits of the RETGUARD cookie on powerpc64gkoehler2020-10-181-14/+7
| | | | | | | Change the 64-bit target to use "ld" (load 64-bit doubleword) for the cookie. The 32-bit target stays with "lwz" (load 32-bit word). ok mortimer@
* Add RETGUARD implementation for powerpc and powerpc64.mortimer2020-10-128-0/+449
| | | | ok deraadt@ kettenis@
* Always allocate GOT header entries on powerpc.kettenis2020-10-111-0/+2
| | | | ok deraadt@
* Fix frame pointer slot on aarch64 for functions that do not save calleemortimer2020-09-191-12/+6
| | | | | | registers with retguard enabled. ok kettenis@
* Disable strict floating point if not X86gkoehler2020-09-1012-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable options like clang -fno-unsafe-math-optimizations for all targets except X86 (and SystemZ). This prevents a crash of clang, reported by cwen@, in graphics/babl or emulators/mednafen for powerpc. ok mortimer@ This change comes from llvm 11.x: https://github.com/llvm/llvm-project/commit/d4ce862 Reland "[FPEnv][Clang][Driver] Disable constrained floating point on targets lacking support." We currently have strict floating point/constrained floating point enabled for all targets. Constrained SDAG nodes get converted to the regular ones before reaching the target layer. In theory this should be fine. However, the changes are exposed to users through multiple clang options already in use in the field, and the changes are _completely_ _untested_ on almost all of our targets. Bugs have already been found, like "https://bugs.llvm.org/show_bug.cgi?id=45274". This patch disables constrained floating point options in clang everywhere except X86 and SystemZ. A warning will be printed when this happens. Use the new -fexperimental-strict-floating-point flag to force allowing strict floating point on hosts that aren't already marked as supporting it (X86 and SystemZ). Differential Revision: https://reviews.llvm.org/D80952
* Delete my leftover comment.gkoehler2020-08-311-1/+0
| | | | | | | | | | | This comment was from my commit of 2020-05-02, > Don't make an illegal adde. Avoids fatal error on PowerPC. When we merged LLVM 10, we got upstream's fix for the illegal adde problem, and this comment became the only difference in this file between us and upstream. Found by Brad Smith.
* Remove local change to fix powerpc floating-point alignmentgkoehler2020-08-142-9/+0
| | | | | | | | LLVM 10 includes a different fix (https://reviews.llvm.org/D71954), so this change (by kettenis on 2019-02-18) is no longer needed. Thanks to Brad Smith for providing the removal diff. ok kettenis@
* Re-apply our patches to compiler-rt.patrick2020-08-102-2/+24
| | | | ok kettenis@
* Import compiler-rt 10.0.1 release.patrick2020-08-101302-0/+244280
| | | | ok kettenis@
* Tedu files that got removed in LLVM 10.0.1.patrick2020-08-097-4978/+0
|
* Merge LLVM 10.0.1.patrick2020-08-091-0/+24
|
* Import LLVM 10.0.1 including clang, lld and lldb.patrick2020-08-092-2/+5
|
* Import LLVM 10.0.1 including clang, lld and lldb.patrick2020-08-0911-27/+71
|
* Import LLVM 10.0.1 including clang, lld and lldb.patrick2020-08-0934-286/+437
|
* Import LLVM 10.0.1 including clang, lld and lldb.patrick2020-08-09116-478/+9814
|
* default to -march=i586 on i386jsg2020-08-071-1/+1
| | | | | | | | | | | | llvm 9 and later take more care not to inline cmpxchg8b/cx8 with -march=i486 instead calling __atomic_* functions. This in turn breaks the build of a large number of ports. To avoid having to add a lock or conditionally building individual ports with -march=i586 change the default so 64 bit atomics will always be available. ok patrick@ sthen@ deraadt@
* Remove LLVM 8.0.1 files.patrick2020-08-0316693-5574423/+0
|
* Import LLVM 10.0.0 release including clang, lld and lldb.patrick2020-08-035258-0/+899209
| | | | | ok hackroom tested by plenty
* Import LLVM 10.0.0 release including clang, lld and lldb.patrick2020-08-03281-0/+91036
| | | | | ok hackroom tested by plenty
* Import LLVM 10.0.0 release including clang, lld and lldb.patrick2020-08-032435-0/+1550414
| | | | | ok hackroom tested by plenty
* Import LLVM 10.0.0 release including clang, lld and lldb.patrick2020-08-038149-0/+3055003
| | | | | ok hackroom tested by plenty
* int64_t and intmax_t are always (signed) long long on OpenBSD.kettenis2020-07-181-0/+2
| | | | ok deraadt@
* Set the default ABI for OpenBSD to ELFv2 in the clang frontend as well.kettenis2020-07-111-0/+4
| | | | | | | This makes sure the compiler defines the _CALL_ELF pre-processor symbol correctly. ok mortimer@
* Make long double the same as double for now on powerpc64 like we do onkettenis2020-06-281-0/+1
| | | | | | powerpc. This matched what FreeBSD does. ok patrick@
* Set max atomic size for PowerPC.gkoehler2020-06-041-1/+4
| | | | | | | | | | | | 32-bit PowerPC doesn't have instructions for lock-free atomic ops on 8-byte values, and needs libcalls like __atomic_fetch_add_8(). In code like "_Atomic long long a; a++;", clang doesn't emit a libcall. This was causing linker errors on symbols like __sync_fetch_and_add_8. Now that LLVM knows the max atomic size, its AtomicExpandPass changes these 8-byte ops into libcalls. ok mortimer@
* Switch Powerpc64 Big Endian to ELFv2 on OpenBSD, as least for now.drahn2020-05-301-0/+2
| | | | | | | | This should simplify bringup and make it easier to support Big Endian and Little Endian with the same code. May be reconsidered if it causes too many problems with Ports. ok kettenis@
* Powerpc64 should use same _mcount profiling as powerpc 32bit.drahn2020-05-301-0/+1
| | | | ok kettenis@
* PowerPC: optimize away the frame pointer.gkoehler2020-05-251-3/+4
| | | | | | | | clang defaulted to -fomit-frame-pointer when optimizing PowerPC code for Linux and NetBSD. Now do it for all systems, including OpenBSD. This affects both 32-bit and powerpc64 code. ok kettenis@
* Use a distinct trap code with retguard on mips64.visa2020-05-231-2/+3
| | | | | | | | | | | | This lets the kernel detect retguard traps and send SIGABRT instead of SIGEMT. SIGEMT does not indicate correctly the nature of the error (stack overflow, violation of control flow). It can confuse the user to restart the program without further investigation. Prompted by and OK deraadt@ OK mortimer@
* Make sure that we add our OpenBSD specific defines on PowerPC64 targets.patrick2020-05-201-0/+4
| | | | | Prompted and tested by drahn@ ok deraadt@ drahn@ kettenis@ visa@