1 /* This file is part of the dynarmic project.
2  * Copyright (c) 2018 MerryMage
3  * SPDX-License-Identifier: 0BSD
4  */
5 
6 #pragma once
7 
8 namespace Dynarmic::FP {
9 
10 /// Ordering of first four values is important as they correspond to bits in FPCR.
11 enum class RoundingMode {
12     /// Round to nearest floating point. If there is a tie, round to nearest even digit in required position.
13     ToNearest_TieEven,
14     /// Round up towards positive infinity.
15     TowardsPlusInfinity,
16     /// Round downwards towards negative infinity.
17     TowardsMinusInfinity,
18     /// Truncate towards zero.
19     TowardsZero,
20     /// Round to nearest floating point. If there is a tie, round away from zero.
21     ToNearest_TieAwayFromZero,
22     /// Von Neumann rounding (as modified by Brent). Also known as sticky rounding.
23     /// Set the least significant bit to 1 if the result is not exact.
24     ToOdd,
25 };
26 
27 } // namespace Dynarmic::FP
28