diff options
author | sharmander <saldabain.dev@gmail.com> | 2020-12-16 18:27:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 20:27:15 -0300 |
commit | e901b7850c74ee3650ef4ea887e4b43db36438c5 (patch) | |
tree | 63db248391f7175216dcdbf7d68729eaad9e5370 /ARMeilleure/Instructions/InstEmitSimdCvt32.cs | |
parent | 61634dd415fb71b3ae85871a0873d00195b0900c (diff) |
CPU: Implement VRINTX.F32 | VRINTX.F64 (#1776)
* Start implementation
* Draft
* Updated opcode.
Needs verification.
* Clean up code.
* Update implementation and tests.
* Update implemenation + tests
* Get RM from FPSCR + Do not use emit/addintrinsic
* Remove "fast" path, as recommended by gdk.
* Variable DELETED.
* Update ARMeilleure/Decoders/OpCodeTable.cs
Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
* Update ARMeilleure/Instructions/InstEmitSimdCvt32.cs
Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
* Update ARMeilleure/Instructions/InstEmitSimdCvt32.cs
Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
* Update ARMeilleure/Instructions/InstEmitSimdCvt32.cs
Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
* Move method
* stringing things together :)
Co-authored-by: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com>
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitSimdCvt32.cs')
-rw-r--r-- | ARMeilleure/Instructions/InstEmitSimdCvt32.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ARMeilleure/Instructions/InstEmitSimdCvt32.cs b/ARMeilleure/Instructions/InstEmitSimdCvt32.cs index e4efea70..cddeda51 100644 --- a/ARMeilleure/Instructions/InstEmitSimdCvt32.cs +++ b/ARMeilleure/Instructions/InstEmitSimdCvt32.cs @@ -342,6 +342,21 @@ namespace ARMeilleure.Instructions } } + // VRINTX (floating-point). + public static void Vrintx_S(ArmEmitterContext context) + { + OpCode32SimdS op = (OpCode32SimdS)context.CurrOp; + + bool doubleSize = (op.Size & 1) == 1; + string methodName = doubleSize ? nameof(SoftFallback.Round) : nameof(SoftFallback.RoundF); + + EmitScalarUnaryOpF32(context, (op1) => + { + MethodInfo info = typeof(SoftFallback).GetMethod(methodName); + return context.Call(info, op1); + }); + } + private static Operand EmitFPConvert(ArmEmitterContext context, Operand value, OperandType type, bool signed) { Debug.Assert(value.Type == OperandType.I32 || value.Type == OperandType.I64); |