diff options
| author | MS-DOS1999 <mgnjulien@gmail.com> | 2018-12-18 01:29:47 +0100 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-12-17 22:29:47 -0200 |
| commit | 6aaf9ccb533d1485361f55fa7d6d16dda719bf06 (patch) | |
| tree | 67f7a75a35db04a83a3088c928dcc91121402319 /ChocolArm64 | |
| parent | 2e143365eb9023b97ea51f6c47a12091ee3dc74c (diff) | |
Add Frintz_S/V opcode and unit test, correction of some unit tests (#523)
* Add Frintz_S/V opcode and unit test, correction of some unit tests
* --test
* fix code style issue
* delete tab
Diffstat (limited to 'ChocolArm64')
| -rw-r--r-- | ChocolArm64/Instructions/InstEmitSimdArithmetic.cs | 16 | ||||
| -rw-r--r-- | ChocolArm64/OpCodeTable.cs | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs b/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs index df84596b..013d0432 100644 --- a/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs +++ b/ChocolArm64/Instructions/InstEmitSimdArithmetic.cs @@ -1380,6 +1380,22 @@ namespace ChocolArm64.Instructions }); } + public static void Frintz_S(ILEmitterCtx context) + { + EmitScalarUnaryOpF(context, () => + { + EmitUnaryMathCall(context, nameof(Math.Truncate)); + }); + } + + public static void Frintz_V(ILEmitterCtx context) + { + EmitVectorUnaryOpF(context, () => + { + EmitUnaryMathCall(context, nameof(Math.Truncate)); + }); + } + public static void Frsqrte_S(ILEmitterCtx context) { EmitScalarUnaryOpF(context, () => diff --git a/ChocolArm64/OpCodeTable.cs b/ChocolArm64/OpCodeTable.cs index 89510fbe..845a48d0 100644 --- a/ChocolArm64/OpCodeTable.cs +++ b/ChocolArm64/OpCodeTable.cs @@ -329,6 +329,8 @@ namespace ChocolArm64 SetA64("0>0011101<100001100010xxxxxxxxxx", InstEmit.Frintp_V, typeof(OpCodeSimd64)); SetA64("000111100x100111010000xxxxxxxxxx", InstEmit.Frintx_S, typeof(OpCodeSimd64)); SetA64("0>1011100<100001100110xxxxxxxxxx", InstEmit.Frintx_V, typeof(OpCodeSimd64)); + SetA64("000111100x100101110000xxxxxxxxxx", InstEmit.Frintz_S, typeof(OpCodeSimd64)); + SetA64("0>0011101<100001100110xxxxxxxxxx", InstEmit.Frintz_V, typeof(OpCodeSimd64)); SetA64("011111101x100001110110xxxxxxxxxx", InstEmit.Frsqrte_S, typeof(OpCodeSimd64)); SetA64("0>1011101<100001110110xxxxxxxxxx", InstEmit.Frsqrte_V, typeof(OpCodeSimd64)); SetA64("010111101x1xxxxx111111xxxxxxxxxx", InstEmit.Frsqrts_S, typeof(OpCodeSimdReg64)); |
