summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2015-05-11 14:25:43 +0200
committerTillmann Karras <tilkax@gmail.com>2015-05-14 18:59:05 +0200
commit9723a4e2edd016baa4d6f0fc23e84a631b62d6b1 (patch)
tree7be608d8eb79814cdb8499464018f78b6461f837 /Source/Core
parent8290fa1e462236115772b7498fe8032792a3ee5c (diff)
Interpreter: use IntDouble instead of casts
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h
index efd0ddc68d..5742b348e4 100644
--- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h
+++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h
@@ -76,9 +76,9 @@ inline double ForceDouble(double d)
inline double Force25Bit(double d)
{
- u64 di = *(u64*)&d;
- di = (di & 0xFFFFFFFFF8000000ULL) + (di & 0x8000000);
- return *(double*)&di;
+ MathUtil::IntDouble x(d);
+ x.i = (x.i & 0xFFFFFFFFF8000000ULL) + (x.i & 0x8000000);
+ return x.d;
}
// these functions allow globally modify operations behaviour