aarch64: Implement floating-point arithmetic instructions
authorMarek Vasut <marex@denx.de>
Sat, 27 Jun 2020 21:26:30 +0000 (23:26 +0200)
committerMarek Vasut <marex@denx.de>
Sat, 19 Sep 2020 01:08:46 +0000 (03:08 +0200)
Fill in aarch64 opcodes for floating point arithmetic instructions.

Signed-off-by: Marek Vasut <marex@denx.de>
orc/orcrules-neon.c

index 6aa7bf3..e198b4f 100644 (file)
@@ -2534,7 +2534,7 @@ BINARY(subusl,"vqsub.u32",0xf3200210, "uqsub", 0x2ea02c00, 1)
 BINARY(xorl,"veor",0xf3000110, "eor", 0x2e201c00, 1)
 
 /* UNARY(absq,"vabs.s64",0xf3b10300, "abs", 0xee0b800, 0) */
-BINARY(addq,"vadd.i64",0xf2300800, "add", 0x0ee08400, 0)
+BINARY(addq,"vadd.i64",0xf2300800, "add", 0x4ee08400, 0)
 /* BINARY(addssq,"vqadd.s64",0xf2000010, "sqadd", 0x0ee00c00, 0) */
 /* BINARY(addusq,"vqadd.u64",0xf3000010, "uqadd", 0x2ee00c00, 0) */
 BINARY(andq,"vand",0xf2000110, "and", 0x0e201c00, 0)
@@ -2549,7 +2549,7 @@ MOVE(copyq,"vmov",0xf2200110, "mov", 0x0ea01c00, 0)
 /* BINARY(minuq,"vmin.u64",0xf3000610, "umin", 0x2ee06c00, 0) */
 /* BINARY(mullq,"vmul.i64",0xf2000910, "mul", 0x0ee09c00, 0) */
 BINARY(orq,"vorr",0xf2200110, "orr", 0x0ea01c00, 0)
-BINARY(subq,"vsub.i64",0xf3300800, "sub", 0x2ee08400, 0)
+BINARY(subq,"vsub.i64",0xf3300800, "sub", 0x6ee08400, 0)
 /* BINARY(subssq,"vqsub.s64",0xf2000210, "sqsub", 0x0ee00c00, 0) */
 /* BINARY(subusq,"vqsub.u64",0xf3000210, "uqsub", 0x2ee00c00, 0) */
 BINARY(xorq,"veor",0xf3000110, "eor", 0x2e201c00, 0)
@@ -2588,16 +2588,16 @@ UNARY_NARROW(select0ql,"vmovn.i64",0xf3ba0200, "xtn", 0x0ea12800, 1)
 UNARY_NARROW(select0lw,"vmovn.i32",0xf3b60200, "xtn", 0x0e612800, 2)
 UNARY_NARROW(select0wb,"vmovn.i16",0xf3b20200, "xtn", 0x0e212800, 3)
 
-BINARY(addf,"vadd.f32",0xf2000d00, NULL, 0, 1)
-BINARY(subf,"vsub.f32",0xf2200d00, NULL, 0, 1)
-BINARY(mulf,"vmul.f32",0xf3000d10, NULL, 0, 1)
-BINARY(maxf,"vmax.f32",0xf2000f00, NULL, 0, 1)
-BINARY(minf,"vmin.f32",0xf2200f00, NULL, 0, 1)
-BINARY(cmpeqf,"vceq.f32",0xf2000e00, NULL, 0, 1)
-/* BINARY_R(cmpltf,"vclt.f32",0xf3200e00, NULL, 0, 1) */
-/* BINARY_R(cmplef,"vcle.f32",0xf3000e00, NULL, 0, 1) */
-UNARY(convfl,"vcvt.s32.f32",0xf3bb0700, NULL, 0, 1)
-UNARY(convlf,"vcvt.f32.s32",0xf3bb0600, NULL, 0, 1)
+BINARY(addf,"vadd.f32",0xf2000d00, "fadd", 0x0e20d400, 0)
+BINARY(subf,"vsub.f32",0xf2200d00, "fsub", 0x0ea0d400, 0)
+BINARY(mulf,"vmul.f32",0xf3000d10, "fmul", 0x2e20dc00, 0)
+BINARY(maxf,"vmax.f32",0xf2000f00, "fmax", 0x0e20f400, 0)
+BINARY(minf,"vmin.f32",0xf2200f00, "fmin", 0x0ea0f400, 0)
+BINARY(cmpeqf,"vceq.f32",0xf2000e00, "fcmeq", 0x5e20e400, 0)
+/* BINARY_R(cmpltf,"vclt.f32",0xf3200e00, "fcmlt", 0x5ef8e800, 1) */
+/* BINARY_R(cmplef,"vcle.f32",0xf3000e00, "fcmle", 0x7ef8d800, 1) */
+UNARY(convfl,"vcvt.s32.f32",0xf3bb0700, "fcvtzs", 0x0ea1b800, 0)
+UNARY(convlf,"vcvt.f32.s32",0xf3bb0600, "scvtf", 0x0e21d800, 0)
 
 #define UNARY_VFP(opcode,insn_name,code,insn_name64,code64,vec_shift) \
 static void \