diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2013-10-30 15:19:37 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2013-10-30 15:19:37 +0000 |
commit | f853a034a1fdccd194da04ca1e2e1aa8bcbd16b4 (patch) | |
tree | a6f39c0d311ccd6e32495be46d5fa1ff0c544948 /test/MC | |
parent | 95efb037f7ddc4cac67007eb3a9864e6012eda3b (diff) | |
download | external_llvm-f853a034a1fdccd194da04ca1e2e1aa8bcbd16b4.zip external_llvm-f853a034a1fdccd194da04ca1e2e1aa8bcbd16b4.tar.gz external_llvm-f853a034a1fdccd194da04ca1e2e1aa8bcbd16b4.tar.bz2 |
[AArch64] Add support for NEON scalar floating-point compare instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r-- | test/MC/AArch64/neon-diagnostics.s | 140 | ||||
-rw-r--r-- | test/MC/AArch64/neon-scalar-fp-compare.s | 103 | ||||
-rw-r--r-- | test/MC/Disassembler/AArch64/neon-instructions.txt | 80 |
3 files changed, 323 insertions, 0 deletions
diff --git a/test/MC/AArch64/neon-diagnostics.s b/test/MC/AArch64/neon-diagnostics.s index e0675e2..28f8e7a 100644 --- a/test/MC/AArch64/neon-diagnostics.s +++ b/test/MC/AArch64/neon-diagnostics.s @@ -4398,6 +4398,146 @@ // CHECK-ERROR: ^ //---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Equal +//---------------------------------------------------------------------- + + fcmeq s10, h11, s12 + fcmeq d20, s21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmeq s10, h11, s12 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmeq d20, s21, d22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Equal To Zero +//---------------------------------------------------------------------- + + fcmeq h10, s11, #0.0 + fcmeq d20, s21, #0.0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmeq h10, s11, #0.0 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmeq d20, s21, #0.0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Greater Than Or Equal +//---------------------------------------------------------------------- + + fcmge s10, h11, s12 + fcmge d20, s21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmge s10, h11, s12 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmge d20, s21, d22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Greater Than Or Equal To Zero +//---------------------------------------------------------------------- + + fcmge h10, s11, #0.0 + fcmge d20, s21, #0.0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmge h10, s11, #0.0 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmge d20, s21, #0.0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Greather Than +//---------------------------------------------------------------------- + + fcmgt s10, h11, s12 + fcmgt d20, s21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmgt s10, h11, s12 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmgt d20, s21, d22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Greather Than Zero +//---------------------------------------------------------------------- + + fcmgt h10, s11, #0.0 + fcmgt d20, s21, #0.0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmgt h10, s11, #0.0 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmgt d20, s21, #0.0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Less Than Or Equal To Zero +//---------------------------------------------------------------------- + + fcmle h10, s11, #0.0 + fcmle d20, s21, #0.0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmle h10, s11, #0.0 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmle d20, s21, #0.0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Less Than +//---------------------------------------------------------------------- + + fcmlt h10, s11, #0.0 + fcmlt d20, s21, #0.0 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmlt h10, s11, #0.0 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: fcmlt d20, s21, #0.0 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Absolute Compare Mask Greater Than Or Equal +//---------------------------------------------------------------------- + + facge s10, h11, s12 + facge d20, s21, d22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: facge s10, h11, s12 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: facge d20, s21, d22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- +// Scalar Floating-point Absolute Compare Mask Greater Than +//---------------------------------------------------------------------- + + facgt s10, h11, s12 + facgt d20, d21, s22 + +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: facgt s10, h11, s12 +// CHECK-ERROR: ^ +// CHECK-ERROR: error: invalid operand for instruction +// CHECK-ERROR: facgt d20, d21, s22 +// CHECK-ERROR: ^ + +//---------------------------------------------------------------------- // Scalar Signed Saturating Accumulated of Unsigned Value //---------------------------------------------------------------------- diff --git a/test/MC/AArch64/neon-scalar-fp-compare.s b/test/MC/AArch64/neon-scalar-fp-compare.s new file mode 100644 index 0000000..a59ec0d --- /dev/null +++ b/test/MC/AArch64/neon-scalar-fp-compare.s @@ -0,0 +1,103 @@ +// 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 Floating-point Compare Mask Equal +//---------------------------------------------------------------------- + + fcmeq s10, s11, s12 + fcmeq d20, d21, d22 + +// CHECK: fcmeq s10, s11, s12 // encoding: [0x6a,0xe5,0x2c,0x5e] +// CHECK: fcmeq d20, d21, d22 // encoding: [0xb4,0xe6,0x76,0x5e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Equal To Zero +//---------------------------------------------------------------------- + + fcmeq s10, s11, #0.0 + fcmeq d20, d21, #0.0 + +// CHECK: fcmeq s10, s11, #0.0 // encoding: [0x6a,0xd9,0xa0,0x5e] +// CHECK: fcmeq d20, d21, #0.0 // encoding: [0xb4,0xda,0xe0,0x5e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Greater Than Or Equal +//---------------------------------------------------------------------- + + fcmge s10, s11, s12 + fcmge d20, d21, d22 + +// CHECK: fcmge s10, s11, s12 // encoding: [0x6a,0xe5,0x2c,0x7e] +// CHECK: fcmge d20, d21, d22 // encoding: [0xb4,0xe6,0x76,0x7e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Greater Than Or Equal To Zero +//---------------------------------------------------------------------- + + fcmge s10, s11, #0.0 + fcmge d20, d21, #0.0 + +// CHECK: fcmge s10, s11, #0.0 // encoding: [0x6a,0xc9,0xa0,0x7e] +// CHECK: fcmge d20, d21, #0.0 // encoding: [0xb4,0xca,0xe0,0x7e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Greather Than +//---------------------------------------------------------------------- + + fcmgt s10, s11, s12 + fcmgt d20, d21, d22 + +// CHECK: fcmgt s10, s11, s12 // encoding: [0x6a,0xe5,0xac,0x7e] +// CHECK: fcmgt d20, d21, d22 // encoding: [0xb4,0xe6,0xf6,0x7e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Greather Than Zero +//---------------------------------------------------------------------- + + fcmgt s10, s11, #0.0 + fcmgt d20, d21, #0.0 + +// CHECK: fcmgt s10, s11, #0.0 // encoding: [0x6a,0xc9,0xa0,0x5e] +// CHECK: fcmgt d20, d21, #0.0 // encoding: [0xb4,0xca,0xe0,0x5e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Less Than Or Equal To Zero +//---------------------------------------------------------------------- + + fcmle s10, s11, #0.0 + fcmle d20, d21, #0.0 + +// CHECK: fcmle s10, s11, #0.0 // encoding: [0x6a,0xd9,0xa0,0x7e] +// CHECK: fcmle d20, d21, #0.0 // encoding: [0xb4,0xda,0xe0,0x7e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Compare Mask Less Than +//---------------------------------------------------------------------- + + fcmlt s10, s11, #0.0 + fcmlt d20, d21, #0.0 + +// CHECK: fcmlt s10, s11, #0.0 // encoding: [0x6a,0xe9,0xa0,0x5e] +// CHECK: fcmlt d20, d21, #0.0 // encoding: [0xb4,0xea,0xe0,0x5e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Absolute Compare Mask Greater Than Or Equal +//---------------------------------------------------------------------- + + facge s10, s11, s12 + facge d20, d21, d22 + +// CHECK: facge s10, s11, s12 // encoding: [0x6a,0xed,0x2c,0x7e] +// CHECK: facge d20, d21, d22 // encoding: [0xb4,0xee,0x76,0x7e] + +//---------------------------------------------------------------------- +// Scalar Floating-point Absolute Compare Mask Greater Than +//---------------------------------------------------------------------- + + facgt s10, s11, s12 + facgt d20, d21, d22 + +// CHECK: facgt s10, s11, s12 // encoding: [0x6a,0xed,0xac,0x7e] +// CHECK: facgt d20, d21, d22 // encoding: [0xb4,0xee,0xf6,0x7e] diff --git a/test/MC/Disassembler/AArch64/neon-instructions.txt b/test/MC/Disassembler/AArch64/neon-instructions.txt index fa34c37..2627b14 100644 --- a/test/MC/Disassembler/AArch64/neon-instructions.txt +++ b/test/MC/Disassembler/AArch64/neon-instructions.txt @@ -1601,6 +1601,86 @@ 0xb4,0x8e,0xf6,0x5e #---------------------------------------------------------------------- +# Scalar Floating-point Compare Mask Equal +#---------------------------------------------------------------------- +# CHECK: fcmeq s10, s11, s12 +# CHECK: fcmeq d20, d21, d22 +0x6a,0xe5,0x2c,0x5e +0xb4,0xe6,0x76,0x5e + +#---------------------------------------------------------------------- +# Scalar Floating-point Compare Mask Equal To Zero +#---------------------------------------------------------------------- +# CHECK: fcmeq s10, s11, #0.0 +# CHECK: fcmeq d20, d21, #0.0 +0x6a,0xd9,0xa0,0x5e +0xb4,0xda,0xe0,0x5e + +#---------------------------------------------------------------------- +# Scalar Floating-point Compare Mask Greater Than Or Equal +#---------------------------------------------------------------------- +# CHECK: fcmge s10, s11, s12 +# CHECK: fcmge d20, d21, d22 +0x6a,0xe5,0x2c,0x7e +0xb4,0xe6,0x76,0x7e + +#---------------------------------------------------------------------- +# Scalar Floating-point Compare Mask Greater Than Or Equal To Zero +#---------------------------------------------------------------------- +# CHECK: fcmge s10, s11, #0.0 +# CHECK: fcmge d20, d21, #0.0 +0x6a,0xc9,0xa0,0x7e +0xb4,0xca,0xe0,0x7e + +#---------------------------------------------------------------------- +# Scalar Floating-point Compare Mask Greather Than +#---------------------------------------------------------------------- +# CHECK: fcmgt s10, s11, s12 +# CHECK: fcmgt d20, d21, d22 +0x6a,0xe5,0xac,0x7e +0xb4,0xe6,0xf6,0x7e + +#---------------------------------------------------------------------- +# Scalar Floating-point Compare Mask Greather Than Zero +#---------------------------------------------------------------------- +# CHECK: fcmgt s10, s11, #0.0 +# CHECK: fcmgt d20, d21, #0.0 +0x6a,0xc9,0xa0,0x5e +0xb4,0xca,0xe0,0x5e + +#---------------------------------------------------------------------- +# Scalar Floating-point Compare Mask Less Than Or Equal To Zero +#---------------------------------------------------------------------- +# CHECK: fcmle s10, s11, #0.0 +# CHECK: fcmle d20, d21, #0.0 +0x6a,0xd9,0xa0,0x7e +0xb4,0xda,0xe0,0x7e + +#---------------------------------------------------------------------- +# Scalar Floating-point Compare Mask Less Than +#---------------------------------------------------------------------- +# CHECK: fcmlt s10, s11, #0.0 +# CHECK: fcmlt d20, d21, #0.0 +0x6a,0xe9,0xa0,0x5e +0xb4,0xea,0xe0,0x5e + +#---------------------------------------------------------------------- +# Scalar Floating-point Absolute Compare Mask Greater Than Or Equal +#---------------------------------------------------------------------- +# CHECK: facge s10, s11, s12 +# CHECK: facge d20, d21, d22 +0x6a,0xed,0x2c,0x7e +0xb4,0xee,0x76,0x7e + +#---------------------------------------------------------------------- +# Scalar Floating-point Absolute Compare Mask Greater Than +#---------------------------------------------------------------------- +# CHECK: facgt s10, s11, s12 +# CHECK: facgt d20, d21, d22 +0x6a,0xed,0xac,0x7e +0xb4,0xee,0xf6,0x7e + +#---------------------------------------------------------------------- # Scalar Absolute Value #---------------------------------------------------------------------- # CHECK: abs d29, d24 |