Update AThreadState.cs

This commit is contained in:
LDj3SNuD 2018-10-22 23:57:10 +02:00 committed by GitHub
parent f15002d0c4
commit 2a4ca6e07e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,5 +145,20 @@ namespace ChocolArm64.State
{
Undefined?.Invoke(this, new AInstUndefinedEventArgs(Position, RawOpCode));
}
internal bool GetFpcrFlag(FPCR Flag)
{
return (Fpcr & (1 << (int)Flag)) != 0;
}
internal void SetFpsrFlag(FPSR Flag)
{
Fpsr |= 1 << (int)Flag;
}
internal ARoundMode FPRoundingMode()
{
return (ARoundMode)((Fpcr >> (int)FPCR.RMode) & 3);
}
}
}
}