summaryrefslogtreecommitdiff
path: root/gnu/llvm
AgeCommit message (Collapse)Author
2019-08-12Ensure stack protector slot access is resolved by PEI.mortimer
On arm64, arm, and ppc it is possible that a large stack frame will cause the stack protector slot to be reallocated at the wrong end of the frame. Noticed by tj@. ok patrick@.
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-08-01The GlobalISel IRTranslator pass assumes that it is safe to use themortimer
LOAD_STACK_GUARD pseudo without consulting the value of useLoadStackGuardNode(), and then tries to add the return from getSDagStackGuard() as a parameter without consulting the return from getIRStackGuard() to see if it should do that. This means that the GlobalISel IRTranslator's implementation for Intrinsic::stackprotector is broken for platforms that implement getIRStackGuard() like we do, and this causes a segfault later when the incomplete LOAD_STACK_GUARD pseudo is lowered in the back end. Since GlobalISel is disabled on aarch64 most of the time anyway, add a bit that disables it for OpenBSD/aarch64 all the time. Fixes a crash when building on aarch64 without retguard, with a stack protector and without optimizations, which manifests when building cross-tools. ok patrick@ deraadt@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-07-28Address a few issues in the expansion of li.d and li.s:Visa Hankala
- In the N64 mode, properly load the whole immediate value in the destination register even if the lower 32 bits are zero. - Ensure correct alignment of memory operands. - Fix the endianess of memory operands.
2019-07-08Fix instruction guard. This prevents the compiler from usingVisa Hankala
the MIPS64 mul instruction on pre-MIPS64 subtargets.
2019-07-01Implement the 'h' register constraint on mips64. This lets clang buildVisa Hankala
pieces of software that use the constraint if the compiler claims to be compatible with GCC 4.2.1. Note that the constraint was removed in GCC 4.4. The reason was that 'h' could generate code whose result is unpredictable. The underlying reason is that the HI and LO registers are special, and the optimizer has to be careful when choosing the order of HI/LO accesses. It looks that LLVM has the needed logic.
2018-04-06Import LLVM 6.0.1 release including clang, lld and lldb.Patrick Wildt
"where is the kaboom?" deraadt@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-06-26In LLVM 8 somebody had the glorious idea to enable the integrated assemblerClaudio Jeker
for OpenBSD sparc64. The problem is that the integrated assembler is not even able to compile the .S files in lib/csu or lib/libc so revert this and use gas again. Fixes build issues with clang on sparc64. Issue identified by jca@ OK deraadt@, patrick@, jca@
2019-06-24Implement .cplocal directive. Needed when building libcrypto.Visa Hankala
2019-06-24Implement SGE pseudo-instructions. Needed when building libcrypto.Visa Hankala
2019-06-24Fix a bug in memory operand handling. If a load or store uses a symbolVisa Hankala
as a memory operand, the assembler generates incorrect relocations in PIC mode. As a simple fix, expand the instruction into an address load sequence, which works, that is followed by the actual memory instruction. Note that the generated sequence is not always optimal. If the symbol has a small offset, the offset could be fused with the memory instruction. The fix does not achieve that, however. A symbol offset adds an extra instruction.
2019-06-24The -nopie flag has already been pushed a few lines before,Patrick Wildt
we don't need to do that again here. From Brad
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-06-23Re-add files that were previously removed but are now part of LLVM 8.0.0.Patrick Wildt
2019-06-23Merge LLVM 8.0.0 release.Patrick Wildt
Prepared with help from jsg@ and mortimer@ Tested on amd64 by bcallah@, krw@, naddy@ Tested on arm64 by patrick@ Tested on macppc by kettenis@ Tested on octeon by visa@ Tested on sparc64 by claudio@
2019-06-23Import LLVM 8.0.0 release including clang, lld and lldb.Patrick Wildt
2018-04-06Import LLVM 6.0.1 release including clang, lld and lldb.Patrick Wildt
"where is the kaboom?" deraadt@
2017-10-04Import LLVM 5.0.0 release including clang, lld and lldb.Patrick Wildt
2017-01-24Import LLVM 4.0.0 rc1 including clang and lld to help the currentPatrick Wildt
development effort on OpenBSD/arm64.
2017-01-14Import LLVM 3.9.1 including clang and lld.Patrick Wildt
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-06-01Back out frame pointer elimination optimization.mortimer
2019-06-01Do not eliminate frame pointers on i386. The entire i386 ecosystem assumesmortimer
it will be there. problem found by naddy@, "heck yeah" kettenis@
2019-05-31Re-enable frame pointer elimination for x86 and mips64 if optimizations aremortimer
enabled. ok visa@
2019-05-31Re-enable RETGUARD leaf function optimization for arm64.mortimer
It turns out MachineFrameInfo.hasCalls() is unreliable, because it is up to the backends to update this information whenever they add calls to a function, and this does not always happen. ok kettenis@
2019-05-16Stop using the moribund MLINKS bsd.man.mk feature for clang(1).Ingo Schwarze
Patch clang.rst such that "gmake -f Makefile.sphinx man" keeps working. Using input from jsg@; OK patrick@; "no worries" deraadt@
2019-05-13Add support for -znoretpolineplt and make -zretpolineplt the default.Philip Guenther
Affects i386 and amd64 only. ok deraadt@ kettenis@
2019-04-26add "elf64_sparc" emulation name so ELF SPARCV9 format can be explicitlyChristian Weisgerber
specified; suggested by and ok kettenis@
2019-04-25Also touch --param ssp-buffer-size when using retguard in lieu of themortimer
stack protector. Fixes 'unused arguments' warning when this argument is given. Noticed by robert@, ok robert@
2019-04-22Remove cast that truncates immediate operands to 32 bits. This fixesMark Kettenis
genassym.sh on sparc64 when using clang as the compiler. ok claudio@, deraadt@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-04-20Restore previous section after setting the MIPS ABI marker. This keepsVisa Hankala
the .text section in use after the file header, improving compatibility with gcc. Without this change, module-level inline assembly blocks could end up into wrong section. OK kettenis@ guenther@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-04-17retguard-cookie-in-register is slightly unstable on arm64, so surgicallyTheo de Raadt
disable it in upcoming 6.5 release. (phessler and mortimer have the details)
2019-04-04frame-pointer elimination has encountered some resistance in ports but weTheo de Raadt
are close to release, so punt the change till after-release easier for everyoned and especially naddy ok tedu
2019-04-02Enable frame pointer elimination on i386, amd64 and mips64 when givenmortimer
optimization flags. ok kettenis@ visa@
2019-04-02Emit variable length trap padding in retguard epilogue.mortimer
This adds more trap padding before the return while ensuring that the return is still in the same cache line. ok deraadt@
2019-04-01Consume SSP options when using retguard to prevent warnings.mortimer
ok millert@
2019-03-31If using retguard, we do not also need the stack protector.mortimer
ok deraadt@
2019-03-31Do not store the retguard cookie in frame in leaf functions if possible.mortimer
Makes things slightly faster and also improves security in these functions, since the retguard cookie can't leak via the stack. ok deraadt@
2019-03-05libLLVM in base will be installed as libLLVM.so.major.minor with noJonathan Gray
symlink for libLLVM-7.so or libLLVM.so. Adjust llvm-config to cope and force llvm-config DyLibExists to true. This is specific to LLVM in base this patch should not be used in ports.
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-02-22Improve the X86FixupGadgets pass:mortimer
- Target all four kinds of return bytes (c2, c3, ca, cb) - Fix up instructions using both ModR/M and SIB bytes - Force alignment before instructions with return bytes in immediates - Force alignment before instructions that have return bytes in their encoding - Add a command line switch to toggle the functionality. ok deraadt@
2019-02-18When generating code for OpenBSD/powerpc, avoid unaligned floating-pointMark Kettenis
load and store instructions. The vast majority of PowerPC CPUs that OpenBSD runs on don't implement those and will generate an alignment exceptions. While we do emulate lfd and stfd (to work around GCC bugs), we don't emulate lfs and stfs. It is way more efficient to have the compiler generate code that only uses aligned load and store instructions. Based on a diff from Georg Koehler. ok patrick@, visa@
2016-09-03Use the space freed up by sparc and zaurus to import LLVM.Pascal Stumpf
ok hackroom@
2019-02-17Skip retguard instructions in prologue detection.mortimer
ok patrick@
2017-10-04Import LLVM 5.0.0 release including clang, lld and lldb.Patrick Wildt
2019-02-13Merge LLVM commits r340844, r353818 and r353819 from the 8.0 branchPatrick Wildt
to fix a regression in floating point operations. Bluhm noticed that the bc regression test has been failing after the upgrade to 7.0.1 because setting the floating point control register was in some cases reordered erroneously. Found and tested by bluhm@ ok bluhm@ kettenis@