Age | Commit message (Collapse) | Author |
|
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@
|
|
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@
|
|
ok kettenis@
|
|
"where is the kaboom?" deraadt@
|
|
ok hackroom@
|
|
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@
|
|
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@
|
|
Prompted and tested by drahn@
ok deraadt@ drahn@ kettenis@ visa@
|
|
When the DAG truncates an ISD::ADDE node, DAGCombiner may optimize it
by making an adde with smaller operands. PowerPC has i1 registers,
and may truncate an i32 adde to i1, but an i1 adde is not legal for
PowerPC, and the legalize-ops phase can't fix it. This was causing
"fatal error: error in backend: Cannot select..."
cwen@ reported the error
ok mortimer@ kettenis@ deraadt@
|
|
ok hackroom@
|
|
"hard-quad-float" feature is available. Add missing replacement
instruction patterns that are needed to emit alternative code for
conditional moves of quad-precision floats.
ok mortimer@
|
|
ok hackroom@
|
|
other clang platforms do.
ok jca@
|
|
"where is the kaboom?" deraadt@
|
|
ok mortimer@
|
|
ok hackroom@
|
|
Add these options from gcc to clang:
-maix-struct-return # return all structs in memory
-msvr4-struct-return # return small structs in r3/r4
ok mortimer@ jca@ deraadt@
|
|
ok hackroom@
|
|
"Go for it" kettenis@
|
|
to optimize the cache and UVM faulting behavior
ok kettenis@
|
|
ok kettenis@
|
|
|
|
lldb likes to look at argv[0] to figure out where it might find lldb-server,
but when we invoke lldb via $PATH this doesn't work, so fill in some helpers
to tell it where to look.
ok millert@
|
|
Fixes an assert when running lldb with DEBUG.
ok patrick@
|
|
|
|
with mortimer
|
|
them as COMDATs so that the linker can individually discard them, instead
of just ignoring duplicate symbols but keep the (duplicate) space.
On amd64, this reduces the size of the kernel OPENBSD_RANDOM segment by 82%
and the libc OPENBSD_RANDOM segment by 15%. A port that tb@ is working
on experienced a 97.3% reduction...which let it actually run.
ok mortimer@ deraadt@
|
|
Follows a similar model as NetBSD. Much help from patrick, kettenis and guenther.
lldb and lldb-server remain not installed by default.
ok patrick@
|
|
"where is the kaboom?" deraadt@
|
|
|
|
For this architecture we use separate retguard prologue and epilogue code
for static or PIC code. In the PIC case we use some additional code before
the retguard epilogue to recover the function start address and the GOT
pointer in order to get the per-function random cookie. Much thanks to
visa@ for suggestions and advice making it all work.
ok deraadt@ visa@
|
|
ok hackroom@
|
|
Change of behaviour in latest clang upgrade noticed by jsing@ during
the Go port update, where --print-libgcc-file-name is being used which
prints the compiler-rt path.
ok kettenis@
|
|
Tested in snaps and package builds
Tested on amd64 by naddy@
Tested on arm64 by patrick@
Tested on octeon by visa@
|
|
|
|
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@.
|
|
ok hackroom@
|
|
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@
|
|
ok hackroom@
|
|
- 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.
|
|
the MIPS64 mul instruction on pre-MIPS64 subtargets.
|
|
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.
|
|
"where is the kaboom?" deraadt@
|
|
ok hackroom@
|
|
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@
|
|
|
|
|
|
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.
|
|
we don't need to do that again here.
From Brad
|
|
ok hackroom@
|