diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2013-10-14 14:37:20 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2013-10-14 14:37:20 +0000 |
commit | 942827b1139c432239648ef54d1df5074eac36ec (patch) | |
tree | b7b5fa3a806a4e0fff855feb7367a28a394f19ff /test/MC/AArch64 | |
parent | 0d1e2aebe641fc26bba5d895bbcadcac6f23aaec (diff) | |
download | external_llvm-942827b1139c432239648ef54d1df5074eac36ec.zip external_llvm-942827b1139c432239648ef54d1df5074eac36ec.tar.gz external_llvm-942827b1139c432239648ef54d1df5074eac36ec.tar.bz2 |
[AArch64] Add support for NEON scalar integer compare instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192596 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/AArch64')
-rw-r--r-- | test/MC/AArch64/neon-diagnostics.s | 110 | ||||
-rw-r--r-- | test/MC/AArch64/neon-scalar-compare.s | 90 |
2 files changed, 200 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-diagnostics.s b/test/MC/AArch64/neon-diagnostics.s index 2af7798..e08c5cd 100644 --- a/test/MC/AArch64/neon-diagnostics.s +++ b/test/MC/AArch64/neon-diagnostics.s @@ -4286,3 +4286,113 @@ // CHECK-ERROR dup v5.2d, w0 // CHECK-ERROR ^ +//---------------------------------------------------------------------- +// Scalar Compare Bitwise Equal +//---------------------------------------------------------------------- + + cmeq b20, d21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmeq b20, d21, d22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Bitwise Equal To Zero +//---------------------------------------------------------------------- + + cmeq d20, b21, #0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmeq d20, b21, #0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Unsigned Higher Or Same +//---------------------------------------------------------------------- + + cmhs b20, d21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmhs b20, d21, d22 +// CHECK-ERROR: ^ + + +//---------------------------------------------------------------------- +// Scalar Compare Signed Greather Than Or Equal +//---------------------------------------------------------------------- + + cmge b20, d21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmge b20, d21, d22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Signed Greather Than Or Equal To Zero +//---------------------------------------------------------------------- + + cmge d20, b21, #0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmge d20, b21, #0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Unsigned Higher +//---------------------------------------------------------------------- + + cmhi b20, d21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmhi b20, d21, d22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Signed Greater Than +//---------------------------------------------------------------------- + + cmgt b20, d21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmgt b20, d21, d22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Signed Greater Than Zero +//---------------------------------------------------------------------- + + cmgt d20, b21, #0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmgt d20, b21, #0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Signed Less Than Or Equal To Zero +//---------------------------------------------------------------------- + + cmle d20, b21, #0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmle d20, b21, #0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Less Than Zero +//---------------------------------------------------------------------- + + cmlt d20, b21, #0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmlt d20, b21, #0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Compare Bitwise Test Bits +//---------------------------------------------------------------------- + + cmtst b20, d21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: cmtst b20, d21, d22 +// CHECK-ERROR: ^ diff --git a/test/MC/AArch64/neon-scalar-compare.s b/test/MC/AArch64/neon-scalar-compare.s new file mode 100644 index 0000000..55ade0e --- /dev/null +++ b/test/MC/AArch64/neon-scalar-compare.s @@ -0,0 +1,90 @@ +// 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 Compare Bitwise Equal +//---------------------------------------------------------------------- + + cmeq d20, d21, d22 + +// CHECK: cmeq d20, d21, d22 // encoding: [0xb4,0x8e,0xf6,0x7e] + +//---------------------------------------------------------------------- +// Scalar Compare Bitwise Equal To Zero +//---------------------------------------------------------------------- + + cmeq d20, d21, #0x0 + +// CHECK: cmeq d20, d21, #0x0 // encoding: [0xb4,0x9a,0xe0,0x5e] + +//---------------------------------------------------------------------- +// Scalar Compare Unsigned Higher Or Same +//---------------------------------------------------------------------- + + cmhs d20, d21, d22 + +// CHECK: cmhs d20, d21, d22 // encoding: [0xb4,0x3e,0xf6,0x7e] + +//---------------------------------------------------------------------- +// Scalar Compare Signed Greather Than Or Equal +//---------------------------------------------------------------------- + + cmge d20, d21, d22 + +// CHECK: cmge d20, d21, d22 // encoding: [0xb4,0x3e,0xf6,0x5e] + +//---------------------------------------------------------------------- +// Scalar Compare Signed Greather Than Or Equal To Zero +//---------------------------------------------------------------------- + + cmge d20, d21, #0x0 + +// CHECK: cmge d20, d21, #0x0 // encoding: [0xb4,0x8a,0xe0,0x7e] + +//---------------------------------------------------------------------- +// Scalar Compare Unsigned Higher +//---------------------------------------------------------------------- + + cmhi d20, d21, d22 + +// CHECK: cmhi d20, d21, d22 // encoding: [0xb4,0x36,0xf6,0x7e] +//---------------------------------------------------------------------- +// Scalar Compare Signed Greater Than +//---------------------------------------------------------------------- + + cmgt d20, d21, d22 + +// CHECK: cmgt d20, d21, d22 // encoding: [0xb4,0x36,0xf6,0x5e] + +//---------------------------------------------------------------------- +// Scalar Compare Signed Greater Than Zero +//---------------------------------------------------------------------- + + cmgt d20, d21, #0x0 + +// CHECK: cmgt d20, d21, #0x0 // encoding: [0xb4,0x8a,0xe0,0x5e] + +//---------------------------------------------------------------------- +// Scalar Compare Signed Less Than Or Equal To Zero +//---------------------------------------------------------------------- + + cmle d20, d21, #0x0 + +// CHECK: cmle d20, d21, #0x0 // encoding: [0xb4,0x9a,0xe0,0x7e] + +//---------------------------------------------------------------------- +// Scalar Compare Less Than Zero +//---------------------------------------------------------------------- + + cmlt d20, d21, #0x0 + +// CHECK: cmlt d20, d21, #0x0 // encoding: [0xb4,0xaa,0xe0,0x5e] + +//---------------------------------------------------------------------- +// Scalar Compare Bitwise Test Bits +//---------------------------------------------------------------------- + + cmtst d20, d21, d22 + +// CHECK: cmtst d20, d21, d22 // encoding: [0xb4,0x8e,0xf6,0x5e] |