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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80485 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2009-08-30 06:17:49 +00:00
parent 7092c7e1dc
commit df65eafe5e

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;