aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/llvm/hipe_llvm_main.erl
AgeCommit message (Collapse)Author
2016-11-07hipe_llvm: Work around LLVM 3.9 sdesc bugMagnus Lång
As of LLVM 3.9, the x86-call-frame-opt pass in LLVM's X86 backend causes the stack descriptors to contain incorrect (or even negative) frame sizes or root slot offsets. This might cause LLVM-compiled modules to be rejected during loading with a badarg exception in hipe_bifs:enter_sdecs/1 (which additionally prints a "hipe_bifs_enter_sdesc_1: bad sdesc!" message to stderr), or it might cause corruption or segmentation faults when walking stacks (f.ex. during GC) containing frames compiled with ErLLVM. As a workaround, we pass the -no-x86-call-frame-opt flag to llc when the version is at least 3.9
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
2015-05-27Replace call to erlang:now() with appropriate call to 18.0 BIFKostis Sagonas
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-07Implement the LLVM backendYiannis Tsiouris