AArch64: implement large code model access to global variables.
authorTim Northover <Tim.Northover@arm.com>
Sat, 4 May 2013 16:53:46 +0000 (16:53 +0000)
committerTim Northover <Tim.Northover@arm.com>
Sat, 4 May 2013 16:53:46 +0000 (16:53 +0000)
commit45db92038bf540fbbd8dfe5dff520aa8566d7cef
treeca210cce14ab88407e790cc51f1718b98218cbfa
parent0c66f30325848014eda3203da5fae4c2e71a2884
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181117 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/AArch64/AArch64ISelLowering.h
lib/Target/AArch64/AArch64InstrInfo.td
lib/Target/AArch64/AArch64MCInstLower.cpp
lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h
lib/Target/AArch64/Utils/AArch64BaseInfo.h
test/CodeGen/AArch64/code-model-large-abs.ll [new file with mode: 0644]
test/CodeGen/AArch64/extern-weak.ll