aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Sparc/SparcInstr64Bit.td
diff options
context:
space:
mode:
authorVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-09-22 06:48:52 +0000
committerVenkatraman Govindaraju <venkatra@cs.wisc.edu>2013-09-22 06:48:52 +0000
commit7d052f272d3f9ad0acdebf6811e29d529f70c1e1 (patch)
tree44ee51e39a3c57a8c9927963d604ba9304d759e5 /lib/Target/Sparc/SparcInstr64Bit.td
parent7d7db75a55319f1d21f0d8336744f90a81b87ac7 (diff)
downloadexternal_llvm-7d052f272d3f9ad0acdebf6811e29d529f70c1e1.zip
external_llvm-7d052f272d3f9ad0acdebf6811e29d529f70c1e1.tar.gz
external_llvm-7d052f272d3f9ad0acdebf6811e29d529f70c1e1.tar.bz2
[Sparc] Add support for TLS in sparc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/SparcInstr64Bit.td')
-rw-r--r--lib/Target/Sparc/SparcInstr64Bit.td9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcInstr64Bit.td b/lib/Target/Sparc/SparcInstr64Bit.td
index 47658ee..212bd1c 100644
--- a/lib/Target/Sparc/SparcInstr64Bit.td
+++ b/lib/Target/Sparc/SparcInstr64Bit.td
@@ -162,6 +162,9 @@ def : Pat<(subc i64:$a, i64:$b), (SUBCCrr $a, $b)>;
def : Pat<(SPcmpicc i64:$a, i64:$b), (CMPrr $a, $b)>;
+def : Pat<(tlsadd i64:$a, i64:$b, tglobaltlsaddr:$sym),
+ (TLS_ADDrr $a, $b, $sym)>;
+
// Register-immediate instructions.
def : Pat<(and i64:$a, (i64 simm13:$b)), (ANDri $a, (as_i32imm $b))>;
@@ -237,6 +240,12 @@ def LDXri : F3_2<3, 0b001011,
(outs I64Regs:$dst), (ins MEMri:$addr),
"ldx [$addr], $dst",
[(set i64:$dst, (load ADDRri:$addr))]>;
+let mayLoad = 1 in
+ def TLS_LDXrr : F3_1<3, 0b001011,
+ (outs IntRegs:$dst), (ins MEMrr:$addr, TLSSym:$sym),
+ "ldx [$addr], $dst, $sym",
+ [(set i64:$dst,
+ (tlsld ADDRrr:$addr, tglobaltlsaddr:$sym))]>;
// Extending loads to i64.
def : Pat<(i64 (zextloadi1 ADDRrr:$addr)), (LDUBrr ADDRrr:$addr)>;