summaryrefslogtreecommitdiff
path: root/test/MC/AArch64
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2013-11-11 18:04:07 +0000
committerChad Rosier <mcrosier@codeaurora.org>2013-11-11 18:04:07 +0000
commit30b2a19f3be840da1bc4aefcaabcbddd2e0130fc (patch)
tree160e9b0f481458172b70097abdf02057a91541b5 /test/MC/AArch64
parent028e4d27b1afc62be0687e9c3b57992c36852938 (diff)
downloadllvm-30b2a19f3be840da1bc4aefcaabcbddd2e0130fc.tar.gz
llvm-30b2a19f3be840da1bc4aefcaabcbddd2e0130fc.tar.bz2
llvm-30b2a19f3be840da1bc4aefcaabcbddd2e0130fc.tar.xz
[AArch64] Add support for NEON scalar floating-point convert to fixed-point instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194394 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AArch64')
-rw-r--r--test/MC/AArch64/neon-diagnostics.s36
-rw-r--r--test/MC/AArch64/neon-scalar-cvt.s20
2 files changed, 56 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-diagnostics.s b/test/MC/AArch64/neon-diagnostics.s
index d9afcb1418..5ada875b13 100644
--- a/test/MC/AArch64/neon-diagnostics.s
+++ b/test/MC/AArch64/neon-diagnostics.s
@@ -5090,6 +5090,42 @@
// CHECK-ERROR: ^
//----------------------------------------------------------------------
+// Scalar Floating-point Convert To Signed Fixed-point (Immediate)
+//----------------------------------------------------------------------
+
+ fcvtzs s21, s12, #0
+ fcvtzs d21, d12, #65
+ fcvtzs s21, d12, #1
+
+// CHECK-ERROR: error: expected integer in range [1, 32]
+// CHECK-ERROR: fcvtzs s21, s12, #0
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: expected integer in range [1, 64]
+// CHECK-ERROR: fcvtzs d21, d12, #65
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: fcvtzs s21, d12, #1
+// CHECK-ERROR: ^
+
+//----------------------------------------------------------------------
+// Scalar Floating-point Convert To Unsigned Fixed-point (Immediate)
+//----------------------------------------------------------------------
+
+ fcvtzu s21, s12, #33
+ fcvtzu d21, d12, #0
+ fcvtzu s21, d12, #1
+
+// CHECK-ERROR: error: expected integer in range [1, 32]
+// CHECK-ERROR: fcvtzu s21, s12, #33
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: expected integer in range [1, 64]
+// CHECK-ERROR: fcvtzu d21, d12, #0
+// CHECK-ERROR: ^
+// CHECK-ERROR: error: invalid operand for instruction
+// CHECK-ERROR: fcvtzu s21, d12, #1
+// CHECK-ERROR: ^
+
+//----------------------------------------------------------------------
// Scalar Unsigned Saturating Extract Narrow
//----------------------------------------------------------------------
diff --git a/test/MC/AArch64/neon-scalar-cvt.s b/test/MC/AArch64/neon-scalar-cvt.s
index 93115ad648..54774097c0 100644
--- a/test/MC/AArch64/neon-scalar-cvt.s
+++ b/test/MC/AArch64/neon-scalar-cvt.s
@@ -41,3 +41,23 @@
// CHECK: ucvtf s22, s13, #32 // encoding: [0xb6,0xe5,0x20,0x7f]
// CHECK: ucvtf d21, d14, #64 // encoding: [0xd5,0xe5,0x40,0x7f]
+
+//----------------------------------------------------------------------
+// Scalar Floating-point Convert To Signed Fixed-point (Immediate)
+//----------------------------------------------------------------------
+
+ fcvtzs s21, s12, #1
+ fcvtzs d21, d12, #1
+
+// CHECK: fcvtzs s21, s12, #1 // encoding: [0x95,0xfd,0x3f,0x5f]
+// CHECK: fcvtzs d21, d12, #1 // encoding: [0x95,0xfd,0x7f,0x5f]
+
+//----------------------------------------------------------------------
+// Scalar Floating-point Convert To Unsigned Fixed-point (Immediate)
+//----------------------------------------------------------------------
+
+ fcvtzu s21, s12, #1
+ fcvtzu d21, d12, #1
+
+// CHECK: fcvtzu s21, s12, #1 // encoding: [0x95,0xfd,0x3f,0x7f]
+// CHECK: fcvtzu d21, d12, #1 // encoding: [0x95,0xfd,0x7f,0x7f]