diff options
Diffstat (limited to 'ARMeilleure/Instructions/SoftFloat.cs')
-rw-r--r-- | ARMeilleure/Instructions/SoftFloat.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ARMeilleure/Instructions/SoftFloat.cs b/ARMeilleure/Instructions/SoftFloat.cs index a138f5df..9e3db68d 100644 --- a/ARMeilleure/Instructions/SoftFloat.cs +++ b/ARMeilleure/Instructions/SoftFloat.cs @@ -12,8 +12,8 @@ namespace ARMeilleure.Instructions RecipSqrtEstimateTable = BuildRecipSqrtEstimateTable(); } - internal static readonly byte[] RecipEstimateTable; - internal static readonly byte[] RecipSqrtEstimateTable; + public static readonly byte[] RecipEstimateTable; + public static readonly byte[] RecipSqrtEstimateTable; private static byte[] BuildRecipEstimateTable() { @@ -94,6 +94,13 @@ namespace ARMeilleure.Instructions context.Fpsr |= (FPSR)(1 << (int)exc); } } + + public static FPRoundingMode GetRoundingMode(this FPCR fpcr) + { + const int RModeShift = 22; + + return (FPRoundingMode)(((uint)fpcr >> RModeShift) & 3u); + } } static class SoftFloat16 |