summaryrefslogtreecommitdiff
path: root/lib/Target/NVPTX/NVPTXInstrInfo.td
diff options
context:
space:
mode:
authorJustin Holewinski <jholewinski@nvidia.com>2013-08-06 14:13:31 +0000
committerJustin Holewinski <jholewinski@nvidia.com>2013-08-06 14:13:31 +0000
commita3635eefc749389aed84d9791fab657297203e1b (patch)
tree613f5d28fe902b437c84eebdf89c60eb5f60c9ce /lib/Target/NVPTX/NVPTXInstrInfo.td
parent82767327c59ede1f8663ec9b9a64a668993d501f (diff)
downloadllvm-a3635eefc749389aed84d9791fab657297203e1b.tar.gz
llvm-a3635eefc749389aed84d9791fab657297203e1b.tar.bz2
llvm-a3635eefc749389aed84d9791fab657297203e1b.tar.xz
[NVPTX] Fix bug in stack code generation causes by MC conversion
We do use a very small set of physical registers, so account for them in the virtual register encoding between MachineInstr and MC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187799 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/NVPTX/NVPTXInstrInfo.td')
-rw-r--r--lib/Target/NVPTX/NVPTXInstrInfo.td9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/NVPTX/NVPTXInstrInfo.td b/lib/Target/NVPTX/NVPTXInstrInfo.td
index 8ce16e9d1c..db91eb0052 100644
--- a/lib/Target/NVPTX/NVPTXInstrInfo.td
+++ b/lib/Target/NVPTX/NVPTXInstrInfo.td
@@ -1321,6 +1321,15 @@ def MOV_ADDR64 : NVPTXInst<(outs Int64Regs:$dst), (ins imem:$a),
"mov.u64 \t$dst, $a;",
[(set Int64Regs:$dst, (Wrapper tglobaladdr:$a))]>;
+// Get pointer to local stack
+def MOV_DEPOT_ADDR
+ : NVPTXInst<(outs Int32Regs:$d), (ins i32imm:$num),
+ "mov.u32 \t$d, __local_depot$num;", []>;
+def MOV_DEPOT_ADDR_64
+ : NVPTXInst<(outs Int64Regs:$d), (ins i32imm:$num),
+ "mov.u64 \t$d, __local_depot$num;", []>;
+
+
// copyPhysreg is hard-coded in NVPTXInstrInfo.cpp
let IsSimpleMove=1 in {
def IMOV1rr: NVPTXInst<(outs Int1Regs:$dst), (ins Int1Regs:$sss),