openal-soft/Alc/fpu_modes.h

26 lines
503 B
C
Raw Normal View History

#ifndef FPU_MODES_H
#define FPU_MODES_H
class FPUCtl {
2018-05-04 02:05:26 -07:00
#if defined(__GNUC__) && defined(HAVE_SSE)
unsigned int sse_state{};
2018-05-04 02:05:26 -07:00
#elif defined(HAVE___CONTROL87_2)
unsigned int state{};
unsigned int sse_state{};
2018-05-04 02:05:26 -07:00
#elif defined(HAVE__CONTROLFP)
unsigned int state{};
#endif
bool in_mode{};
public:
FPUCtl() noexcept;
~FPUCtl() { leave(); }
FPUCtl(const FPUCtl&) = delete;
FPUCtl& operator=(const FPUCtl&) = delete;
void leave() noexcept;
};
2018-11-11 14:56:25 -08:00
#endif /* FPU_MODES_H */