summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/clang/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* switch clang to -fno-common by defaultnaddy2021-02-062-20/+4
| | | | | | | | | | 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@
* Implement Loongson 2F BTB bug workaround in clangvisa2020-12-011-0/+5
| | | | | | | | | | 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@
* 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@
* Add RETGUARD implementation for powerpc and powerpc64.mortimer2020-10-121-0/+4
| | | | ok deraadt@ kettenis@
* Disable strict floating point if not X86gkoehler2020-09-105-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge LLVM 10.0.1.patrick2020-08-091-0/+24
|
* Import LLVM 10.0.1 including clang, lld and lldb.patrick2020-08-0924-275/+328
|
* 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@
* Import LLVM 10.0.0 release including clang, lld and lldb.patrick2020-08-031070-0/+1001806
ok hackroom tested by plenty