Age | Commit message (Collapse) | Author |
|
Fix for x86_64 only.
The calling native code can not handle a GC
as it has a raw pointer where to write the binary data.
If a GC happens the data (utf32) will be written
to the old deallocated heap.
|
|
|
|
The trap frame allocation wrappers occasionally call the garbage
collector, even though built-in functions are not supposed to.
On non-{x86,amd64} platforms, HiPE was optimising the BIF wrapper
interface on the basis that BIFs do not GC. So, when
hipe_reserve_beam_trap_frame called the garbage collector, the state in
the PCB was stale and corruption happened.
Now, these particular BIFs are reclassified as GC BIFs.
Unfortunately, in order to do that we needed to introduce a
gc_bif_interface_3 macro in every hipe_$ARCH_bifs.m4 file.
|
|
|
|
|
|
This fixes arity 4 BIF support in HiPE, following its introduction
on master (OTP 18) via the nox/ets-update_counter-4 merge.
- define standard_bif_interface_4, nbif_4_gc_after_bif, and
nbif_4_simple_exception on ARM: unbreaks the build on ARM
- remove bogus stack re-alignment from standard_bif_interface_4
on AMD64: for 4-arg BIFs the stack is already aligned, and the
code would misalign the C stack which violates the ABI and may
cause alignment faults in vectorized code
- the nbif_4_simple_exception OPD name on PPC64 was incorrectly
using the nbif_3_simple_exception OPD name: this would have
caused a multiple definition error in the assembler or linker
In addition there are a few cleanups:
- fix standard_bif_interface_N comment on x86
- fix standard_bif_interface_4 comment on SPARC
- separate nbif_N_simple_exception blocks by empty lines on PPC,
like on ARM, to clearly show which things belong together
- fix standard_bif_interface_N comment on ARM
- fix standard_bif_interface_4 on AMD64 to match the indentation
and spacing conventions of the rest of that file
|
|
|
|
and reduce the probability of macro name collisions
Catalyst: ppc macro "r0" conflicting with local variable in external.c
|
|
Position-independent code is mandatory on OS X. We use r11 as an intermediate
register to fill BIF_P->hipe.bif_callee. This fixes the following error when
doing `make debug FLAVOR=smp`:
clang -cc1as: fatal error: error in backend: 32-bit absolute addressing is not supported in 64-bit mode
|
|
|
|
Previously done for ppc in c469d8ce14e9544a297d9af48c9da43137122d9a
|
|
|
|
Add hipe_debug_bif_wrapper() as a wrapper for every BIF
called by native code.
|
|
|
|
x86 and amd64: Push BIF__ARGS array on C-stack.
ppc, sparc and arm: Write BIF__ARGS array to P->def_arg_reg[]
Just the simplest solution with limited assembler knowledge,
probably room for improvements.
|
|
No semantic change.
Just easier to debug when jumps are spelled out
and not obscured by yet another layer of macros.
|
|
|
|
* gc/hipe_darwin_amd64:
Fix hipe memory allocation problems on darwin/amd64
Porting x86 darwin fixes to amd64 darwin hipe asm/m4 code
Automatically enable hipe for darwin/amd64 builds
Allow configure to enable_hipe for darwin/amd64 builds
OTP-8416 HiPE now works in the 64-bit emulator on Mac OS X. (Thanks to
Geoff Cant.)
|
|
Compared to GNU as, Mac OS X's assembler uses different directives for
text and global sections, and omits type and size directives
entirely. We also need to mangle symbol names in order to allow
linking with C object files.
|
|
|