[llvm-commits] CVS: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp X86ATTAsmPrinter.cpp
Evan Cheng
evan.cheng at apple.com
Sat Feb 25 01:55:04 PST 2006
Changes in directory llvm/lib/Target/X86:
X86IntelAsmPrinter.cpp updated: 1.19 -> 1.20
X86ATTAsmPrinter.cpp updated: 1.26 -> 1.27
---
Log message:
Added an offset field to ConstantPoolSDNode.
---
Diffs of the changes: (+17 -32)
X86ATTAsmPrinter.cpp | 23 ++++++++---------------
X86IntelAsmPrinter.cpp | 26 +++++++++-----------------
2 files changed, 17 insertions(+), 32 deletions(-)
Index: llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.19 llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.20
--- llvm/lib/Target/X86/X86IntelAsmPrinter.cpp:1.19 Wed Feb 22 20:43:52 2006
+++ llvm/lib/Target/X86/X86IntelAsmPrinter.cpp Sat Feb 25 03:54:52 2006
@@ -175,23 +175,6 @@
O << " + " << DispSpec.getImmedValue();
O << "]";
return;
- } else if (BaseReg.isConstantPoolIndex()) {
- O << "[" << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_"
- << BaseReg.getConstantPoolIndex();
- if (forDarwin && TM.getRelocationModel() == Reloc::PIC)
- O << "-\"L" << getFunctionNumber() << "$pb\"";
-
- if (IndexReg.getReg()) {
- O << " + ";
- if (ScaleVal != 1)
- O << ScaleVal << "*";
- printOp(IndexReg);
- }
-
- if (DispSpec.getImmedValue())
- O << " + " << DispSpec.getImmedValue();
- O << "]";
- return;
}
O << "[";
@@ -213,6 +196,15 @@
if (NeedPlus)
O << " + ";
printOp(DispSpec, "mem");
+ } else if (DispSpec.isConstantPoolIndex()) {
+ O << "[" << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_"
+ << DispSpec.getConstantPoolIndex();
+ if (forDarwin && TM.getRelocationModel() == Reloc::PIC)
+ O << "-\"L" << getFunctionNumber() << "$pb\"";
+ if (DispSpec.getOffset())
+ O << " + " << DispSpec.getOffset();
+ O << "]";
+ return;
} else {
int DispVal = DispSpec.getImmedValue();
if (DispVal || (!BaseReg.getReg() && !IndexReg.getReg())) {
Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.26 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.27
--- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.26 Wed Feb 22 20:43:52 2006
+++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Sat Feb 25 03:54:52 2006
@@ -196,25 +196,18 @@
O << " + " << DispSpec.getImmedValue();
O << "]";
return;
- } else if (BaseReg.isConstantPoolIndex()) {
- O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_"
- << BaseReg.getConstantPoolIndex();
- if (forDarwin && TM.getRelocationModel() == Reloc::PIC)
- O << "-\"L" << getFunctionNumber() << "$pb\"";
- if (DispSpec.getImmedValue())
- O << "+" << DispSpec.getImmedValue();
- if (IndexReg.getReg()) {
- O << "(,";
- printOperand(MI, Op+2);
- if (ScaleVal != 1)
- O << "," << ScaleVal;
- O << ")";
- }
- return;
}
if (DispSpec.isGlobalAddress()) {
printOperand(MI, Op+3, "mem");
+ } else if (DispSpec.isConstantPoolIndex()) {
+ O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << "_"
+ << DispSpec.getConstantPoolIndex();
+ if (forDarwin && TM.getRelocationModel() == Reloc::PIC)
+ O << "-\"L" << getFunctionNumber() << "$pb\"";
+ if (DispSpec.getOffset())
+ O << "+" << DispSpec.getOffset();
+ return;
} else {
int DispVal = DispSpec.getImmedValue();
if (DispVal || (!IndexReg.getReg() && !BaseReg.getReg()))
More information about the llvm-commits
mailing list