rpcsx/rpcs3/Emu/Cell/Common.h
Nekotekina dfd50d0185 Implement std::bit_cast<>
Partial implementation of std::bit_cast from C++20.
Also fix most strict-aliasing rule break warnings (gcc).
2019-06-02 23:22:16 +03:00

17 lines
276 B
C++

#pragma once
// Floating-point rounding mode (for both PPU and SPU)
enum FPSCR_RN
{
FPSCR_RN_NEAR = 0,
FPSCR_RN_ZERO = 1,
FPSCR_RN_PINF = 2,
FPSCR_RN_MINF = 3,
};
// Get the exponent of a float
inline int fexpf(float x)
{
return (std::bit_cast<u32>(x) >> 23) & 0xff;
}