[llvm-commits] [llvm] r94693 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
Dale Johannesen
dalej at apple.com
Wed Jan 27 14:11:16 PST 2010
Author: johannes
Date: Wed Jan 27 16:11:16 2010
New Revision: 94693
URL: http://llvm.org/viewvc/llvm-project?rev=94693&view=rev
Log:
Treat MO_REG 0 location as undefined in DEBUG_VALUE,
per document.
Modified:
llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=94693&r1=94692&r2=94693&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Wed Jan 27 16:11:16 2010
@@ -428,10 +428,16 @@
O << V.getName();
O << " <- ";
if (NOps==3) {
- // Register or immediate value
+ // Register or immediate value. Register 0 means undef.
assert(MI->getOperand(0).getType()==MachineOperand::MO_Register ||
MI->getOperand(0).getType()==MachineOperand::MO_Immediate);
- printOperand(MI, 0);
+ if (MI->getOperand(0).getType()==MachineOperand::MO_Register &&
+ MI->getOperand(0).getReg()==0) {
+ // Suppress offset in this case, it is not meaningful.
+ O << "undef";
+ return;
+ } else
+ printOperand(MI, 0);
} else {
// Frame address. Currently handles register +- offset only.
assert(MI->getOperand(0).getType()==MachineOperand::MO_Register);
More information about the llvm-commits
mailing list