aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips/MipsInstrInfo.td
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2007-11-12 19:49:57 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2007-11-12 19:49:57 +0000
commitea37730b1e060a50a6ac463c5fea7bf85de7015e (patch)
tree906d4cd1910f2512f4326665afdb3fabd9491ff5 /lib/Target/Mips/MipsInstrInfo.td
parent300766ddcd3dacbb8c219b9a11e229d55298c7bd (diff)
downloadexternal_llvm-ea37730b1e060a50a6ac463c5fea7bf85de7015e.zip
external_llvm-ea37730b1e060a50a6ac463c5fea7bf85de7015e.tar.gz
external_llvm-ea37730b1e060a50a6ac463c5fea7bf85de7015e.tar.bz2
Added JumpTable support
Fixed some AsmPrinter issues Added GLOBAL_OFFSET_TABLE Node handle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrInfo.td')
-rw-r--r--lib/Target/Mips/MipsInstrInfo.td8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsInstrInfo.td b/lib/Target/Mips/MipsInstrInfo.td
index c6fcaed..3d7504b 100644
--- a/lib/Target/Mips/MipsInstrInfo.td
+++ b/lib/Target/Mips/MipsInstrInfo.td
@@ -274,13 +274,13 @@ class JumpFR<bits<6> op, bits<6> func, string instr_asm>:
(outs),
(ins CPURegs:$target),
!strconcat(instr_asm, " $target"),
- [], IIBranch>;
+ [(brind CPURegs:$target)], IIBranch>;
// Jump and Link (Call)
let isCall=1, hasDelaySlot=1,
// All calls clobber the non-callee saved registers...
Defs = [AT, V0, V1, A0, A1, A2, A3, T0, T1, T2,
- T3, T4, T5, T6, T7, T8, T9, K0, K1] in {
+ T3, T4, T5, T6, T7, T8, T9, K0, K1], Uses = [GP] in {
class JumpLink<bits<6> op, string instr_asm>:
FJ< op,
(outs),
@@ -518,6 +518,10 @@ def : Pat<(MipsHi tglobaladdr:$in), (LUi tglobaladdr:$in)>;
def : Pat<(MipsLo tglobaladdr:$in), (ADDiu ZERO, tglobaladdr:$in)>;
def : Pat<(add CPURegs:$hi, (MipsLo tglobaladdr:$lo)),
(ADDiu CPURegs:$hi, tglobaladdr:$lo)>;
+def : Pat<(MipsHi tjumptable:$in), (LUi tjumptable:$in)>;
+def : Pat<(MipsLo tjumptable:$in), (ADDiu ZERO, tjumptable:$in)>;
+def : Pat<(add CPURegs:$hi, (MipsLo tjumptable:$lo)),
+ (ADDiu CPURegs:$hi, tjumptable:$lo)>;
// Mips does not have not, so we increase the operation
def : Pat<(not CPURegs:$in),