aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/AArch64
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2013-10-07 16:36:15 +0000
committerChad Rosier <mcrosier@codeaurora.org>2013-10-07 16:36:15 +0000
commit2aeb4771a6ca0ee253e4836edbab5705203d9bb4 (patch)
tree3177db6abbe4eefcd340445950f6350d5adf1d26 /test/MC/AArch64
parentfbe4f5afce63b5487e57b4b32ecdf3cbc2fb0327 (diff)
downloadexternal_llvm-2aeb4771a6ca0ee253e4836edbab5705203d9bb4.zip
external_llvm-2aeb4771a6ca0ee253e4836edbab5705203d9bb4.tar.gz
external_llvm-2aeb4771a6ca0ee253e4836edbab5705203d9bb4.tar.bz2
[AArch64] Add support for NEON scalar arithmetic instructions:
SQDMULH, SQRDMULH, FMULX, FRECPS, and FRSQRTS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AArch64')
-rw-r--r--test/MC/AArch64/neon-diagnostics.s68
-rw-r--r--test/MC/AArch64/neon-scalar-mul.s33
-rw-r--r--test/MC/AArch64/neon-scalar-recip.s23
3 files changed, 124 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-diagnostics.s b/test/MC/AArch64/neon-diagnostics.s
index a86796f..be5a871 100644
--- a/test/MC/AArch64/neon-diagnostics.s
+++ b/test/MC/AArch64/neon-diagnostics.s
@@ -826,6 +826,33 @@
// CHECK-ERROR: uqsub h1, h2, d2
// CHECK-ERROR: ^
+//----------------------------------------------------------------------
+// Scalar Integer Saturating Doubling Multiply Half High (Signed)
+//----------------------------------------------------------------------
+
+ sqdmulh h10, s11, h12
+ sqdmulh s20, h21, s2
+
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: sqdmulh h10, s11, h12
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: sqdmulh s20, h21, s2
+// CHECK-ERROR: ^
+
+//------------------------------------------------------------------------
+// Scalar Integer Saturating Rounding Doubling Multiply Half High (Signed)
+//------------------------------------------------------------------------
+
+ sqrdmulh h10, s11, h12
+ sqrdmulh s20, h21, s2
+
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: sqrdmulh h10, s11, h12
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: sqrdmulh s20, h21, s2
+// CHECK-ERROR: ^
//----------------------------------------------------------------------
// Vector Shift Left (Signed and Unsigned Integer)
@@ -3771,3 +3798,44 @@
// CHECK-ERROR: fminv d0, v1.2d
// CHECK-ERROR: ^
+//----------------------------------------------------------------------
+// Floating-point Multiply Extended
+//----------------------------------------------------------------------
+
+ fmulx s20, h22, s15
+ fmulx d23, d11, s1
+
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: fmulx s20, h22, s15
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: fmulx d23, d11, s1
+// CHECK-ERROR: ^
+
+//----------------------------------------------------------------------
+// Floating-point Reciprocal Step
+//----------------------------------------------------------------------
+
+ frecps s21, s16, h13
+ frecps d22, s30, d21
+
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: frecps s21, s16, h13
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: frecps d22, s30, d21
+// CHECK-ERROR: ^
+
+//----------------------------------------------------------------------
+// Floating-point Reciprocal Square Root Step
+//----------------------------------------------------------------------
+
+ frsqrts s21, h5, s12
+ frsqrts d8, s22, d18
+
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: frsqrts s21, h5, s12
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: frsqrts d8, s22, d18
+// CHECK-ERROR: ^
diff --git a/test/MC/AArch64/neon-scalar-mul.s b/test/MC/AArch64/neon-scalar-mul.s
new file mode 100644
index 0000000..8caddb4
--- /dev/null
+++ b/test/MC/AArch64/neon-scalar-mul.s
@@ -0,0 +1,33 @@
+// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -show-encoding < %s | FileCheck %s
+
+// Check that the assembler can handle the documented syntax for AArch64
+
+//----------------------------------------------------------------------
+// Scalar Integer Saturating Doubling Multiply Half High
+//----------------------------------------------------------------------
+
+ sqdmulh h10, h11, h12
+ sqdmulh s20, s21, s2
+
+// CHECK: sqdmulh h10, h11, h12 // encoding: [0x6a,0xb5,0x6c,0x5e]
+// CHECK: sqdmulh s20, s21, s2 // encoding: [0xb4,0xb6,0xa2,0x5e]
+
+//----------------------------------------------------------------------
+// Scalar Integer Saturating Rounding Doubling Multiply Half High
+//----------------------------------------------------------------------
+
+ sqrdmulh h10, h11, h12
+ sqrdmulh s20, s21, s2
+
+// CHECK: sqrdmulh h10, h11, h12 // encoding: [0x6a,0xb5,0x6c,0x7e]
+// CHECK: sqrdmulh s20, s21, s2 // encoding: [0xb4,0xb6,0xa2,0x7e]
+
+//----------------------------------------------------------------------
+// Floating-point Multiply Extended
+//----------------------------------------------------------------------
+
+ fmulx s20, s22, s15
+ fmulx d23, d11, d1
+
+// CHECK: fmulx s20, s22, s15 // encoding: [0xd4,0xde,0x2f,0x5e]
+// CHECK: fmulx d23, d11, d1 // encoding: [0x77,0xdd,0x61,0x5e]
diff --git a/test/MC/AArch64/neon-scalar-recip.s b/test/MC/AArch64/neon-scalar-recip.s
new file mode 100644
index 0000000..bb9c170
--- /dev/null
+++ b/test/MC/AArch64/neon-scalar-recip.s
@@ -0,0 +1,23 @@
+// RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -show-encoding < %s | FileCheck %s
+
+// Check that the assembler can handle the documented syntax for AArch64
+
+//----------------------------------------------------------------------
+// Floating-point Reciprocal Step
+//----------------------------------------------------------------------
+
+ frecps s21, s16, s13
+ frecps d22, d30, d21
+
+// CHECK: frecps s21, s16, s13 // encoding: [0x15,0xfe,0x2d,0x5e]
+// CHECK: frecps d22, d30, d21 // encoding: [0xd6,0xff,0x75,0x5e]
+
+//----------------------------------------------------------------------
+// Floating-point Reciprocal Square Root Step
+//----------------------------------------------------------------------
+
+ frsqrts s21, s5, s12
+ frsqrts d8, d22, d18
+
+// CHECK: frsqrts s21, s5, s12 // encoding: [0xb5,0xfc,0xac,0x5e]
+// CHECK: frsqrts d8, d22, d18 // encoding: [0xc8,0xfe,0xf2,0x5e]