Skip to content

Commit

Permalink
Merge pull request #3329 from lioncash/cast
Browse files Browse the repository at this point in the history
Interpreter: Get rid of some aliasing casts
  • Loading branch information
Tilka committed Dec 10, 2015
2 parents c829a01 + 392c133 commit 849bfc5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void Interpreter::fctiwx(UGeckoInstruction _inst)
// based on HW tests
// FPRF is not affected
riPS0(_inst.FD) = 0xfff8000000000000ull | value;
if (value == 0 && ( (*(u64*)&b) & DOUBLE_SIGN ))
if (value == 0 && std::signbit(b))
riPS0(_inst.FD) |= 0x100000000ull;
if (_inst.Rc)
Helper_UpdateCR1();
Expand Down Expand Up @@ -218,7 +218,7 @@ void Interpreter::fctiwzx(UGeckoInstruction _inst)
// based on HW tests
// FPRF is not affected
riPS0(_inst.FD) = 0xfff8000000000000ull | value;
if (value == 0 && ( (*(u64*)&b) & DOUBLE_SIGN ))
if (value == 0 && std::signbit(b))
riPS0(_inst.FD) |= 0x100000000ull;
if (_inst.Rc)
Helper_UpdateCR1();
Expand Down

0 comments on commit 849bfc5

Please sign in to comment.