projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7092c7e
)
llvm-mc/X86: Encode constant MCValue's correctly.
author
Daniel Dunbar
<daniel@zuster.org>
Sun, 30 Aug 2009 06:17:49 +0000
(06:17 +0000)
committer
Daniel Dunbar
<daniel@zuster.org>
Sun, 30 Aug 2009 06:17:49 +0000
(06:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80485
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/X86/X86CodeEmitter.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/X86/X86CodeEmitter.cpp
b/lib/Target/X86/X86CodeEmitter.cpp
index d4d43af84fbdbe261267c756706876490ac7dce3..0c472a725bcd21d1f45e0e9291dde1b39e86ce0e 100644
(file)
--- a/
lib/Target/X86/X86CodeEmitter.cpp
+++ b/
lib/Target/X86/X86CodeEmitter.cpp
@@
-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;