From ea37730b1e060a50a6ac463c5fea7bf85de7015e Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Mon, 12 Nov 2007 19:49:57 +0000 Subject: 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 --- lib/Target/Mips/MipsInstrInfo.td | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/Target/Mips/MipsInstrInfo.td') 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 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 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), -- cgit v1.1