Age | Commit message (Collapse) | Author |
|
and correct the name of another, erroneously spelt, option in the process.
|
|
LLVM currently hard-codes these. Since it is desirable to be able to
change things like PCB layout without requiring a change to LLVM, we
export these as LLVM metadata, which can easily be used from LLVM to
make it independent of them.
|
|
Named types, except those for the records in the header files, have been
moved from elf*_format.hrl to elf_format.erl.
Also:
* Use lists instead of element/2-indexed tuples for ELF section and
symbol tables.
* Enable +warn_export_vars for hipe/llvm/ subdirectory and fix warning.
* Extract duplicated code in hipe_llvm module into help function
pp_dereference_type/3.
|
|
Since 3.7, LLVM sometimes generates SSE constants in a special constant
section with the requisite alignment (".rodata.cst16"). This broke
hipe_llvm since it assumed that all constants that were linked from the
text section were constants generated by hipe_llvm.
As this is the first time alignments larger than 8 have been required,
some small changes were required to hipe_consttab and
hipe_bifs:alloc_data/2. Note that hipe_bifs:alloc_data/2 still assumes
that erl_alloc will provide the requisite alignment.
|
|
This allows for much more robust interpretation of relocations, symbols
and sections in hipe_llvm_main, without the clunkiness of an abstract
interface between two internal modules that belong to the same subsystem
anyway.
|
|
|
|
|
|
The elf_format module was written in such a way that some of the
customisation to ELF-32 vs ELF-64 was made at compile-time and some of
it at run-time. As such it was not actually possible to read 32-bit
files with a module compiled for 64-bit support, or vice versa.
As the run-time selection uses some process dictionary ugliness, it was
removed, shifting all the customisation to be compile-time.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
In case of function calls with arguments that are passed to the stack,
the frame size of corresponding stack descriptors needs to be reduced by
the number of stack arguments. This commit fixes a bug in this
adjustment which was caused by an incorrect check.
|
|
Do not rely on MFA name for the arity of functions, since closures have
an extra argument. Instead, just use the length of the arguments list.
|
|
|