diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-02-23 21:43:52 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-02-23 21:43:52 +0000 |
commit | facca1f04999cfaab8ac4d3ab64751040ee3bb23 (patch) | |
tree | fe7894f8dc4d4979f4d97ba2de7f2de2fcfc1be9 /llvm/lib/Target | |
parent | d3ba4103562ed1fe9672afe160d590ce18f92b02 (diff) | |
download | bcm5719-llvm-facca1f04999cfaab8ac4d3ab64751040ee3bb23.tar.gz bcm5719-llvm-facca1f04999cfaab8ac4d3ab64751040ee3bb23.zip |
SPARC: Implement TRAP lowering. Matches what GCC emits.
llvm-svn: 201994
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcISelLowering.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrInfo.td | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/SparcISelLowering.cpp b/llvm/lib/Target/Sparc/SparcISelLowering.cpp index 32c278b6689..2ac5b7e8c22 100644 --- a/llvm/lib/Target/Sparc/SparcISelLowering.cpp +++ b/llvm/lib/Target/Sparc/SparcISelLowering.cpp @@ -1567,6 +1567,8 @@ SparcTargetLowering::SparcTargetLowering(TargetMachine &TM) // VAARG needs to be lowered to not do unaligned accesses for doubles. setOperationAction(ISD::VAARG , MVT::Other, Custom); + setOperationAction(ISD::TRAP , MVT::Other, Legal); + // Use the default implementation. setOperationAction(ISD::VACOPY , MVT::Other, Expand); setOperationAction(ISD::VAEND , MVT::Other, Expand); diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.td b/llvm/lib/Target/Sparc/SparcInstrInfo.td index 94d2719d20e..ae10ca0bd41 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.td +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.td @@ -312,6 +312,9 @@ let hasSideEffects = 1, mayStore = 1 in { [(flushw)]>; } +let isBarrier = 1, isTerminator = 1, rd = 0b1000, rs1 = 0, simm13 = 5 in + def TA5 : F3_2<0b10, 0b111010, (outs), (ins), "ta 5", [(trap)]>; + let rd = 0 in def UNIMP : F2_1<0b000, (outs), (ins i32imm:$val), "unimp $val", []>; |