aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/fpu_modes.h
blob: 73e7596545675d12ee000c9582f8746d244c7f9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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() noexcept;
    ~FPUCtl() { leave(); }

    FPUCtl(const FPUCtl&) = delete;
    FPUCtl& operator=(const FPUCtl&) = delete;

    void leave() noexcept;
};

#endif /* FPU_MODES_H */