aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions/InstEmitSimdHelper32.cs
diff options
context:
space:
mode:
authormerry <git@mary.rs>2022-10-19 01:36:04 +0100
committerGitHub <noreply@github.com>2022-10-19 02:36:04 +0200
commit8d41402fa603a2f00ccd08239d3b938fd60715a3 (patch)
tree16f1c1f904ebf4a7b1f07c219f11a57f6f7c6494 /ARMeilleure/Instructions/InstEmitSimdHelper32.cs
parent5af8ce7c38d0b5c910a271ff4a43313850b49a59 (diff)
A32: Implement VCVTT, VCVTB (#3710)
* A32: Implement VCVTT, VCVTB * A32: F16C implementation of VCVTT/VCVTB
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitSimdHelper32.cs')
-rw-r--r--ARMeilleure/Instructions/InstEmitSimdHelper32.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/ARMeilleure/Instructions/InstEmitSimdHelper32.cs b/ARMeilleure/Instructions/InstEmitSimdHelper32.cs
index 0620ea33..84b01d05 100644
--- a/ARMeilleure/Instructions/InstEmitSimdHelper32.cs
+++ b/ARMeilleure/Instructions/InstEmitSimdHelper32.cs
@@ -70,6 +70,22 @@ namespace ARMeilleure.Instructions
context.Copy(vec, insert);
}
+ public static Operand ExtractScalar16(ArmEmitterContext context, int reg, bool top)
+ {
+ return context.VectorExtract16(GetVecA32(reg >> 2), ((reg & 3) << 1) | (top ? 1 : 0));
+ }
+
+ public static void InsertScalar16(ArmEmitterContext context, int reg, bool top, Operand value)
+ {
+ Debug.Assert(value.Type == OperandType.FP32 || value.Type == OperandType.I32);
+
+ Operand vec, insert;
+ vec = GetVecA32(reg >> 2);
+ insert = context.VectorInsert16(vec, value, ((reg & 3) << 1) | (top ? 1 : 0));
+
+ context.Copy(vec, insert);
+ }
+
public static Operand ExtractElement(ArmEmitterContext context, int reg, int size, bool signed)
{
return EmitVectorExtract32(context, reg >> (4 - size), reg & ((16 >> size) - 1), size, signed);