🛠️🐜 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

  1. #ifndef FPU_MODES_H
  2. #define FPU_MODES_H
  3. class FPUCtl {
  4. #if defined(HAVE_SSE_INTRINSICS) || (defined(__GNUC__) && defined(HAVE_SSE))
  5. unsigned int sse_state{};
  6. #endif
  7. bool in_mode{};
  8. public:
  9. FPUCtl();
  10. /* HACK: 32-bit targets for GCC seem to have a problem here with certain
  11. * noexcept methods (which destructors are) causing an internal compiler
  12. * error. No idea why it's these methods specifically, but this is needed
  13. * to get it to compile.
  14. */
  15. ~FPUCtl() noexcept(false) { leave(); }
  16. FPUCtl(const FPUCtl&) = delete;
  17. FPUCtl& operator=(const FPUCtl&) = delete;
  18. void leave();
  19. };
  20. #endif /* FPU_MODES_H */