llvm-mc/X86: Encode constant MCValue's correctly.

llvm-svn: 80485
This commit is contained in:
Daniel Dunbar 2009-08-30 06:17:49 +00:00
parent 6a715dccdf
commit 6e8b1a2530
1 changed files with 6 additions and 0 deletions

View File

@ -971,6 +971,12 @@ public:
if (!Op.isMCValue())
return false;
const MCValue &Val = Op.getMCValue();
if (Val.isAbsolute()) {
Instr->addOperand(MachineOperand::CreateImm(Val.getConstant()));
return true;
}
// FIXME: Relocation / fixup.
Instr->addOperand(MachineOperand::CreateImm(0));
return true;