diff options
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] |