🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
657 B

#ifndef FPU_MODES_H
#define FPU_MODES_H
class FPUCtl {
#if defined(HAVE_SSE_INTRINSICS) || (defined(__GNUC__) && defined(HAVE_SSE))
unsigned int sse_state{};
#endif
bool in_mode{};
public:
FPUCtl();
/* HACK: 32-bit targets for GCC seem to have a problem here with certain
* noexcept methods (which destructors are) causing an internal compiler
* error. No idea why it's these methods specifically, but this is needed
* to get it to compile.
*/
~FPUCtl() noexcept(false) { leave(); }
FPUCtl(const FPUCtl&) = delete;
FPUCtl& operator=(const FPUCtl&) = delete;
void leave();
};
#endif /* FPU_MODES_H */