diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-07-16 14:07:50 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-07-16 14:07:50 +0000 |
commit | 23bf4415f797cc683e9a738fbaf545888dc45717 (patch) | |
tree | 7605d5c7b7966771fd232e0972953335bc1f8e9b /lib/Target/SystemZ/SystemZInstrInfo.td | |
parent | b74c8d38cb96afc8e060d880f33f64bde935fa8c (diff) | |
download | external_llvm-23bf4415f797cc683e9a738fbaf545888dc45717.zip external_llvm-23bf4415f797cc683e9a738fbaf545888dc45717.tar.gz external_llvm-23bf4415f797cc683e9a738fbaf545888dc45717.tar.bz2 |
Add jump tables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZInstrInfo.td')
-rw-r--r-- | lib/Target/SystemZ/SystemZInstrInfo.td | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/Target/SystemZ/SystemZInstrInfo.td b/lib/Target/SystemZ/SystemZInstrInfo.td index 469fcfe6..688cb0a 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.td +++ b/lib/Target/SystemZ/SystemZInstrInfo.td @@ -96,13 +96,11 @@ let isReturn = 1, isTerminator = 1, isBarrier = 1, hasCtrlDep = 1 in { } let isBranch = 1, isTerminator = 1 in { - let isBarrier = 1 in + let isBarrier = 1 in { def JMP : Pseudo<(outs), (ins brtarget:$dst), "j\t{$dst}", [(br bb:$dst)]>; - let isBarrier = 1, isIndirectBranch = 1 in { - def JMPr : Pseudo<(outs), (ins GR64:$dst), "br\t{$dst}", [(brind GR64:$dst)]>; - // FIXME: displacement here is 12 bits - def JMPrri : Pseudo<(outs), (ins rriaddr:$dst), "b\t{$dst}", [(brind rriaddr:$dst)]>; + let isIndirectBranch = 1 in + def JMPr : Pseudo<(outs), (ins GR64:$dst), "br\t{$dst}", [(brind GR64:$dst)]>; } let Uses = [PSW] in { @@ -699,10 +697,17 @@ def UCMPZX64rm32 : Pseudo<(outs), (ins GR64:$src1, rriaddr:$src2), // Non-Instruction Patterns. //===----------------------------------------------------------------------===// +// JumpTable +def : Pat<(SystemZpcrelwrapper tjumptable:$src), (LA64rm tjumptable:$src)>; + // anyext def : Pat<(i64 (anyext GR32:$src)), (INSERT_SUBREG (i64 (IMPLICIT_DEF)), GR32:$src, subreg_32bit)>; +// calls +def : Pat<(SystemZcall (i64 tglobaladdr:$dst)), (CALLi tglobaladdr:$dst)>; +def : Pat<(SystemZcall (i64 texternalsym:$dst)), (CALLi texternalsym:$dst)>; + //===----------------------------------------------------------------------===// // Peepholes. //===----------------------------------------------------------------------===// @@ -728,12 +733,6 @@ def : Pat<(extloadi64i8 rriaddr:$src), (MOVZX64rm8 rriaddr:$src)>; def : Pat<(extloadi64i16 rriaddr:$src), (MOVZX64rm16 rriaddr:$src)>; def : Pat<(extloadi64i32 rriaddr:$src), (MOVZX64rm32 rriaddr:$src)>; -// calls -def : Pat<(SystemZcall (i64 tglobaladdr:$dst)), - (CALLi tglobaladdr:$dst)>; -def : Pat<(SystemZcall (i64 texternalsym:$dst)), - (CALLi texternalsym:$dst)>; - // muls def : Pat<(mulhs GR32:$src1, GR32:$src2), (EXTRACT_SUBREG (MUL64rrP (INSERT_SUBREG (i64 (IMPLICIT_DEF)), |