aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/llvm
AgeCommit message (Collapse)Author
2016-05-26hipe_llvm: Export hipe literals as LLVM metadataMagnus Lång
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.
2016-05-18hipe_llvm: Move elf_format.hrl types to moduleMagnus Lång
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.
2016-05-11hipe_llvm: Allow LLVM-generated constantsMagnus Lång
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.
2016-05-11hipe: Extract some records into elf_format.hrlMagnus Lång
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.
2016-05-10hipe: Restructure elf_format moduleMagnus Lång
2016-05-09hipe: Cleanup elf_format moduleMagnus Lång
2016-05-09hipe: Remove runtime elf_format class switchingMagnus Lång
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.
2016-05-04hipe_llvm: Syntax compatibility with 3.7-3.8Magnus Lång
2016-03-15update copyright-yearHenrik Nord
2015-08-31erts,hipe,dialyzer: Fix hipe checkum of target runtime systemSverker Eriksson
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.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-27Replace call to erlang:now() with appropriate call to 18.0 BIFKostis Sagonas
2014-11-07Fix typo in llvm/elf_format.hrlGarret Smith
2014-03-30Fix frame size adjustment of stack descriptorsYiannis Tsiouris
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.
2014-03-30Fix counting of arguments of closuresChristos Stavrakakis
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.
2014-03-07Implement the LLVM backendYiannis Tsiouris