[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Jim Laskey
jlaskey at apple.com
Wed Aug 17 02:45:11 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.164 -> 1.165
---
Log message:
Change hex float constants for the sake of VC++.
---
Diffs of the changes: (+4 -1)
LegalizeDAG.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.164 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.165
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.164 Tue Aug 16 19:39:29 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Aug 17 04:44:59 2005
@@ -204,7 +204,10 @@
SDOperand Load = DAG.getLoad(MVT::f64, Store2, StackSlot,
DAG.getSrcValue(NULL));
// FP constant to bias correct the final result
- SDOperand Bias = DAG.getConstantFP(isSigned ? 0x1.000008p52 : 0x1.000000p52,
+ uint64_t SignedBias = 0x4330000080000000ULL;
+ uint64_t UnsignedBias = 0x4330000000000000ULL;
+ SDOperand Bias = DAG.getConstantFP(isSigned ? *(double *)&SignedBias
+ : *(double *)&UnsignedBias,
MVT::f64);
// subtract the bias
SDOperand Sub = DAG.getNode(ISD::SUB, MVT::f64, Load, Bias);
More information about the llvm-commits
mailing list