diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2013-11-11 18:04:07 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2013-11-11 18:04:07 +0000 |
commit | 30b2a19f3be840da1bc4aefcaabcbddd2e0130fc (patch) | |
tree | 160e9b0f481458172b70097abdf02057a91541b5 /test/MC | |
parent | 028e4d27b1afc62be0687e9c3b57992c36852938 (diff) | |
download | external_llvm-30b2a19f3be840da1bc4aefcaabcbddd2e0130fc.zip external_llvm-30b2a19f3be840da1bc4aefcaabcbddd2e0130fc.tar.gz external_llvm-30b2a19f3be840da1bc4aefcaabcbddd2e0130fc.tar.bz2 |
[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')
-rw-r--r-- | test/MC/AArch64/neon-diagnostics.s | 36 | ||||
-rw-r--r-- | test/MC/AArch64/neon-scalar-cvt.s | 20 | ||||
-rw-r--r-- | test/MC/Disassembler/AArch64/neon-instructions.txt | 16 |
3 files changed, 72 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-diagnostics.s b/test/MC/AArch64/neon-diagnostics.s index d9afcb1..5ada875 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 93115ad..5477409 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] diff --git a/test/MC/Disassembler/AArch64/neon-instructions.txt b/test/MC/Disassembler/AArch64/neon-instructions.txt index e4aad48..2f53375 100644 --- a/test/MC/Disassembler/AArch64/neon-instructions.txt +++ b/test/MC/Disassembler/AArch64/neon-instructions.txt @@ -1973,6 +1973,22 @@ G# RUN: llvm-mc -triple aarch64-none-linux-gnu -mattr=+neon -disassemble < %s | 0xd5,0xe5,0x40,0x7f #---------------------------------------------------------------------- +# Scalar Floating-point Convert To Signed Fixed-point (Immediate) +#---------------------------------------------------------------------- +# CHECK: fcvtzs s21, s12, #1 +# CHECK: fcvtzs d21, d12, #1 +0x95,0xfd,0x3f,0x5f +0x95,0xfd,0x7f,0x5f + +#---------------------------------------------------------------------- +# Scalar Floating-point Convert To Unsigned Fixed-point (Immediate) +#---------------------------------------------------------------------- +# CHECK: fcvtzu s21, s12, #1 +# CHECK: fcvtzu d21, d12, #1 +0x95,0xfd,0x3f,0x7f +0x95,0xfd,0x7f,0x7f + +#---------------------------------------------------------------------- # Vector load/store multiple N-element structure #---------------------------------------------------------------------- # CHECK: ld1 {v0.16b}, [x0] |