summaryrefslogtreecommitdiff
path: root/src/vm/jithelpers.cpp
diff options
context:
space:
mode:
authorHyeongseok Oh <hseok82.oh@smasung.com>2016-08-26 13:24:02 +0900
committerHyeongseok Oh <hseok82.oh@smasung.com>2016-08-26 13:24:02 +0900
commit8c21c23d979ff55075f0a2ec00d98c1acb7f041f (patch)
tree8117363b8cfc02aa9833ac0756ba1bbf72ec495b /src/vm/jithelpers.cpp
parent3ed59739b770dbafb494d06ea5a0a314974542b3 (diff)
downloadcoreclr-8c21c23d979ff55075f0a2ec00d98c1acb7f041f.tar.gz
coreclr-8c21c23d979ff55075f0a2ec00d98c1acb7f041f.tar.bz2
coreclr-8c21c23d979ff55075f0a2ec00d98c1acb7f041f.zip
modify gtFoldExprConst for casting to integer from floating point overflow
Diffstat (limited to 'src/vm/jithelpers.cpp')
-rw-r--r--src/vm/jithelpers.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/vm/jithelpers.cpp b/src/vm/jithelpers.cpp
index d3620780ed..276c2d6c58 100644
--- a/src/vm/jithelpers.cpp
+++ b/src/vm/jithelpers.cpp
@@ -613,7 +613,6 @@ HCIMPL1_V(UINT64, JIT_Dbl2ULng, double val)
const double two63 = 2147483648.0 * 4294967296.0;
UINT64 ret;
-#ifdef _TARGET_XARCH_
if (val < two63) {
ret = FastDbl2Lng(val);
}
@@ -621,28 +620,6 @@ HCIMPL1_V(UINT64, JIT_Dbl2ULng, double val)
// subtract 0x8000000000000000, do the convert then add it back again
ret = FastDbl2Lng(val - two63) + I64(0x8000000000000000);
}
-#else
-// In x86/x64, conversion result of negative double to unsigned integer is
-// bit-equivalent unsigned value.
-// But other architecture's compiler convert negative doubles to zero when
-// the target is unsigned.
- if (!_finite(val)) {
- ret = UINT64(val);
- }
- else {
- if (val >= 0.0) {
- if (val < two63) {
- ret = UINT64(val);
- }
- else {
- ret = FastDbl2Lng(val - two63) + I64(0x8000000000000000);
- }
- }
- else {
- ret = UINT64(val);
- }
- }
-#endif
return ret;
}
HCIMPLEND