summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsDelaySlotFiller.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2010-11-08 21:42:32 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2010-11-08 21:42:32 +0000
commit2c2304c62346e17f4963f6b609dc7ae6f8b91962 (patch)
tree3ac3d2ab4d6f643796f2a7c2f9cd1feb5bc2677b /lib/Target/Mips/MipsDelaySlotFiller.cpp
parent85c3f24da311ecb00d708bc95d52e4b48c9ecf84 (diff)
downloadllvm-2c2304c62346e17f4963f6b609dc7ae6f8b91962.tar.gz
llvm-2c2304c62346e17f4963f6b609dc7ae6f8b91962.tar.bz2
llvm-2c2304c62346e17f4963f6b609dc7ae6f8b91962.tar.xz
Initial support for Mips32 and Mips32r2. Patch contributed by Akira Hatanaka (ahatanaka@mips.com)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsDelaySlotFiller.cpp')
-rw-r--r--lib/Target/Mips/MipsDelaySlotFiller.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/Mips/MipsDelaySlotFiller.cpp b/lib/Target/Mips/MipsDelaySlotFiller.cpp
index 597ea0d6c2..9269e79840 100644
--- a/lib/Target/Mips/MipsDelaySlotFiller.cpp
+++ b/lib/Target/Mips/MipsDelaySlotFiller.cpp
@@ -59,7 +59,8 @@ runOnMachineBasicBlock(MachineBasicBlock &MBB)
{
bool Changed = false;
for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I)
- if (I->getDesc().hasDelaySlot()) {
+ if (TM.getSubtarget<MipsSubtarget>().isMips1() &&
+ I->getDesc().hasDelaySlot()) {
MachineBasicBlock::iterator J = I;
++J;
BuildMI(MBB, J, I->getDebugLoc(), TII->get(Mips::NOP));