diff options
author | Tim Northover <Tim.Northover@arm.com> | 2013-02-06 16:43:33 +0000 |
---|---|---|
committer | Tim Northover <Tim.Northover@arm.com> | 2013-02-06 16:43:33 +0000 |
commit | 8a06229c89f848bf742e2b88423d02558b7ca638 (patch) | |
tree | 199f15ef02b0e4e5077718feae6f418159dd965a /lib/Target/AArch64/AArch64InstrInfo.td | |
parent | 2e402d5b5f2fce8bfe29509cc771b9919946003b (diff) | |
download | llvm-8a06229c89f848bf742e2b88423d02558b7ca638.tar.gz llvm-8a06229c89f848bf742e2b88423d02558b7ca638.tar.bz2 llvm-8a06229c89f848bf742e2b88423d02558b7ca638.tar.xz |
Implement external weak (ELF) symbols on AArch64
Weakly defined symbols should evaluate to 0 if they're undefined at
link-time. This is impossible to do with the usual address generation
patterns, so we should use a literal pool entry to materlialise the
address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AArch64InstrInfo.td')
-rw-r--r-- | lib/Target/AArch64/AArch64InstrInfo.td | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/AArch64/AArch64InstrInfo.td b/lib/Target/AArch64/AArch64InstrInfo.td index 538d4bdb32..a9ff02ae0a 100644 --- a/lib/Target/AArch64/AArch64InstrInfo.td +++ b/lib/Target/AArch64/AArch64InstrInfo.td @@ -2409,8 +2409,10 @@ class A64I_LDRlitSimple<bits<2> opc, bit v, RegisterClass OutReg, "ldr\t$Rt, $Imm19", patterns, NoItinerary>; let mayLoad = 1 in { - def LDRw_lit : A64I_LDRlitSimple<0b00, 0b0, GPR32>; - def LDRx_lit : A64I_LDRlitSimple<0b01, 0b0, GPR64>; + def LDRw_lit : A64I_LDRlitSimple<0b00, 0b0, GPR32, + [(set (i32 GPR32:$Rt), (load constpool:$Imm19))]>; + def LDRx_lit : A64I_LDRlitSimple<0b01, 0b0, GPR64, + [(set (i64 GPR64:$Rt), (load constpool:$Imm19))]>; } def LDRs_lit : A64I_LDRlitSimple<0b00, 0b1, FPR32, |