[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 18 10:19:34 PDT 2004
Changes in directory llvm/include/llvm/CodeGen:
MachineInstr.h updated: 1.155 -> 1.156
---
Log message:
Fix miscompilations in the SparcV9 backend that were induced by this patch:
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041011/019311.html
---
Diffs of the changes: (+12 -2)
Index: llvm/include/llvm/CodeGen/MachineInstr.h
diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.155 llvm/include/llvm/CodeGen/MachineInstr.h:1.156
--- llvm/include/llvm/CodeGen/MachineInstr.h:1.155 Thu Oct 14 23:38:36 2004
+++ llvm/include/llvm/CodeGen/MachineInstr.h Mon Oct 18 12:19:20 2004
@@ -153,10 +153,20 @@
}
MachineOperand(Value *V, MachineOperandType OpTy, UseType UseTy,
+ bool isPCRelative = false)
+ : flags(UseTy | (isPCRelative?PCRELATIVE:0)), opType(OpTy) {
+ assert(OpTy != MachineOperand::MO_GlobalAddress);
+ zeroContents();
+ contents.value = V;
+ extra.regNum = -1;
+ }
+
+ MachineOperand(GlobalValue *V, MachineOperandType OpTy, UseType UseTy,
bool isPCRelative = false, int Offset = 0)
: flags(UseTy | (isPCRelative?PCRELATIVE:0)), opType(OpTy) {
+ assert(OpTy == MachineOperand::MO_GlobalAddress);
zeroContents ();
- contents.value = V;
+ contents.value = (Value*)V;
extra.offset = Offset;
}
@@ -642,7 +652,7 @@
assert(!OperandsComplete() &&
"Trying to add an operand to a machine instr that is already done!");
operands.push_back(
- MachineOperand((Value*)GV, MachineOperand::MO_GlobalAddress,
+ MachineOperand(GV, MachineOperand::MO_GlobalAddress,
MachineOperand::Use, isPCRelative, Offset));
}
More information about the llvm-commits
mailing list