aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-05 23:49:55 +0000
committerChris Lattner <sabre@nondot.org>2006-03-05 23:49:55 +0000
commitbbf1c72d51a77bf54c9c684b90a78e59f0b70b2f (patch)
treea22a8f54b1a53f89a25e105515a050093185f235 /lib
parent1566d18fe2f469839fd91fdbfd65e1d239aa99e6 (diff)
downloadexternal_llvm-bbf1c72d51a77bf54c9c684b90a78e59f0b70b2f.zip
external_llvm-bbf1c72d51a77bf54c9c684b90a78e59f0b70b2f.tar.gz
external_llvm-bbf1c72d51a77bf54c9c684b90a78e59f0b70b2f.tar.bz2
implement TII::insertNoop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.cpp5
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.h3
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td1
3 files changed, 8 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.cpp b/lib/Target/PowerPC/PPCInstrInfo.cpp
index 211a272..c7f33c8 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.cpp
+++ b/lib/Target/PowerPC/PPCInstrInfo.cpp
@@ -146,3 +146,8 @@ MachineInstr *PPCInstrInfo::commuteInstruction(MachineInstr *MI) const {
MI->getOperand(5).setImmedValue((MB-1) & 31);
return MI;
}
+
+void PPCInstrInfo::insertNoop(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MI) const {
+ BuildMI(MBB, MI, PPC::NOP, 0);
+}
diff --git a/lib/Target/PowerPC/PPCInstrInfo.h b/lib/Target/PowerPC/PPCInstrInfo.h
index f046e5d..b10de48 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.h
+++ b/lib/Target/PowerPC/PPCInstrInfo.h
@@ -46,6 +46,9 @@ public:
// rotate amt is zero. We also have to munge the immediates a bit.
virtual MachineInstr *commuteInstruction(MachineInstr *MI) const;
+ virtual void insertNoop(MachineBasicBlock &MBB,
+ MachineBasicBlock::iterator MI) const;
+
static unsigned invertPPCBranchOpcode(unsigned Opcode) {
switch (Opcode) {
default: assert(0 && "Unknown PPC branch opcode!");
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td
index 881b17a..dba64c1 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/lib/Target/PowerPC/PPCInstrInfo.td
@@ -229,7 +229,6 @@ let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler.
i32imm:$BROPC), "; SELECT_CC PSEUDO!", []>;
}
-
let isTerminator = 1, noResults = 1 in {
let isReturn = 1 in
def BLR : XLForm_2_ext<19, 16, 20, 0, 0, (ops), "blr", BrB, [(retflag)]>;