mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-10 16:38:14 +01:00
fp: Extract common RoundingMode enum
This commit is contained in:
parent
7d52d7bef8
commit
d875c08ebf
6 changed files with 39 additions and 20 deletions
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "common/bit_util.h"
|
||||
#include "common/common_types.h"
|
||||
#include "common/fp/rounding_mode.h"
|
||||
|
||||
namespace Dynarmic::A32 {
|
||||
|
||||
|
|
@ -19,13 +20,6 @@ namespace Dynarmic::A32 {
|
|||
class FPSCR final
|
||||
{
|
||||
public:
|
||||
enum class RoundingMode {
|
||||
ToNearest,
|
||||
TowardsPlusInfinity,
|
||||
TowardsMinusInfinity,
|
||||
TowardsZero
|
||||
};
|
||||
|
||||
FPSCR() = default;
|
||||
FPSCR(const FPSCR&) = default;
|
||||
FPSCR(FPSCR&&) = default;
|
||||
|
|
@ -79,8 +73,8 @@ public:
|
|||
}
|
||||
|
||||
/// Rounding mode control field.
|
||||
RoundingMode RMode() const {
|
||||
return static_cast<RoundingMode>(Common::Bits<22, 23>(value));
|
||||
FP::RoundingMode RMode() const {
|
||||
return static_cast<FP::RoundingMode>(Common::Bits<22, 23>(value));
|
||||
}
|
||||
|
||||
/// Indicates the stride of a vector.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue