Age | Commit message (Collapse) | Author |
|
Currently HiPE amd64 assumes the runtime system code is loaded into
the low 2G of the address space. However, this is not the case when
PIE is enabled, it is loaded into a random location. So trampolines
are required to call BIFs, and also we have first to load the address
of sse2_fnegate_mask to a regisiter before xorpd in fchs.
|
|
hipe: Fix alignment of byte-sized constants
|
|
|
|
|
|
|
|
Also, use byte form for immediates up to 255, since there's no sign
extension in byte form.
HiPE seems to never generate negative test immediates currently, but we
should at least not output incorrect encodings.
|
|
|
|
|
|
Main problem:
A faulty HIPE_LITERAL_CRC was not detected by the loader.
Strangeness #1:
Dialyzer should ask the hipe compiler about the target checksum,
not an internal bif.
Strangeness #2:
The HIPE_SYSTEM_CRC checksum was based on the HIPE_LITERALS_CRC
checksum.
Solution:
New HIPE_ERTS_CHECKSUM which is an bxor of the two (now independent)
HIPE_LITERALS_CRC and HIPE_SYSTEM_CRC.
HIPE_LITERALS_CRC represents values that are assumed to stay constant
for different VM configurations of the same arch, and are therefor
hard coded into the hipe compiler.
HIPE_SYSTEM_CRC represents values that may differ between VM variants.
By default the hipe compiler asks the running VM for this checksum,
in order to create beam files for the same running VM.
The hipe compiler can be configured (with "make XCOMP=yes ...") to
create beam files for another VM variant, in which case HIPE_SYSTEM_CRC
is also hard coded.
ToDo:
Treat all erts properties the same. Either ask the running VM or hard
coded into hipe (if XCOMP=yes). This will simplify and reduce the risk
of dangerous mismatches. One concern might be the added overhead
from more frequent calls to hipe_bifs:get_rts_param.
|
|
|
|
All backends (e.g. arm, ppc, sparc, x86) share the same code for the following
functions:
* find_const/2,
* mk_data_relocs/2, and
* slim_sorted_exportmap/3
This commit moves those definitions (along with some helper functions) in
misc/hipe_pack_constants.erl and adds the appropriate specs. This is a
structural change; no change in semantics intented.
|
|
|
|
|