diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2013-05-20 18:07:43 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2013-05-20 18:07:43 +0000 |
commit | f894199a14fff1399f6ee9d78c6a601d86649155 (patch) | |
tree | ee79d0a41679fe70d5b58e34140d0ec43dcbdc4c /lib/Target/Mips/MipsInstrFormats.td | |
parent | 08f92c98ac1cdb43ec35653536c89964401d936c (diff) | |
download | llvm-f894199a14fff1399f6ee9d78c6a601d86649155.tar.gz llvm-f894199a14fff1399f6ee9d78c6a601d86649155.tar.bz2 llvm-f894199a14fff1399f6ee9d78c6a601d86649155.tar.xz |
[mips] Trap on integer division by zero.
By default, a teq instruction is inserted after integer divide. No divide-by-zero
checks are performed if option "-mnocheck-zero-division" is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182306 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsInstrFormats.td')
-rw-r--r-- | lib/Target/Mips/MipsInstrFormats.td | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsInstrFormats.td b/lib/Target/Mips/MipsInstrFormats.td index ea07372221..14cfcf96d3 100644 --- a/lib/Target/Mips/MipsInstrFormats.td +++ b/lib/Target/Mips/MipsInstrFormats.td @@ -476,6 +476,20 @@ class RDHWR_FM { let Inst{5-0} = 0x3b; } +class TEQ_FM<bits<6> funct> { + bits<5> rs; + bits<5> rt; + bits<10> code_; + + bits<32> Inst; + + let Inst{31-26} = 0; + let Inst{25-21} = rs; + let Inst{20-16} = rt; + let Inst{15-6} = code_; + let Inst{5-0} = funct; +} + //===----------------------------------------------------------------------===// // // FLOATING POINT INSTRUCTION FORMATS |