Skip to content

Commit

Permalink
Interpreter_FPUtils: Get rid of a pointer cast
Browse files Browse the repository at this point in the history
This is undefined behavior according to the standard. We can just use
the built in means of retrieving a quiet NaN.
  • Loading branch information
lioncash committed Mar 24, 2018
1 parent 5369d3c commit 27611d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/Core/Core/PowerPC/Interpreter/Interpreter_FPUtils.h
Expand Up @@ -13,8 +13,7 @@
#include "Core/PowerPC/Gekko.h"
#include "Core/PowerPC/PowerPC.h"

const u64 PPC_NAN_U64 = 0x7ff8000000000000ull;
const double PPC_NAN = *(double* const) & PPC_NAN_U64;
constexpr double PPC_NAN = std::numeric_limits<double>::quiet_NaN();

// the 4 less-significand bits in FPSCR[FPRF]
enum FPCC
Expand Down

0 comments on commit 27611d5

Please sign in to comment.