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:
34e3d0c
)
Make sure to promote single precision floats to double before extracting them
author
Jim Grosbach
<grosbach@apple.com>
Thu, 16 Sep 2010 17:37:30 +0000
(17:37 +0000)
committer
Jim Grosbach
<grosbach@apple.com>
Thu, 16 Sep 2010 17:37:30 +0000
(17:37 +0000)
from the APFloat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114096
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/ARM/ARMMCInstLower.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/ARM/ARMMCInstLower.cpp
b/lib/Target/ARM/ARMMCInstLower.cpp
index 8774010d89dcd83235c6554f61e5494d226dfd7f..404a73b95c77c3f5eec2b0e0bb314ceb92ce86c8 100644
(file)
--- a/
lib/Target/ARM/ARMMCInstLower.cpp
+++ b/
lib/Target/ARM/ARMMCInstLower.cpp
@@
-157,8
+157,10
@@
void ARMMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const {
MO.getBlockAddress()));
break;
case MachineOperand::MO_FPImmediate:
- MCOp =
- MCOperand::CreateFPImm(MO.getFPImm()->getValueAPF().convertToDouble());
+ APFloat Val = MO.getFPImm()->getValueAPF();
+ bool ignored;
+ Val.convert(APFloat::IEEEdouble, APFloat::rmTowardZero, &ignored);
+ MCOp = MCOperand::CreateFPImm(Val.convertToDouble());
break;
}