Age | Commit message (Collapse) | Author |
|
|
|
|
|
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
|
|
|
|
* sverk/hipe-inline-reserve-trap-frame:
erts: Extend usage of ASM macro to avoid including asm macros in C code
erts: Make hipe_{un}reserve_beam_trap_frame INLINE
|
|
and reduce the probability of macro name collisions
Catalyst: ppc macro "r0" conflicting with local variable in external.c
|
|
Make hipe to beam calls use export entry.
Makes it a lot easier to handle global tracing correctly
(breakpoints in export entry). A beam function should now be traced
correctly regardless how it is called.
This will also fix a SEGV crash when a hipe stub is made pointing into
a traced export entry and tracing is then stopped which clears the export
entry causing the hipe stub to execute beam instruction NULL.
This commit assumes that hipe code never calls local beam functions, which
should be the case nowadays as we only hipe compile entire modules.
|
|
|
|
|
|
In the HiPE part of the runtime system's Process struct
there is a state field which is 32 bits wide even on 64-bit
machines.
There is a single instruction in the HiPE AMD64 runtime
where this field is incorrectly written with a 64-bit store.
Luckily the extraneous 32 bits are written as zeros to 4
bytes of tail-padding at the end of the struct, so nothing
should have broken because of this.
The same bug exists in the HiPE PowerPC64 runtime (in
development), but on the big-endian PPC64 the effect is
to write the actual value to the tail-padding and zero
to the struct field, which potentially breaks TRAPs from
BIFs (depending on BIF arities and how many parameter
registers the runtime has been configured to use).
Thanks to Paul Guyot for noticing the oversized write on AMD64.
|
|
R12B-0 changed the signature of erts_gc_after_bif_call and it now
takes 4 parameters instead of 2 in R11B-5. Yet, the glue code was not
updated accordingly. As a result, the function erts_gc_after_bif_call
was called with garbage and would randomly cause a crash later in the
garbage collector code.
The fix consists in passing NULL and 0 for the third and fourth
parameters, since there is no term to add to rootset, recovering the
behaviour of R11B-5
(see otp_src_R11B-5/erts/emulator/beam/erl_gc.c, line 314).
(Includes assembly language fixes and code style improvements
suggested by Mikael Pettersson.)
|
|
|