[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp X86InstrBuilder.h X86IntelAsmPrinter.cpp X86RegisterInfo.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 4 10:21:37 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86ATTAsmPrinter.cpp updated: 1.40 -> 1.41
X86InstrBuilder.h updated: 1.18 -> 1.19
X86IntelAsmPrinter.cpp updated: 1.39 -> 1.40
X86RegisterInfo.cpp updated: 1.146 -> 1.147
---
Log message:
There shalt be only one "immediate" operand type!
---
Diffs of the changes: (+9 -11)
X86ATTAsmPrinter.cpp | 3 +--
X86InstrBuilder.h | 12 ++++++------
X86IntelAsmPrinter.cpp | 3 +--
X86RegisterInfo.cpp | 2 +-
4 files changed, 9 insertions(+), 11 deletions(-)
Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.40 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.41
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.40 Wed May 3 20:15:02 2006
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Thu May 4 12:21:20 2006
@@ -116,8 +116,7 @@
O << (char)tolower(*Name);
return;
- case MachineOperand::MO_SignExtendedImmed:
- case MachineOperand::MO_UnextendedImmed:
+ case MachineOperand::MO_Immediate:
if (!Modifier || strcmp(Modifier, "debug") != 0)
O << '$';
O << (int)MO.getImmedValue();
Index: llvm/lib/Target/X86/X86InstrBuilder.h
diff -u llvm/lib/Target/X86/X86InstrBuilder.h:1.18 llvm/lib/Target/X86/X86InstrBuilder.h:1.19
--- llvm/lib/Target/X86/X86InstrBuilder.h:1.18 Wed May 3 20:15:02 2006
+++ llvm/lib/Target/X86/X86InstrBuilder.h Thu May 4 12:21:20 2006
@@ -61,7 +61,7 @@
unsigned Reg) {
// Because memory references are always represented with four
// values, this adds: Reg, [1, NoReg, 0] to the instruction.
- return MIB.addReg(Reg).addZImm(1).addReg(0).addSImm(0);
+ return MIB.addReg(Reg).addZImm(1).addReg(0).addImm(0);
}
@@ -71,14 +71,14 @@
///
inline const MachineInstrBuilder &addRegOffset(const MachineInstrBuilder &MIB,
unsigned Reg, int Offset) {
- return MIB.addReg(Reg).addZImm(1).addReg(0).addSImm(Offset);
+ return MIB.addReg(Reg).addZImm(1).addReg(0).addImm(Offset);
}
/// addRegReg - This function is used to add a memory reference of the form:
/// [Reg + Reg].
inline const MachineInstrBuilder &addRegReg(const MachineInstrBuilder &MIB,
unsigned Reg1, unsigned Reg2) {
- return MIB.addReg(Reg1).addZImm(1).addReg(Reg2).addSImm(0);
+ return MIB.addReg(Reg1).addZImm(1).addReg(Reg2).addImm(0);
}
inline const MachineInstrBuilder &addFullAddress(const MachineInstrBuilder &MIB,
@@ -95,7 +95,7 @@
if (AM.GV)
return MIB.addGlobalAddress(AM.GV, AM.Disp);
else
- return MIB.addSImm(AM.Disp);
+ return MIB.addImm(AM.Disp);
}
/// addFrameReference - This function is used to add a reference to the base of
@@ -105,7 +105,7 @@
///
inline const MachineInstrBuilder &
addFrameReference(const MachineInstrBuilder &MIB, int FI, int Offset = 0) {
- return MIB.addFrameIndex(FI).addZImm(1).addReg(0).addSImm(Offset);
+ return MIB.addFrameIndex(FI).addZImm(1).addReg(0).addImm(Offset);
}
/// addConstantPoolReference - This function is used to add a reference to the
@@ -117,7 +117,7 @@
inline const MachineInstrBuilder &
addConstantPoolReference(const MachineInstrBuilder &MIB, unsigned CPI,
int Offset = 0) {
- return MIB.addConstantPoolIndex(CPI).addZImm(1).addReg(0).addSImm(Offset);
+ return MIB.addConstantPoolIndex(CPI).addZImm(1).addReg(0).addImm(Offset);
}
} // End llvm namespace
Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.39 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.40
--- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.39 Thu May 4 11:20:22 2006
+++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Thu May 4 12:21:20 2006
@@ -107,8 +107,7 @@
O << "reg" << MO.getReg();
return;
- case MachineOperand::MO_SignExtendedImmed:
- case MachineOperand::MO_UnextendedImmed:
+ case MachineOperand::MO_Immediate:
O << (int)MO.getImmedValue();
return;
case MachineOperand::MO_MachineBasicBlock:
Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.146 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.147
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.146 Wed May 3 20:15:02 2006
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Thu May 4 12:21:20 2006
@@ -676,7 +676,7 @@
else
Offset += 4; // Skip the saved EBP
- MI.SetMachineOperandConst(i+3, MachineOperand::MO_SignExtendedImmed, Offset);
+ MI.SetMachineOperandConst(i+3, MachineOperand::MO_Immediate, Offset);
}
void
More information about the llvm-commits
mailing list