summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine/RuntimeDyld/AArch64
Commit message (Collapse)AuthorAgeFilesLines
* ExecutionEngine: add preliminary support for COFF ARM64Adam Kallai2019-11-201-0/+152
| | | | Differential Revision: https://reviews.llvm.org/D69434
* [lit] Delete empty lines at the end of lit.local.cfg NFCFangrui Song2019-06-171-1/+0
| | | | llvm-svn: 363538
* Simplify decoupling between RuntimeDyld/RuntimeDyldChecker, add 'got_addr' util.Lang Hames2019-04-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | This patch reduces the number of functions in the interface between RuntimeDyld and RuntimeDyldChecker by combining "GetXAddress" and "GetXContent" functions into "GetXInfo" functions that return a struct describing both the address and content. The GetStubOffset function is also replaced with a pair of utilities, GetStubInfo and GetGOTInfo, that fit the new scheme. For RuntimeDyld both of these functions will return the same result, but for the new JITLink linker (https://reviews.llvm.org/D58704) these will provide the addresses of PLT stubs and GOT entries respectively. For JITLink's use, a 'got_addr' utility has been added to the rtdyld-check language, and the syntax of 'got_addr' and 'stub_addr' has been changed: both functions now take two arguments, a 'stub container name' and a target symbol name. For llvm-rtdyld/RuntimeDyld the stub container name is the object file name and section name, separated by a slash. E.g.: rtdyld-check: *{8}(stub_addr(foo.o/__text, y)) = y For the upcoming llvm-jitlink utility, which creates stubs on a per-file basis rather than a per-section basis, the container name is just the file name. E.g.: jitlink-check: *{8}(got_addr(foo.o, y)) = y llvm-svn: 358295
* [RuntimeDyld][MachO] Add support for MachO::ARM64_RELOC_POINTER_TO_GOT reloc.Lang Hames2018-05-231-1/+11
| | | | llvm-svn: 333130
* [RuntimeDyld][MachO] Fix assertion in encodeAddend, add missing directive toLang Hames2018-03-011-0/+2
| | | | | | | | | | | | test case. r326290 fixed the assertion for decodeAddend, but not encodeAddend. The regression test failed to catch this because it was missing the subsections_via_symbols flag, so the desired relocation was not applied. This patch also fixes the formatting of the assertion from r326290. llvm-svn: 326406
* [RuntimeDyld][MachO] Support ARM64_RELOC_BRANCH26 for BL instructions byLang Hames2018-02-281-0/+7
| | | | | | relaxing an assertion. llvm-svn: 326290
* Revert "Revert "ExecutionEngine: add R_AARCH64_ABS{16,32}""Saleem Abdulrasool2017-09-201-2/+13
| | | | | | | | | | | This reverts commit SVN r313668. The original test case attempted to write a pointer value into 16-bits, although the value may exceed the range representable in 16-bits. Ensure that the symbol is located in the address space such that its absolute address is representable in 16-bits. This should fix the assertion failure that was seen on the Windows hosts. llvm-svn: 313822
* Revert "ExecutionEngine: add R_AARCH64_ABS{16,32}"Saleem Abdulrasool2017-09-191-13/+0
| | | | | | | | This reverts commit SVN r313654. Seems that it is triggering an assertion on Windows specifically. Revert until I can build on Windows and look into what is happening there. llvm-svn: 313668
* ExecutionEngine: add R_AARCH64_ABS{16,32}Saleem Abdulrasool2017-09-191-0/+13
| | | | | | | | | | Add support for the R_AARCH64_ABS{16,32} relocations in the execution engine. This is primarily used for DWARF debug information relocations and needed by the LLVM JIT to support JITing for lldb. Patch by Alex Langford! llvm-svn: 313654
* [AsmParser] Recommit: Hash is not a comment on some targetsOliver Stannard2017-08-211-1/+1
| | | | | | | | | | | | | | | Re-committing after r311325 fixed an unintentional use of '#' comments in clang. The '#' token is not a comment for all targets (on ARM and AArch64 it marks an immediate operand), so we shouldn't treat it as such. Comments are already converted to AsmToken::EndOfStatement by AsmLexer::LexLineComment, so this check was unnecessary. Differential Revision: https://reviews.llvm.org/D36405 llvm-svn: 311326
* [llvm] Get rid of "%T" expansionsKuba Mracek2017-08-155-10/+12
| | | | | | | | | | The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in llvm. Differential Revision: https://reviews.llvm.org/D36495 llvm-svn: 310953
* Revert "[AsmParser] Hash is not a comment on some targets"Ahmed Bougacha2017-08-101-1/+1
| | | | | | | | This reverts commit r310457. It causes clang-produced IR to fail llvm codegen. llvm-svn: 310662
* [AsmParser] Hash is not a comment on some targetsOliver Stannard2017-08-091-1/+1
| | | | | | | | | | | | The '#' token is not a comment for all targets (on ARM and AArch64 it marks an immediate operand), so we shouldn't treat it as such. Comments are already converted to AsmToken::EndOfStatement by AsmLexer::LexLineComment, so this check was unnecessary. Differential Revision: https://reviews.llvm.org/D36405 llvm-svn: 310457
* Don't pass the code model to MCRafael Espindola2017-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I was surprised to see the code model being passed to MC. After all, it assembles code, it doesn't create it. The one place it is used is in the expansion of .cfi directives to handle .eh_frame being more that 2gb away from the code. As far as I can tell, gnu assembler doesn't even have an option to enable this. Compiling a c file with gcc -mcmodel=large produces a regular looking .eh_frame. This is probably because in practice linker parse and recreate .eh_frames. In llvm this is used because the JIT can place the code and .eh_frame very far apart. Ideally we would fix the jit and delete this option. This is hard. Apart from confusion another problem with the current interface is that most callers pass CodeModel::Default, which is bad since MC has no way to map it to the target default if it actually needed to. This patch then replaces the argument with a boolean with a default value. The vast majority of users don't ever need to look at it. In fact, only CodeGen and llvm-mc use it and llvm-mc just to enable more testing. llvm-svn: 309884
* RuntimeDyldELF/AArch64: Implement basic GOT supportEugene Leviant2017-02-061-0/+46
| | | | | | | | | This patch implements two GOT relocations: R_AARCH64_ADR_GOT_PAGE and R_AARCH64_LD64_GOT_LO12_NC Differential revision: https://reviews.llvm.org/D28571 llvm-svn: 294191
* RuntimeDyldELF: add LDST128_ABS_LO12_NC relocEugene Leviant2017-01-231-0/+3
| | | | llvm-svn: 292788
* RuntimeDyldELF: add LDST8_ABS_LO12_NC and LDST16_ABS_LO12_NC relocsEugene Leviant2017-01-231-3/+9
| | | | | | Differential revision: https://reviews.llvm.org/D28863 llvm-svn: 292785
* RuntimeDyldELF: implement R_AARCH64_PREL64 relocEugene Leviant2017-01-102-1/+9
| | | | | | Differential revision: https://reviews.llvm.org/D28122 llvm-svn: 291558
* RuntimeDyldELF: add missing test cases for AArch64Eugene Leviant2017-01-092-3/+43
| | | | llvm-svn: 291438
* RuntimeDyldELF: don't create thunk if not neededEugene Leviant2017-01-091-0/+14
| | | | | | | | | | | | | This patch doesn't create thunk for branch operation when following conditions are met: - Architecture is AArch64 - Relocation target is in the same object file - Relocation target is close enough to be encoded in immediate offset In such case we branch directly to the target instead of branching to thunk Differential revision: https://reviews.llvm.org/D28108 llvm-svn: 291431
* RuntimeDyldELF: add R_AARCH64_ADD_ABS_LO12_NC relocEugene Leviant2016-12-271-0/+7
| | | | | | Differential revision: https://reviews.llvm.org/D28115 llvm-svn: 290598
* Fix R_AARCH64_MOVW_UABS_G3 relocationYichao Yu2016-12-152-0/+67
| | | | | | | | | | | | Summary: The relocation is missing mask so an address that has non-zero bits in 47:43 may overwrite the register number. (Frequently shows up as target register changed to `xzr`....) Reviewers: t.p.northover, lhames Subscribers: davide, aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D27609 llvm-svn: 289880
* Don't pass relocation-model= to tests that don't need it.Rafael Espindola2016-05-181-1/+1
| | | | | | | Very few things in MC itself use the option. Most of the code that that uses it could be move to CodeGen. llvm-svn: 269871
* [RuntimeDyld][AArch64] Add support for the MachO ARM64_RELOC_SUBTRACTOR reloc.Lang Hames2016-01-211-0/+5
| | | | llvm-svn: 258438
* [RuntimeDyld][AArch64] Add explicit addends before calling relocationValueRef.Lang Hames2015-08-111-0/+12
| | | | | | relocationValueRef uses the addend, so it has to be set before the call. llvm-svn: 244574
* [MCJIT] Defer application of AArch64 MachO GOT relocations until resolve time.Lang Hames2014-10-211-1/+1
| | | | | | | | | | On AArch64, GOT references are page relative (ADRP + LDR), so they can't be applied until we know exactly where, within a page, the GOT entry will be in the target address space. Fixes <rdar://problem/18693976>. llvm-svn: 220347
* [MCJIT] Temporarily revert r220245 - it broke several bots.Lang Hames2014-10-211-5/+0
| | | | | | (See e.g. http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/17653) llvm-svn: 220249
* [MCJIT] Make MCJIT honor symbol visibility settings when populating the globalLang Hames2014-10-201-0/+5
| | | | | | | | symbol table. Patch by Anthony Pesch. Thanks Anthony! llvm-svn: 220245
* [mips] Remove XFAIL from two XPASS'ing tests on the llvm-mips-linux builderDaniel Sanders2014-10-031-1/+0
| | | | llvm-svn: 218967
* [MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properlyLang Hames2014-07-291-0/+1
| | | | | | endian-aware yet, and this is causing failures when cross-linking on MIPS. llvm-svn: 214231
* [MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather thanLang Hames2014-07-291-6/+4
| | | | | | | | | | full paths for its first argument. This allows us to remove the annoying sed lines in the test cases, and write direct references to file names in stub_addr calls (rather than <filename> placeholders). llvm-svn: 214211
* [RuntimeDyld][AArch64] Make encode/decodeAddend also work on big-endian hosts.Juergen Ributzka2014-07-291-1/+0
| | | | llvm-svn: 214205
* [MCJIT] Remove extraneous parentheses in test case.Lang Hames2014-07-281-2/+2
| | | | llvm-svn: 214117
* [RuntimeDyld][AArch64] Update relocation tests and also add a simple GOT test.Juergen Ributzka2014-07-231-25/+40
| | | | llvm-svn: 213807
* XFAIL the test on MIPSJuergen Ributzka2014-07-221-0/+1
| | | | | | Not sure how to debug this one without a MIPS machine. Any takers? llvm-svn: 213705
* [RuntimeDyld][MachO][AArch64] Add a helper function for encoding addends in ↵Juergen Ributzka2014-07-222-0/+57
instructions. Factor out the addend encoding into a helper function and simplify the processRelocationRef. Also add a few simple rtdyld tests. More tests to come once GOTs can be tested too. Related to <rdar://problem/17768539> llvm-svn: 213689
OpenPOWER on IntegriCloud