diff options
| author | Tim Northover <Tim.Northover@arm.com> | 2013-05-04 16:53:46 +0000 |
|---|---|---|
| committer | Tim Northover <Tim.Northover@arm.com> | 2013-05-04 16:53:46 +0000 |
| commit | 2dbef3452c825226aab225b8c0d8c8563583e2fb (patch) | |
| tree | 43f4ef4b8b9c67f2ff45a2913fbf0c9c775dc2db /llvm/lib/Target/AArch64/Utils | |
| parent | df9e5741059dd9b22cd8fd69f855bfd0b9b63f38 (diff) | |
| download | bcm5719-llvm-2dbef3452c825226aab225b8c0d8c8563583e2fb.tar.gz bcm5719-llvm-2dbef3452c825226aab225b8c0d8c8563583e2fb.zip | |
AArch64: implement large code model access to global variables.
The MOVZ/MOVK instruction sequence may not be the most efficient (a
literal-pool load could be better) but adding that would require
reinstating the ConstantIslands pass.
For now the sequence is correct, and that's enough. Beware, as of
commit GNU ld does not appear to support the relocations needed for
this. Its primary purpose (for now) will be to support JITed code,
since in that case there is no guarantee of where your code will end
up in memory relative to external symbols it references.
llvm-svn: 181117
Diffstat (limited to 'llvm/lib/Target/AArch64/Utils')
| -rw-r--r-- | llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h index 1b773d632eb..9a1ca6127ae 100644 --- a/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h +++ b/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h @@ -1037,7 +1037,14 @@ namespace AArch64II { // MO_LO12 - On a symbol operand, this represents a relocation containing // lower 12 bits of the address. Used in add/sub/ldr/str. - MO_LO12 + MO_LO12, + + // MO_ABS_G* - Represent the 16-bit granules of an absolute reference using + // movz/movk instructions. + MO_ABS_G3, + MO_ABS_G2_NC, + MO_ABS_G1_NC, + MO_ABS_G0_NC }; } |

