aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2005-08-17 09:44:59 +0000
committerJim Laskey <jlaskey@mac.com>2005-08-17 09:44:59 +0000
commit491dfa88e48ac48b1dae0adf89d2ff77c828c735 (patch)
tree79c649f803231ebe69c76e4f50618422dd649931
parentc809b68357d6d41d91eb50febdb37df394e671bb (diff)
Change hex float constants for the sake of VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22828 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 56f93adf9f..ccef33eb89 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -204,7 +204,10 @@ SDOperand SelectionDAGLegalize::ExpandLegalINT_TO_FP(bool isSigned,
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);