aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions/NativeInterface.cs
diff options
context:
space:
mode:
authorLDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>2020-12-07 10:37:07 +0100
committerGitHub <noreply@github.com>2020-12-07 10:37:07 +0100
commit567ea726e173040ae931a37bc85fd6cd92b69363 (patch)
tree5b6487d4821c978659732d5f34abf5aa69b0dafa /ARMeilleure/Instructions/NativeInterface.cs
parent668720b0883106fc1f44da70dddb8a3502ac7dbb (diff)
Add support for guest Fz (Fpcr) mode through host Ftz and Daz (Mxcsr) modes (fast paths). (#1630)
* Add support for guest Fz (Fpcr) mode through host Ftz and Daz (Mxcsr) modes (fast paths). * Ptc.InternalVersion = 1630 * Nits. * Address comments. * Update Ptc.cs * Address comment.
Diffstat (limited to 'ARMeilleure/Instructions/NativeInterface.cs')
-rw-r--r--ARMeilleure/Instructions/NativeInterface.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/ARMeilleure/Instructions/NativeInterface.cs b/ARMeilleure/Instructions/NativeInterface.cs
index 8fb98df8..bc1be21d 100644
--- a/ARMeilleure/Instructions/NativeInterface.cs
+++ b/ARMeilleure/Instructions/NativeInterface.cs
@@ -78,6 +78,11 @@ namespace ARMeilleure.Instructions
return (ulong)GetContext().Fpcr;
}
+ public static bool GetFpcrFz()
+ {
+ return (GetContext().Fpcr & FPCR.Fz) != 0;
+ }
+
public static ulong GetFpsr()
{
return (ulong)GetContext().Fpsr;
@@ -85,7 +90,7 @@ namespace ARMeilleure.Instructions
public static uint GetFpscr()
{
- var context = GetContext();
+ ExecutionContext context = GetContext();
return (uint)(context.Fpsr & FPSR.A32Mask & ~FPSR.Nzcv) |
(uint)(context.Fpcr & FPCR.A32Mask);
@@ -143,7 +148,7 @@ namespace ARMeilleure.Instructions
public static void SetFpscr(uint fpscr)
{
- var context = GetContext();
+ ExecutionContext context = GetContext();
context.Fpsr = FPSR.A32Mask & (FPSR)fpscr;
context.Fpcr = FPCR.A32Mask & (FPCR)fpscr;
@@ -250,7 +255,7 @@ namespace ARMeilleure.Instructions
{
Statistics.PauseTimer();
- var context = GetContext();
+ ExecutionContext context = GetContext();
context.CheckInterrupt();