rpcsx/rpcs3/Emu/Cell/Common.h

25 lines
329 B
C
Raw Normal View History

2015-01-19 03:19:10 +09:00
#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)
{
2019-05-10 20:24:14 +03:00
union
{
char data[4];
u32 data32;
float arg;
};
arg = x;
return (data32 >> 23) & 0xFF;
}