mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-22 10:19:01 +00:00
FPURoundMode: revert use of enums in bit-fields
The workaround of using fixed underlying types produces lots of warnings in GCC because now the bit-fields are too small for the value range used for conversion semantics.
This commit is contained in:
parent
154ad838f4
commit
d05e205a24
5 changed files with 18 additions and 14 deletions
|
@ -8,24 +8,29 @@
|
|||
|
||||
namespace FPURoundMode
|
||||
{
|
||||
enum RoundModes : u32
|
||||
// TODO: MSVC currently produces broken code:
|
||||
// https://connect.microsoft.com/VisualStudio/feedback/details/828892/vc-2013-miscompilation-with-enums-and-bit-fields
|
||||
// Once that is fixed, change types in SetRoundMode(), SetSIMDMode(), and in UReg_FPSCR to 'RoundMode'.
|
||||
|
||||
enum RoundMode
|
||||
{
|
||||
ROUND_NEAR = 0,
|
||||
ROUND_CHOP = 1,
|
||||
ROUND_UP = 2,
|
||||
ROUND_DOWN = 3
|
||||
};
|
||||
enum PrecisionModes : u32
|
||||
enum PrecisionMode
|
||||
{
|
||||
PREC_24 = 0,
|
||||
PREC_53 = 1,
|
||||
PREC_64 = 2
|
||||
};
|
||||
void SetRoundMode(RoundModes mode);
|
||||
|
||||
void SetPrecisionMode(PrecisionModes mode);
|
||||
void SetRoundMode(int mode);
|
||||
|
||||
void SetSIMDMode(RoundModes rounding_mode, bool non_ieee_mode);
|
||||
void SetPrecisionMode(PrecisionMode mode);
|
||||
|
||||
void SetSIMDMode(int rounding_mode, bool non_ieee_mode);
|
||||
|
||||
/*
|
||||
* There are two different flavors of float to int conversion:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue