diff --git a/llvm/lib/Target/AArch64/AArch64InstrFormats.td b/llvm/lib/Target/AArch64/AArch64InstrFormats.td index 1d1d9b5512cfc..4b24b166143dc 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrFormats.td +++ b/llvm/lib/Target/AArch64/AArch64InstrFormats.td @@ -12626,3 +12626,64 @@ def : TokenAlias<".H", ".h">; def : TokenAlias<".S", ".s">; def : TokenAlias<".D", ".d">; def : TokenAlias<".Q", ".q">; + +//---------------------------------------------------------------------------- +// 2024 Armv9.6 Extensions +//---------------------------------------------------------------------------- + +let mayLoad = 1, mayStore = 1 in +class BaseAtomicFPLoad sz, bits<2> AR, + bits<3> op0, string asm> +: I<(outs regtype:$Rt), + (ins regtype:$Rs, GPR64sp:$Rn), + asm, "\t$Rs, $Rt, [$Rn]","", []>, + Sched<[]> { + bits<5> Rt; + bits<5> Rs; + bits<5> Rn; + let Inst{31-30} = sz; + let Inst{29-24} = 0b111100; + let Inst{23-22} = AR; + let Inst{21} = 0b1; + let Inst{20-16} = Rs; + let Inst{15} = 0b0; + let Inst{14-12} = op0; + let Inst{11-10} = 0b00; + let Inst{9-5} = Rn; + let Inst{4-0} = Rt; +} + +multiclass AtomicFPLoad AR, bits<3> op0, string asm> { + def D : BaseAtomicFPLoad; + def S : BaseAtomicFPLoad; + def H : BaseAtomicFPLoad; +} + +let mayLoad = 1, mayStore = 1 in +class BaseAtomicFPStore sz, bit R, + bits<3> op0, string asm> +: I<(outs), + (ins regtype:$Rs, GPR64sp:$Rn), + asm, "\t$Rs, [$Rn]", + "", []>, + Sched<[]> { + bits<5> Rt; + bits<5> Rs; + bits<5> Rn; + let Inst{31-30} = sz; + let Inst{29-23} = 0b1111000; + let Inst{22} = R; + let Inst{21} = 0b1; + let Inst{20-16} = Rs; + let Inst{15} = 0b1; + let Inst{14-12} = op0; + let Inst{11-10} = 0b00; + let Inst{9-5} = Rn; + let Inst{4-0} = 0b11111; +} + +multiclass AtomicFPStore op0, string asm> { + def D : BaseAtomicFPStore; + def S : BaseAtomicFPStore; + def H : BaseAtomicFPStore; +} diff --git a/llvm/lib/Target/AArch64/AArch64InstrInfo.td b/llvm/lib/Target/AArch64/AArch64InstrInfo.td index 6c9f0986b9e34..8118be1d43db2 100644 --- a/llvm/lib/Target/AArch64/AArch64InstrInfo.td +++ b/llvm/lib/Target/AArch64/AArch64InstrInfo.td @@ -10378,6 +10378,78 @@ defm : PromoteBinaryv8f16Tov4f32; defm : PromoteBinaryv8f16Tov4f32; defm : PromoteBinaryv8f16Tov4f32; +//===-----------------------------------------------------===// +// Atomic floating-point in-memory instructions (FEAT_LSFE) +//===-----------------------------------------------------===// + +let Predicates = [HasLSFE] in { + // Floating-point Atomic Load + defm LDFADDA : AtomicFPLoad<0b10, 0b000, "ldfadda">; + defm LDFADDAL : AtomicFPLoad<0b11, 0b000, "ldfaddal">; + defm LDFADD : AtomicFPLoad<0b00, 0b000, "ldfadd">; + defm LDFADDL : AtomicFPLoad<0b01, 0b000, "ldfaddl">; + defm LDFMAXA : AtomicFPLoad<0b10, 0b100, "ldfmaxa">; + defm LDFMAXAL : AtomicFPLoad<0b11, 0b100, "ldfmaxal">; + defm LDFMAX : AtomicFPLoad<0b00, 0b100, "ldfmax">; + defm LDFMAXL : AtomicFPLoad<0b01, 0b100, "ldfmaxl">; + defm LDFMINA : AtomicFPLoad<0b10, 0b101, "ldfmina">; + defm LDFMINAL : AtomicFPLoad<0b11, 0b101, "ldfminal">; + defm LDFMIN : AtomicFPLoad<0b00, 0b101, "ldfmin">; + defm LDFMINL : AtomicFPLoad<0b01, 0b101, "ldfminl">; + defm LDFMAXNMA : AtomicFPLoad<0b10, 0b110, "ldfmaxnma">; + defm LDFMAXNMAL : AtomicFPLoad<0b11, 0b110, "ldfmaxnmal">; + defm LDFMAXNM : AtomicFPLoad<0b00, 0b110, "ldfmaxnm">; + defm LDFMAXNML : AtomicFPLoad<0b01, 0b110, "ldfmaxnml">; + defm LDFMINNMA : AtomicFPLoad<0b10, 0b111, "ldfminnma">; + defm LDFMINNMAL : AtomicFPLoad<0b11, 0b111, "ldfminnmal">; + defm LDFMINMN : AtomicFPLoad<0b00, 0b111, "ldfminnm">; + defm LDFMINNML : AtomicFPLoad<0b01, 0b111, "ldfminnml">; + // BFloat16 + def LDBFADDA : BaseAtomicFPLoad; + def LDBFADDAL : BaseAtomicFPLoad; + def LDBFADD : BaseAtomicFPLoad; + def LDBFADDL : BaseAtomicFPLoad; + def LDBFMAXA : BaseAtomicFPLoad; + def LDBFMAXAL : BaseAtomicFPLoad; + def LDBFMAX : BaseAtomicFPLoad; + def LDBFMAXL : BaseAtomicFPLoad; + def LDBFMINA : BaseAtomicFPLoad; + def LDBFMINAL : BaseAtomicFPLoad; + def LDBFMIN : BaseAtomicFPLoad; + def LDBFMINL : BaseAtomicFPLoad; + def LDBFMAXNMA : BaseAtomicFPLoad; + def LDBFMAXNMAL : BaseAtomicFPLoad; + def LDBFMAXNM : BaseAtomicFPLoad; + def LDBFMAXNML : BaseAtomicFPLoad; + def LDBFMINNMA : BaseAtomicFPLoad; + def LDBFMINNMAL : BaseAtomicFPLoad; + def LDBFMINNM : BaseAtomicFPLoad; + def LDBFMINNML : BaseAtomicFPLoad; + + // Floating-point Atomic Store + defm STFADD : AtomicFPStore<0b0, 0b000, "stfadd">; + defm STFADDL : AtomicFPStore<0b1, 0b000, "stfaddl">; + defm STFMAX : AtomicFPStore<0b0, 0b100, "stfmax">; + defm STFMAXL : AtomicFPStore<0b1, 0b100, "stfmaxl">; + defm STFMIN : AtomicFPStore<0b0, 0b101, "stfmin">; + defm STFMINL : AtomicFPStore<0b1, 0b101, "stfminl">; + defm STFMAXNM : AtomicFPStore<0b0, 0b110, "stfmaxnm">; + defm STFMAXNML : AtomicFPStore<0b1, 0b110, "stfmaxnml">; + defm STFMINNM : AtomicFPStore<0b0, 0b111, "stfminnm">; + defm STFMINNML : AtomicFPStore<0b1, 0b111, "stfminnml">; + // BFloat16 + def STBFADD : BaseAtomicFPStore; + def STBFADDL : BaseAtomicFPStore; + def STBFMAX : BaseAtomicFPStore; + def STBFMAXL : BaseAtomicFPStore; + def STBFMIN : BaseAtomicFPStore; + def STBFMINL : BaseAtomicFPStore; + def STBFMAXNM : BaseAtomicFPStore; + def STBFMAXNML : BaseAtomicFPStore; + def STBFMINNM : BaseAtomicFPStore; + def STBFMINNML : BaseAtomicFPStore; +} + include "AArch64InstrAtomics.td" include "AArch64SVEInstrInfo.td" include "AArch64SMEInstrInfo.td" diff --git a/llvm/test/MC/AArch64/LSFE/directive-arch-negative.s b/llvm/test/MC/AArch64/LSFE/directive-arch-negative.s new file mode 100644 index 0000000000000..2520d777f4cf6 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/directive-arch-negative.s @@ -0,0 +1,7 @@ +// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s + +.arch armv9.6-a+lsfe +.arch armv9.6-a+nolsfe +ldfadd h0, h1, [x2] +// CHECK: error: instruction requires: lsfe +// CHECK: ldfadd h0, h1, [x2] \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/directive-arch.s b/llvm/test/MC/AArch64/LSFE/directive-arch.s new file mode 100644 index 0000000000000..4fd6135e1a512 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/directive-arch.s @@ -0,0 +1,5 @@ +// RUN: llvm-mc -triple aarch64 -o - %s 2>&1 | FileCheck %s + +.arch armv9.6-a+lsfe +ldfadd h0, h1, [x2] +// CHECK: ldfadd h0, h1, [x2] \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/directive-arch_extension-negative.s b/llvm/test/MC/AArch64/LSFE/directive-arch_extension-negative.s new file mode 100644 index 0000000000000..f74dfb13e8245 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/directive-arch_extension-negative.s @@ -0,0 +1,7 @@ +// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s + +.arch_extension lsfe +.arch_extension nolsfe +ldfadd h0, h1, [x2] +// CHECK: error: instruction requires: lsfe +// CHECK-NEXT: ldfadd h0, h1, [x2] \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/directive-arch_extension.s b/llvm/test/MC/AArch64/LSFE/directive-arch_extension.s new file mode 100644 index 0000000000000..1dfca73aeb340 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/directive-arch_extension.s @@ -0,0 +1,5 @@ +// RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s + +.arch_extension lsfe +ldfadd h0, h1, [x2] +// CHECK: ldfadd h0, h1, [x2] \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/directive-cpu-negative.s b/llvm/test/MC/AArch64/LSFE/directive-cpu-negative.s new file mode 100644 index 0000000000000..443161b51e947 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/directive-cpu-negative.s @@ -0,0 +1,7 @@ +// RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s + +.cpu generic+lsfe +.cpu generic+nolsfe +ldfadd h0, h1, [x2] +// CHECK: error: instruction requires: lsfe +// CHECK-NEXT: ldfadd h0, h1, [x2] \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/directive-cpu.s b/llvm/test/MC/AArch64/LSFE/directive-cpu.s new file mode 100644 index 0000000000000..ae58cd67c2c7d --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/directive-cpu.s @@ -0,0 +1,5 @@ +// RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s + +.cpu generic+lsfe +ldfadd h0, h1, [x2] +// CHECK: ldfadd h0, h1, [x2] diff --git a/llvm/test/MC/AArch64/LSFE/ldfadd-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfadd-diagnostics.s new file mode 100644 index 0000000000000..eb36a0286db7d --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfadd-diagnostics.s @@ -0,0 +1,241 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// LDFADD +//------------------------------------------------------------------------------ + +ldfadd h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadd h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfadd s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadd s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfadd d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadd d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfadd d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadd d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfadd s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadd s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfadda + +ldfadda h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadda h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfadda s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadda s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfadda d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadda d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfadda d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadda d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfadda s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfadda s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfaddal + +ldfaddal h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddal h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfaddal s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddal s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfaddal d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddal d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfaddal d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddal d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfaddal s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddal s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfaddl + +ldfaddl h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddl h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfaddl s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddl s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfaddl d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddl d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfaddl d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddl d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfaddl s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfaddl s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// LDBFADD +//------------------------------------------------------------------------------ + +ldbfadd s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadd s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadd h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadd h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadd s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadd s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadd d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadd d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadd h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadd h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadd h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadd h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfadda + +ldbfadda s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadda s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadda h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadda h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadda s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadda s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadda d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadda d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadda h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadda h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfadda h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfadda h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfaddal + +ldbfaddal s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddal s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddal h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddal h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddal s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddal s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddal d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddal d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddal h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddal h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddal h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddal h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfaddl + +ldbfaddl s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddl s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddl h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddl h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddl s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddl s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddl d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddl d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddl h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddl h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfaddl h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfaddl h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfadd.s b/llvm/test/MC/AArch64/LSFE/ldfadd.s new file mode 100644 index 0000000000000..e80ca3b70533a --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfadd.s @@ -0,0 +1,225 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// LDFADD +//------------------------------------------------------------------------------ + +ldfadd h0, h1, [x2] +// CHECK-INST: ldfadd h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x00,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c200041 + +ldfadd h2, h3, [sp] +// CHECK-INST: ldfadd h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c2203e3 + +ldfadd s0, s1, [x2] +// CHECK-INST: ldfadd s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x00,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc200041 + +ldfadd s2, s3, [sp] +// CHECK-INST: ldfadd s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc2203e3 + +ldfadd d0, d1, [x2] +// CHECK-INST: ldfadd d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x00,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc200041 + +ldfadd d2, d3, [sp] +// CHECK-INST: ldfadd d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc2203e3 + +// -- ldfadda + +ldfadda h0, h1, [x2] +// CHECK-INST: ldfadda h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x00,0xa0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca00041 + +ldfadda h2, h3, [sp] +// CHECK-INST: ldfadda h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0xa2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca203e3 + +ldfadda s0, s1, [x2] +// CHECK-INST: ldfadda s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x00,0xa0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca00041 + +ldfadda s2, s3, [sp] +// CHECK-INST: ldfadda s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0xa2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca203e3 + +ldfadda d0, d1, [x2] +// CHECK-INST: ldfadda d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x00,0xa0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca00041 + +ldfadda d2, d3, [sp] +// CHECK-INST: ldfadda d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0xa2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca203e3 + +// -- ldfaddal + +ldfaddal h0, h1, [x2] +// CHECK-INST: ldfaddal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x00,0xe0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce00041 + +ldfaddal h2, h3, [sp] +// CHECK-INST: ldfaddal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0xe2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce203e3 + +ldfaddal s0, s1, [x2] +// CHECK-INST: ldfaddal s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x00,0xe0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce00041 + +ldfaddal s2, s3, [sp] +// CHECK-INST: ldfaddal s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0xe2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce203e3 + +ldfaddal d0, d1, [x2] +// CHECK-INST: ldfaddal d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x00,0xe0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce00041 + +ldfaddal d2, d3, [sp] +// CHECK-INST: ldfaddal d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0xe2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce203e3 + +// -- ldfaddl + +ldfaddl h0, h1, [x2] +// CHECK-INST: ldfaddl h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x00,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c600041 + +ldfaddl h2, h3, [sp] +// CHECK-INST: ldfaddl h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c6203e3 + +ldfaddl s0, s1, [x2] +// CHECK-INST: ldfaddl s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x00,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc600041 + +ldfaddl s2, s3, [sp] +// CHECK-INST: ldfaddl s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc6203e3 + +ldfaddl d0, d1, [x2] +// CHECK-INST: ldfaddl d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x00,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc600041 + +ldfaddl d2, d3, [sp] +// CHECK-INST: ldfaddl d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc6203e3 + +ldbfadd h2, h3, [sp] +// CHECK-INST: ldbfadd h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c2203e3 + +// -- ldbfadda + +ldbfadda h0, h1, [x2] +// CHECK-INST: ldbfadda h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x00,0xa0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca00041 + +ldbfadda h2, h3, [sp] +// CHECK-INST: ldbfadda h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0xa2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca203e3 + +// -- ldbfaddal + +ldbfaddal h0, h1, [x2] +// CHECK-INST: ldbfaddal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x00,0xe0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce00041 + +ldbfaddal h2, h3, [sp] +// CHECK-INST: ldbfaddal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0xe2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce203e3 + +// -- ldbfaddl + +ldbfaddl h0, h1, [x2] +// CHECK-INST: ldbfaddl h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x00,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c600041 + +ldbfaddl h2, h3, [sp] +// CHECK-INST: ldbfaddl h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x03,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c6203e3 \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfmax-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfmax-diagnostics.s new file mode 100644 index 0000000000000..e062e400b67ff --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfmax-diagnostics.s @@ -0,0 +1,241 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// LDFMAX +//------------------------------------------------------------------------------ + +ldfmax h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmax h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmax s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmax s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmax d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmax d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmax d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmax d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmax s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmax s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfmaxa + +ldfmaxa h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxa h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxa s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxa s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxa d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxa d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxa d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxa d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxa s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxa s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfmaxal + +ldfmaxal h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxal h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxal s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxal s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxal d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxal d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxal d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxal d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxal s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxal s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfmaxl + +ldfmaxl h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxl h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxl s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxl s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxl d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxl d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxl d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxl d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxl s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxl s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// LDBFMAX +//------------------------------------------------------------------------------ + +ldbfmax s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmax s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmax h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmax h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmax s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmax s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmax d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmax d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmax h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmax h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmax h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmax h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfmaxa + +ldbfmaxa s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxa s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxa h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxa h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxa s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxa s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxa d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxa d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxa h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxa h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxa h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxa h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfmaxal + +ldbfmaxal s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxal s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxal h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxal h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxal s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxal s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxal d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxal d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxal h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxal h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxal h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxal h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfmaxl + +ldbfmaxl s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxl s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxl h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxl h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxl s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxl s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxl d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxl d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxl h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxl h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxl h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxl h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfmax.s b/llvm/test/MC/AArch64/LSFE/ldfmax.s new file mode 100644 index 0000000000000..40c9e05d1b233 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfmax.s @@ -0,0 +1,225 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// LDFMAX +//------------------------------------------------------------------------------ + +ldfmax h0, h1, [x2] +// CHECK-INST: ldfmax h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x40,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c204041 + +ldfmax h2, h3, [sp] +// CHECK-INST: ldfmax h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c2243e3 + +ldfmax s0, s1, [x2] +// CHECK-INST: ldfmax s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x40,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc204041 + +ldfmax s2, s3, [sp] +// CHECK-INST: ldfmax s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc2243e3 + +ldfmax d0, d1, [x2] +// CHECK-INST: ldfmax d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x40,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc204041 + +ldfmax d2, d3, [sp] +// CHECK-INST: ldfmax d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc2243e3 + +// -- ldfmaxa + +ldfmaxa h0, h1, [x2] +// CHECK-INST: ldfmaxa h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x40,0xa0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca04041 + +ldfmaxa h2, h3, [sp] +// CHECK-INST: ldfmaxa h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0xa2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca243e3 + +ldfmaxa s0, s1, [x2] +// CHECK-INST: ldfmaxa s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x40,0xa0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca04041 + +ldfmaxa s2, s3, [sp] +// CHECK-INST: ldfmaxa s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0xa2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca243e3 + +ldfmaxa d0, d1, [x2] +// CHECK-INST: ldfmaxa d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x40,0xa0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca04041 + +ldfmaxa d2, d3, [sp] +// CHECK-INST: ldfmaxa d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0xa2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca243e3 + +// -- ldfmaxal + +ldfmaxal h0, h1, [x2] +// CHECK-INST: ldfmaxal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x40,0xe0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce04041 + +ldfmaxal h2, h3, [sp] +// CHECK-INST: ldfmaxal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0xe2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce243e3 + +ldfmaxal s0, s1, [x2] +// CHECK-INST: ldfmaxal s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x40,0xe0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce04041 + +ldfmaxal s2, s3, [sp] +// CHECK-INST: ldfmaxal s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0xe2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce243e3 + +ldfmaxal d0, d1, [x2] +// CHECK-INST: ldfmaxal d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x40,0xe0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce04041 + +ldfmaxal d2, d3, [sp] +// CHECK-INST: ldfmaxal d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0xe2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce243e3 + +// -- ldfmaxl + +ldfmaxl h0, h1, [x2] +// CHECK-INST: ldfmaxl h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x40,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c604041 + +ldfmaxl h2, h3, [sp] +// CHECK-INST: ldfmaxl h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c6243e3 + +ldfmaxl s0, s1, [x2] +// CHECK-INST: ldfmaxl s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x40,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc604041 + +ldfmaxl s2, s3, [sp] +// CHECK-INST: ldfmaxl s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc6243e3 + +ldfmaxl d0, d1, [x2] +// CHECK-INST: ldfmaxl d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x40,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc604041 + +ldfmaxl d2, d3, [sp] +// CHECK-INST: ldfmaxl d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc6243e3 + +//------------------------------------------------------------------------------ +// LDBFMAX +//------------------------------------------------------------------------------ + +ldbfmax h0, h1, [x2] +// CHECK-INST: ldbfmax h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x40,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c204041 + +ldbfmax h2, h3, [sp] +// CHECK-INST: ldbfmax h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c2243e3 + +// -- ldbfmaxa + +ldbfmaxa h0, h1, [x2] +// CHECK-INST: ldbfmaxa h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x40,0xa0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca04041 + +ldbfmaxa h2, h3, [sp] +// CHECK-INST: ldbfmaxa h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0xa2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca243e3 + +// -- ldbfmaxal + +ldbfmaxal h0, h1, [x2] +// CHECK-INST: ldbfmaxal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x40,0xe0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce04041 + +ldbfmaxal h2, h3, [sp] +// CHECK-INST: ldbfmaxal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0xe2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce243e3 + +// -- ldbfmaxl + +ldbfmaxl h0, h1, [x2] +// CHECK-INST: ldbfmaxl h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x40,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c604041 + +ldbfmaxl h2, h3, [sp] +// CHECK-INST: ldbfmaxl h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x43,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c6243e3 \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfmaxnm-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfmaxnm-diagnostics.s new file mode 100644 index 0000000000000..2bd4da5624b0a --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfmaxnm-diagnostics.s @@ -0,0 +1,241 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// LDFMAXNM +//------------------------------------------------------------------------------ + +ldfmaxnm h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnm h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnm s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnm s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnm d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnm d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnm d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnm d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnm s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnm s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfmaxnma + +ldfmaxnma h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnma h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnma s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnma s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnma d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnma d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnma d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnma d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnma s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnma s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfmaxnmal + +ldfmaxnmal h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnmal h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnmal s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnmal s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnmal d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnmal d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnmal d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnmal d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnmal s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnmal s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfmaxnml + +ldfmaxnml h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnml h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnml s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnml s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnml d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnml d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnml d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnml d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmaxnml s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmaxnml s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// LDBFMAXNM +//------------------------------------------------------------------------------ + +ldbfmaxnm s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnm s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnm h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnm h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnm s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnm s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnm d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnm d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnm h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnm h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnm h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnm h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfmaxnma + +ldbfmaxnma s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnma s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnma h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnma h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnma s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnma s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnma d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnma d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnma h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnma h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnma h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnma h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfmaxnmal + +ldbfmaxnmal s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnmal s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnmal h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnmal h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnmal s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnmal s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnmal d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnmal d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnmal h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnmal h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnmal h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnmal h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfmaxnml + +ldbfmaxnml s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnml s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnml h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnml h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnml s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnml s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnml d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnml d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmaxnml h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnml h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +ldbfmaxnml h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmaxnml h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfmaxnm.s b/llvm/test/MC/AArch64/LSFE/ldfmaxnm.s new file mode 100644 index 0000000000000..bfa1c50d41bfa --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfmaxnm.s @@ -0,0 +1,225 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// LDFMAXNM +//------------------------------------------------------------------------------ + +ldfmaxnm h0, h1, [x2] +// CHECK-INST: ldfmaxnm h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x60,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c206041 + +ldfmaxnm h2, h3, [sp] +// CHECK-INST: ldfmaxnm h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c2263e3 + +ldfmaxnm s0, s1, [x2] +// CHECK-INST: ldfmaxnm s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x60,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc206041 + +ldfmaxnm s2, s3, [sp] +// CHECK-INST: ldfmaxnm s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc2263e3 + +ldfmaxnm d0, d1, [x2] +// CHECK-INST: ldfmaxnm d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x60,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc206041 + +ldfmaxnm d2, d3, [sp] +// CHECK-INST: ldfmaxnm d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc2263e3 + +// -- ldfmaxnma + +ldfmaxnma h0, h1, [x2] +// CHECK-INST: ldfmaxnma h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x60,0xa0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca06041 + +ldfmaxnma h2, h3, [sp] +// CHECK-INST: ldfmaxnma h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0xa2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca263e3 + +ldfmaxnma s0, s1, [x2] +// CHECK-INST: ldfmaxnma s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x60,0xa0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca06041 + +ldfmaxnma s2, s3, [sp] +// CHECK-INST: ldfmaxnma s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0xa2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca263e3 + +ldfmaxnma d0, d1, [x2] +// CHECK-INST: ldfmaxnma d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x60,0xa0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca06041 + +ldfmaxnma d2, d3, [sp] +// CHECK-INST: ldfmaxnma d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0xa2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca263e3 + +// -- ldfmaxnmal + +ldfmaxnmal h0, h1, [x2] +// CHECK-INST: ldfmaxnmal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x60,0xe0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce06041 + +ldfmaxnmal h2, h3, [sp] +// CHECK-INST: ldfmaxnmal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0xe2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce263e3 + +ldfmaxnmal s0, s1, [x2] +// CHECK-INST: ldfmaxnmal s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x60,0xe0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce06041 + +ldfmaxnmal s2, s3, [sp] +// CHECK-INST: ldfmaxnmal s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0xe2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce263e3 + +ldfmaxnmal d0, d1, [x2] +// CHECK-INST: ldfmaxnmal d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x60,0xe0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce06041 + +ldfmaxnmal d2, d3, [sp] +// CHECK-INST: ldfmaxnmal d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0xe2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce263e3 + +// -- ldfmaxnml + +ldfmaxnml h0, h1, [x2] +// CHECK-INST: ldfmaxnml h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x60,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c606041 + +ldfmaxnml h2, h3, [sp] +// CHECK-INST: ldfmaxnml h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c6263e3 + +ldfmaxnml s0, s1, [x2] +// CHECK-INST: ldfmaxnml s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x60,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc606041 + +ldfmaxnml s2, s3, [sp] +// CHECK-INST: ldfmaxnml s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc6263e3 + +ldfmaxnml d0, d1, [x2] +// CHECK-INST: ldfmaxnml d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x60,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc606041 + +ldfmaxnml d2, d3, [sp] +// CHECK-INST: ldfmaxnml d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc6263e3 + +//------------------------------------------------------------------------------ +// LDBFMAXNM +//------------------------------------------------------------------------------ + +ldbfmaxnm h0, h1, [x2] +// CHECK-INST: ldbfmaxnm h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x60,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c206041 + +ldbfmaxnm h2, h3, [sp] +// CHECK-INST: ldbfmaxnm h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c2263e3 + +// -- ldbfmaxnma + +ldbfmaxnma h0, h1, [x2] +// CHECK-INST: ldbfmaxnma h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x60,0xa0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca06041 + +ldbfmaxnma h2, h3, [sp] +// CHECK-INST: ldbfmaxnma h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0xa2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca263e3 + +// -- ldbfmaxnmal + +ldbfmaxnmal h0, h1, [x2] +// CHECK-INST: ldbfmaxnmal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x60,0xe0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce06041 + +ldbfmaxnmal h2, h3, [sp] +// CHECK-INST: ldbfmaxnmal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0xe2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce263e3 + +// -- ldbfmaxnml + +ldbfmaxnml h0, h1, [x2] +// CHECK-INST: ldbfmaxnml h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x60,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c606041 + +ldbfmaxnml h2, h3, [sp] +// CHECK-INST: ldbfmaxnml h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x63,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c6263e3 \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfmin-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfmin-diagnostics.s new file mode 100644 index 0000000000000..e50f94e8ec45d --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfmin-diagnostics.s @@ -0,0 +1,241 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// LDFMIN +//------------------------------------------------------------------------------ + +ldfmin h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmin h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmin s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmin s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmin d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmin d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmin d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmin d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmin s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmin s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfmina + +ldfmina h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmina h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmina s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmina s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmina d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmina d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmina d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmina d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfmina s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfmina s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfminal + +ldfminal h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminal h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminal s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminal s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminal d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminal d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminal d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminal d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminal s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminal s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfminl + +ldfminl h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminl h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminl s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminl s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminl d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminl d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminl d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminl d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminl s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminl s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// LDBFMIN +//------------------------------------------------------------------------------ + +ldbfmin s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmin s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmin h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmin h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmin s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmin s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmin d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmin d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmin h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmin h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmin h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmin h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfmina + +ldbfmina s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmina s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmina h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmina h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmina s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmina s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmina d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmina d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmina h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmina h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfmina h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfmina h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfminal + +ldbfminal s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminal s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminal h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminal h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminal s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminal s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminal d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminal d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminal h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminal h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminal h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminal h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfminl + +ldbfminl s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminl s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminl h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminl h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminl s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminl s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminl d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminl d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminl h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminl h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminl h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminl h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfmin.s b/llvm/test/MC/AArch64/LSFE/ldfmin.s new file mode 100644 index 0000000000000..4867db04a69ca --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfmin.s @@ -0,0 +1,225 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// LDFMIN +//------------------------------------------------------------------------------ + +ldfmin h0, h1, [x2] +// CHECK-INST: ldfmin h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x50,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c205041 + +ldfmin h2, h3, [sp] +// CHECK-INST: ldfmin h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c2253e3 + +ldfmin s0, s1, [x2] +// CHECK-INST: ldfmin s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x50,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc205041 + +ldfmin s2, s3, [sp] +// CHECK-INST: ldfmin s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc2253e3 + +ldfmin d0, d1, [x2] +// CHECK-INST: ldfmin d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x50,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc205041 + +ldfmin d2, d3, [sp] +// CHECK-INST: ldfmin d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc2253e3 + +// -- ldfmina + +ldfmina h0, h1, [x2] +// CHECK-INST: ldfmina h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x50,0xa0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca05041 + +ldfmina h2, h3, [sp] +// CHECK-INST: ldfmina h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0xa2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca253e3 + +ldfmina s0, s1, [x2] +// CHECK-INST: ldfmina s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x50,0xa0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca05041 + +ldfmina s2, s3, [sp] +// CHECK-INST: ldfmina s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0xa2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca253e3 + +ldfmina d0, d1, [x2] +// CHECK-INST: ldfmina d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x50,0xa0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca05041 + +ldfmina d2, d3, [sp] +// CHECK-INST: ldfmina d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0xa2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca253e3 + +// -- ldfminal + +ldfminal h0, h1, [x2] +// CHECK-INST: ldfminal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x50,0xe0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce05041 + +ldfminal h2, h3, [sp] +// CHECK-INST: ldfminal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0xe2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce253e3 + +ldfminal s0, s1, [x2] +// CHECK-INST: ldfminal s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x50,0xe0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce05041 + +ldfminal s2, s3, [sp] +// CHECK-INST: ldfminal s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0xe2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce253e3 + +ldfminal d0, d1, [x2] +// CHECK-INST: ldfminal d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x50,0xe0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce05041 + +ldfminal d2, d3, [sp] +// CHECK-INST: ldfminal d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0xe2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce253e3 + +// -- ldfminl + +ldfminl h0, h1, [x2] +// CHECK-INST: ldfminl h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x50,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c605041 + +ldfminl h2, h3, [sp] +// CHECK-INST: ldfminl h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c6253e3 + +ldfminl s0, s1, [x2] +// CHECK-INST: ldfminl s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x50,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc605041 + +ldfminl s2, s3, [sp] +// CHECK-INST: ldfminl s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc6253e3 + +ldfminl d0, d1, [x2] +// CHECK-INST: ldfminl d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x50,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc605041 + +ldfminl d2, d3, [sp] +// CHECK-INST: ldfminl d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc6253e3 + +//------------------------------------------------------------------------------ +// LDBFMIN +//------------------------------------------------------------------------------ + +ldbfmin h0, h1, [x2] +// CHECK-INST: ldbfmin h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x50,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c205041 + +ldbfmin h2, h3, [sp] +// CHECK-INST: ldbfmin h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c2253e3 + +// -- ldbfmina + +ldbfmina h0, h1, [x2] +// CHECK-INST: ldbfmina h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x50,0xa0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca05041 + +ldbfmina h2, h3, [sp] +// CHECK-INST: ldbfmina h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0xa2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca253e3 + +// -- ldbfminal + +ldbfminal h0, h1, [x2] +// CHECK-INST: ldbfminal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x50,0xe0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce05041 + +ldbfminal h2, h3, [sp] +// CHECK-INST: ldbfminal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0xe2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce253e3 + +// -- ldbfminl + +ldbfminl h0, h1, [x2] +// CHECK-INST: ldbfminl h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x50,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c605041 + +ldbfminl h2, h3, [sp] +// CHECK-INST: ldbfminl h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x53,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c6253e3 \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfminnm-diagnostics.s b/llvm/test/MC/AArch64/LSFE/ldfminnm-diagnostics.s new file mode 100644 index 0000000000000..e31adb5156806 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfminnm-diagnostics.s @@ -0,0 +1,241 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// ldfmin +//------------------------------------------------------------------------------ + +ldfminnm h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnm h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnm s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnm s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnm d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnm d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnm d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnm d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnm s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnm s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfminnma + +ldfminnma h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnma h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnma s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnma s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnma d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnma d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnma d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnma d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnma s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnma s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfminnmal + +ldfminnmal h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnmal h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnmal s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnmal s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnmal d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnmal d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnmal d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnmal d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnmal s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnmal s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldfminnml + +ldfminnml h0, s2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnml h0, s2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnml s0, d2, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnml s0, d2, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnml d0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnml d0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnml d0, d1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnml d0, d1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldfminnml s0, s1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldfminnml s0, s1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// LDBFMINNM +//------------------------------------------------------------------------------ + +ldbfminnm s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnm s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnm h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnm h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnm s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnm s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnm d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnm d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnm h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnm h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnm h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnm h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfminnma + +ldbfminnma s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnma s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnma h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnma h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnma s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnma s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnma d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnma d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnma h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnma h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnma h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnma h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfminnmal + +ldbfminnmal s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnmal s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnmal h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnmal h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnmal s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnmal s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnmal d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnmal d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnmal h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnmal h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnmal h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnmal h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- ldbfminnml + +ldbfminnml s0, h1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnml s0, h1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnml h0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnml h0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnml s0, s1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnml s0, s1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnml d0, d1, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnml d0, d1, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnml h0, h1, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnml h0, h1, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +ldbfminnml h0, h1, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: ldbfminnml h0, h1, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/ldfminnm.s b/llvm/test/MC/AArch64/LSFE/ldfminnm.s new file mode 100644 index 0000000000000..ae027aa1f8aed --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/ldfminnm.s @@ -0,0 +1,225 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// LDFMINNM +//------------------------------------------------------------------------------ + +ldfminnm h0, h1, [x2] +// CHECK-INST: ldfminnm h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x70,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c207041 + +ldfminnm h2, h3, [sp] +// CHECK-INST: ldfminnm h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c2273e3 + +ldfminnm s0, s1, [x2] +// CHECK-INST: ldfminnm s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x70,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc207041 + +ldfminnm s2, s3, [sp] +// CHECK-INST: ldfminnm s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc2273e3 + +ldfminnm d0, d1, [x2] +// CHECK-INST: ldfminnm d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x70,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc207041 + +ldfminnm d2, d3, [sp] +// CHECK-INST: ldfminnm d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc2273e3 + +// -- ldfminnma + +ldfminnma h0, h1, [x2] +// CHECK-INST: ldfminnma h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x70,0xa0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca07041 + +ldfminnma h2, h3, [sp] +// CHECK-INST: ldfminnma h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0xa2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ca273e3 + +ldfminnma s0, s1, [x2] +// CHECK-INST: ldfminnma s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x70,0xa0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca07041 + +ldfminnma s2, s3, [sp] +// CHECK-INST: ldfminnma s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0xa2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bca273e3 + +ldfminnma d0, d1, [x2] +// CHECK-INST: ldfminnma d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x70,0xa0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca07041 + +ldfminnma d2, d3, [sp] +// CHECK-INST: ldfminnma d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0xa2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fca273e3 + +// -- ldfminnmal + +ldfminnmal h0, h1, [x2] +// CHECK-INST: ldfminnmal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x70,0xe0,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce07041 + +ldfminnmal h2, h3, [sp] +// CHECK-INST: ldfminnmal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0xe2,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7ce273e3 + +ldfminnmal s0, s1, [x2] +// CHECK-INST: ldfminnmal s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x70,0xe0,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce07041 + +ldfminnmal s2, s3, [sp] +// CHECK-INST: ldfminnmal s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0xe2,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bce273e3 + +ldfminnmal d0, d1, [x2] +// CHECK-INST: ldfminnmal d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x70,0xe0,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce07041 + +ldfminnmal d2, d3, [sp] +// CHECK-INST: ldfminnmal d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0xe2,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fce273e3 + +// -- ldfminnml + +ldfminnml h0, h1, [x2] +// CHECK-INST: ldfminnml h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x70,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c607041 + +ldfminnml h2, h3, [sp] +// CHECK-INST: ldfminnml h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c6273e3 + +ldfminnml s0, s1, [x2] +// CHECK-INST: ldfminnml s0, s1, [x2] +// CHECK-ENCODING: [0x41,0x70,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc607041 + +ldfminnml s2, s3, [sp] +// CHECK-INST: ldfminnml s2, s3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc6273e3 + +ldfminnml d0, d1, [x2] +// CHECK-INST: ldfminnml d0, d1, [x2] +// CHECK-ENCODING: [0x41,0x70,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc607041 + +ldfminnml d2, d3, [sp] +// CHECK-INST: ldfminnml d2, d3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc6273e3 + +//------------------------------------------------------------------------------ +// LDBFMINNM +//------------------------------------------------------------------------------ + +ldbfminnm h0, h1, [x2] +// CHECK-INST: ldbfminnm h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x70,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c207041 + +ldbfminnm h2, h3, [sp] +// CHECK-INST: ldbfminnm h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c2273e3 + +// -- ldbfminnma + +ldbfminnma h0, h1, [x2] +// CHECK-INST: ldbfminnma h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x70,0xa0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca07041 + +ldbfminnma h2, h3, [sp] +// CHECK-INST: ldbfminnma h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0xa2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ca273e3 + +// -- ldbfminnmal + +ldbfminnmal h0, h1, [x2] +// CHECK-INST: ldbfminnmal h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x70,0xe0,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce07041 + +ldbfminnmal h2, h3, [sp] +// CHECK-INST: ldbfminnmal h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0xe2,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3ce273e3 + +// -- ldbfminnml + +ldbfminnml h0, h1, [x2] +// CHECK-INST: ldbfminnml h0, h1, [x2] +// CHECK-ENCODING: [0x41,0x70,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c607041 + +ldbfminnml h2, h3, [sp] +// CHECK-INST: ldbfminnml h2, h3, [sp] +// CHECK-ENCODING: [0xe3,0x73,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c6273e3 \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfadd-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfadd-diagnostics.s new file mode 100644 index 0000000000000..9cfb35f7ca185 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfadd-diagnostics.s @@ -0,0 +1,73 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// STFADD +//------------------------------------------------------------------------------ + +stfadd h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfadd h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfadd s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfadd s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- stfaddl + +stfaddl h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfaddl h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfaddl s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfaddl s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// STBFADD +//------------------------------------------------------------------------------ + +stbfadd s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfadd s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfadd d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfadd d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfadd h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfadd h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfadd h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfadd h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +// -- stbfaddl + +stbfaddl s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfaddl s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfaddl d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfaddl d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfaddl h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfaddl h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfaddl h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfaddl h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfadd.s b/llvm/test/MC/AArch64/LSFE/stfadd.s new file mode 100644 index 0000000000000..5bf3f5eaee9e8 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfadd.s @@ -0,0 +1,121 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// STFADD +//------------------------------------------------------------------------------ + +stfadd h0, [x2] +// CHECK-INST: stfadd h0, [x2] +// CHECK-ENCODING: [0x5f,0x80,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c20805f + +stfadd h2, [sp] +// CHECK-INST: stfadd h2, [sp] +// CHECK-ENCODING: [0xff,0x83,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c2283ff + +stfadd s0, [x2] +// CHECK-INST: stfadd s0, [x2] +// CHECK-ENCODING: [0x5f,0x80,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc20805f + +stfadd s2, [sp] +// CHECK-INST: stfadd s2, [sp] +// CHECK-ENCODING: [0xff,0x83,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc2283ff + +stfadd d0, [x2] +// CHECK-INST: stfadd d0, [x2] +// CHECK-ENCODING: [0x5f,0x80,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc20805f + +stfadd d2, [sp] +// CHECK-INST: stfadd d2, [sp] +// CHECK-ENCODING: [0xff,0x83,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc2283ff + +// -- stfaddl + +stfaddl h0, [x2] +// CHECK-INST: stfaddl h0, [x2] +// CHECK-ENCODING: [0x5f,0x80,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c60805f + +stfaddl h2, [sp] +// CHECK-INST: stfaddl h2, [sp] +// CHECK-ENCODING: [0xff,0x83,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c6283ff + +stfaddl s0, [x2] +// CHECK-INST: stfaddl s0, [x2] +// CHECK-ENCODING: [0x5f,0x80,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc60805f + +stfaddl s2, [sp] +// CHECK-INST: stfaddl s2, [sp] +// CHECK-ENCODING: [0xff,0x83,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc6283ff + +stfaddl d0, [x2] +// CHECK-INST: stfaddl d0, [x2] +// CHECK-ENCODING: [0x5f,0x80,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc60805f + +stfaddl d2, [sp] +// CHECK-INST: stfaddl d2, [sp] +// CHECK-ENCODING: [0xff,0x83,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc6283ff + +//------------------------------------------------------------------------------ +// STBFADD +//------------------------------------------------------------------------------ + +stbfadd h0, [x2] +// CHECK-INST: stbfadd h0, [x2] +// CHECK-ENCODING: [0x5f,0x80,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c20805f + +stbfadd h2, [sp] +// CHECK-INST: stbfadd h2, [sp] +// CHECK-ENCODING: [0xff,0x83,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c2283ff + +// -- stbfaddl + +stbfaddl h0, [x2] +// CHECK-INST: stbfaddl h0, [x2] +// CHECK-ENCODING: [0x5f,0x80,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c60805f + +stbfaddl h2, [sp] +// CHECK-INST: stbfaddl h2, [sp] +// CHECK-ENCODING: [0xff,0x83,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c6283ff \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfmax-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfmax-diagnostics.s new file mode 100644 index 0000000000000..932ba5ccf6bbd --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfmax-diagnostics.s @@ -0,0 +1,73 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// STFMAX +//------------------------------------------------------------------------------ + +stfmax h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmax h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfmax s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmax s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- stfmaxl + +stfmaxl h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmaxl h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfmaxl s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmaxl s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// STBFMAX +//------------------------------------------------------------------------------ + +stbfmax s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmax s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfmax d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmax d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmax h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmax h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmax h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmax h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +// -- stbfmaxl + +stbfmaxl s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxl s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfmaxl d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxl d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmaxl h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxl h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmaxl h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxl h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfmax.s b/llvm/test/MC/AArch64/LSFE/stfmax.s new file mode 100644 index 0000000000000..7c2c9ffd26b33 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfmax.s @@ -0,0 +1,121 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// STFMAX +//------------------------------------------------------------------------------ + +stfmax h0, [x2] +// CHECK-INST: stfmax h0, [x2] +// CHECK-ENCODING: [0x5f,0xc0,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c20c05f + +stfmax h2, [sp] +// CHECK-INST: stfmax h2, [sp] +// CHECK-ENCODING: [0xff,0xc3,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c22c3ff + +stfmax s0, [x2] +// CHECK-INST: stfmax s0, [x2] +// CHECK-ENCODING: [0x5f,0xc0,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc20c05f + +stfmax s2, [sp] +// CHECK-INST: stfmax s2, [sp] +// CHECK-ENCODING: [0xff,0xc3,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc22c3ff + +stfmax d0, [x2] +// CHECK-INST: stfmax d0, [x2] +// CHECK-ENCODING: [0x5f,0xc0,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc20c05f + +stfmax d2, [sp] +// CHECK-INST: stfmax d2, [sp] +// CHECK-ENCODING: [0xff,0xc3,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc22c3ff + +// -- stfmaxl + +stfmaxl h0, [x2] +// CHECK-INST: stfmaxl h0, [x2] +// CHECK-ENCODING: [0x5f,0xc0,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c60c05f + +stfmaxl h2, [sp] +// CHECK-INST: stfmaxl h2, [sp] +// CHECK-ENCODING: [0xff,0xc3,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c62c3ff + +stfmaxl s0, [x2] +// CHECK-INST: stfmaxl s0, [x2] +// CHECK-ENCODING: [0x5f,0xc0,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc60c05f + +stfmaxl s2, [sp] +// CHECK-INST: stfmaxl s2, [sp] +// CHECK-ENCODING: [0xff,0xc3,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc62c3ff + +stfmaxl d0, [x2] +// CHECK-INST: stfmaxl d0, [x2] +// CHECK-ENCODING: [0x5f,0xc0,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc60c05f + +stfmaxl d2, [sp] +// CHECK-INST: stfmaxl d2, [sp] +// CHECK-ENCODING: [0xff,0xc3,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc62c3ff + +//------------------------------------------------------------------------------ +// STBFMAX +//------------------------------------------------------------------------------ + +stbfmax h0, [x2] +// CHECK-INST: stbfmax h0, [x2] +// CHECK-ENCODING: [0x5f,0xc0,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c20c05f + +stbfmax h2, [sp] +// CHECK-INST: stbfmax h2, [sp] +// CHECK-ENCODING: [0xff,0xc3,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c22c3ff + +// -- stbfmaxl + +stbfmaxl h0, [x2] +// CHECK-INST: stbfmaxl h0, [x2] +// CHECK-ENCODING: [0x5f,0xc0,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c60c05f + +stbfmaxl h2, [sp] +// CHECK-INST: stbfmaxl h2, [sp] +// CHECK-ENCODING: [0xff,0xc3,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c62c3ff \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfmaxnm-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfmaxnm-diagnostics.s new file mode 100644 index 0000000000000..db9ff49b1661c --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfmaxnm-diagnostics.s @@ -0,0 +1,73 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// STFMAXNM +//------------------------------------------------------------------------------ + +stfmaxnm h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmaxnm h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfmaxnm s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmaxnm s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- stfmaxnml + +stfmaxnml h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmaxnml h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfmaxnml s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmaxnml s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// STBFMAXNM +//------------------------------------------------------------------------------ + +stbfmaxnm s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxnm s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfmaxnm d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxnm d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmaxnm h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxnm h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmaxnm h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxnm h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +// --stbfmaxnml + +stbfmaxnml s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxnml s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfmaxnml d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxnml d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmaxnml h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxnml h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmaxnml h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmaxnml h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfmaxnm.s b/llvm/test/MC/AArch64/LSFE/stfmaxnm.s new file mode 100644 index 0000000000000..3f544fda98c24 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfmaxnm.s @@ -0,0 +1,121 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// STFMAXNM +//------------------------------------------------------------------------------ + +stfmaxnm h0, [x2] +// CHECK-INST: stfmaxnm h0, [x2] +// CHECK-ENCODING: [0x5f,0xe0,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c20e05f + +stfmaxnm h2, [sp] +// CHECK-INST: stfmaxnm h2, [sp] +// CHECK-ENCODING: [0xff,0xe3,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c22e3ff + +stfmaxnm s0, [x2] +// CHECK-INST: stfmaxnm s0, [x2] +// CHECK-ENCODING: [0x5f,0xe0,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc20e05f + +stfmaxnm s2, [sp] +// CHECK-INST: stfmaxnm s2, [sp] +// CHECK-ENCODING: [0xff,0xe3,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc22e3ff + +stfmaxnm d0, [x2] +// CHECK-INST: stfmaxnm d0, [x2] +// CHECK-ENCODING: [0x5f,0xe0,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc20e05f + +stfmaxnm d2, [sp] +// CHECK-INST: stfmaxnm d2, [sp] +// CHECK-ENCODING: [0xff,0xe3,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc22e3ff + +// -- stfmaxnml + +stfmaxnml h0, [x2] +// CHECK-INST: stfmaxnml h0, [x2] +// CHECK-ENCODING: [0x5f,0xe0,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c60e05f + +stfmaxnml h2, [sp] +// CHECK-INST: stfmaxnml h2, [sp] +// CHECK-ENCODING: [0xff,0xe3,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c62e3ff + +stfmaxnml s0, [x2] +// CHECK-INST: stfmaxnml s0, [x2] +// CHECK-ENCODING: [0x5f,0xe0,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc60e05f + +stfmaxnml s2, [sp] +// CHECK-INST: stfmaxnml s2, [sp] +// CHECK-ENCODING: [0xff,0xe3,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc62e3ff + +stfmaxnml d0, [x2] +// CHECK-INST: stfmaxnml d0, [x2] +// CHECK-ENCODING: [0x5f,0xe0,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc60e05f + +stfmaxnml d2, [sp] +// CHECK-INST: stfmaxnml d2, [sp] +// CHECK-ENCODING: [0xff,0xe3,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc62e3ff + +//------------------------------------------------------------------------------ +// STBFMAXNM +//------------------------------------------------------------------------------ + +stbfmaxnm h0, [x2] +// CHECK-INST: stbfmaxnm h0, [x2] +// CHECK-ENCODING: [0x5f,0xe0,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c20e05f + +stbfmaxnm h2, [sp] +// CHECK-INST: stbfmaxnm h2, [sp] +// CHECK-ENCODING: [0xff,0xe3,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c22e3ff + +// -- stbfmaxnml + +stbfmaxnml h0, [x2] +// CHECK-INST: stbfmaxnml h0, [x2] +// CHECK-ENCODING: [0x5f,0xe0,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c60e05f + +stbfmaxnml h2, [sp] +// CHECK-INST: stbfmaxnml h2, [sp] +// CHECK-ENCODING: [0xff,0xe3,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c62e3ff diff --git a/llvm/test/MC/AArch64/LSFE/stfmin-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfmin-diagnostics.s new file mode 100644 index 0000000000000..111c1b56c1816 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfmin-diagnostics.s @@ -0,0 +1,73 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// STFMIN +//------------------------------------------------------------------------------ + +stfmin h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmin h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfmin s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfmin s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- stfminl + +stfminl h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfminl h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfminl s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfminl s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// STBFMIN +//------------------------------------------------------------------------------ + +stbfmin s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmin s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfmin d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmin d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmin h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmin h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfmin h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfmin h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +// -- stbfminl + +stbfminl s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminl s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfminl d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminl d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfminl h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminl h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfminl h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminl h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfmin.s b/llvm/test/MC/AArch64/LSFE/stfmin.s new file mode 100644 index 0000000000000..b94689931c952 --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfmin.s @@ -0,0 +1,121 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// STFMIN +//------------------------------------------------------------------------------ + +stfmin h0, [x2] +// CHECK-INST: stfmin h0, [x2] +// CHECK-ENCODING: [0x5f,0xd0,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c20d05f + +stfmin h2, [sp] +// CHECK-INST: stfmin h2, [sp] +// CHECK-ENCODING: [0xff,0xd3,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c22d3ff + +stfmin s0, [x2] +// CHECK-INST: stfmin s0, [x2] +// CHECK-ENCODING: [0x5f,0xd0,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc20d05f + +stfmin s2, [sp] +// CHECK-INST: stfmin s2, [sp] +// CHECK-ENCODING: [0xff,0xd3,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc22d3ff + +stfmin d0, [x2] +// CHECK-INST: stfmin d0, [x2] +// CHECK-ENCODING: [0x5f,0xd0,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc20d05f + +stfmin d2, [sp] +// CHECK-INST: stfmin d2, [sp] +// CHECK-ENCODING: [0xff,0xd3,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc22d3ff + +// --stfminl + +stfminl h0, [x2] +// CHECK-INST: stfminl h0, [x2] +// CHECK-ENCODING: [0x5f,0xd0,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c60d05f + +stfminl h2, [sp] +// CHECK-INST: stfminl h2, [sp] +// CHECK-ENCODING: [0xff,0xd3,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c62d3ff + +stfminl s0, [x2] +// CHECK-INST: stfminl s0, [x2] +// CHECK-ENCODING: [0x5f,0xd0,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc60d05f + +stfminl s2, [sp] +// CHECK-INST: stfminl s2, [sp] +// CHECK-ENCODING: [0xff,0xd3,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc62d3ff + +stfminl d0, [x2] +// CHECK-INST: stfminl d0, [x2] +// CHECK-ENCODING: [0x5f,0xd0,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc60d05f + +stfminl d2, [sp] +// CHECK-INST: stfminl d2, [sp] +// CHECK-ENCODING: [0xff,0xd3,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc62d3ff + +//------------------------------------------------------------------------------ +// STBFMIN +//------------------------------------------------------------------------------ + +stbfmin h0, [x2] +// CHECK-INST: stbfmin h0, [x2] +// CHECK-ENCODING: [0x5f,0xd0,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c20d05f + +stbfmin h2, [sp] +// CHECK-INST: stbfmin h2, [sp] +// CHECK-ENCODING: [0xff,0xd3,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c22d3ff + +// -- stbfminl + +stbfminl h0, [x2] +// CHECK-INST: stbfminl h0, [x2] +// CHECK-ENCODING: [0x5f,0xd0,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c60d05f + +stbfminl h2, [sp] +// CHECK-INST: stbfminl h2, [sp] +// CHECK-ENCODING: [0xff,0xd3,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c62d3ff \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfminnm-diagnostics.s b/llvm/test/MC/AArch64/LSFE/stfminnm-diagnostics.s new file mode 100644 index 0000000000000..cfaae50b17adf --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfminnm-diagnostics.s @@ -0,0 +1,73 @@ +// RUN: not llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe 2>&1 < %s| FileCheck %s + +//------------------------------------------------------------------------------ +// STFMINNM +//------------------------------------------------------------------------------ + +stfminnm h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfminnm h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfminnm s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfminnm s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +// -- stfminnml + +stfminnml h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfminnml h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stfminnml s0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stfminnml s0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +//------------------------------------------------------------------------------ +// STBFMINNM +//------------------------------------------------------------------------------ + +stbfminnm s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminnm s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfminnm d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminnm d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfminnm h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminnm h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfminnm h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminnm h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +// -- stbfminnml + +stbfminnml s0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminnml s0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}}: + +stbfminnml d0, [x2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminnml d0, [x2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfminnml h0, [w2] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminnml h0, [w2] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} + +stbfminnml h0, [x2, #4] +// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction +// CHECK-NEXT: stbfminnml h0, [x2, #4] +// CHECK-NOT: [[@LINE-1]]:{{[0-9]+}} \ No newline at end of file diff --git a/llvm/test/MC/AArch64/LSFE/stfminnm.s b/llvm/test/MC/AArch64/LSFE/stfminnm.s new file mode 100644 index 0000000000000..20c429cca588c --- /dev/null +++ b/llvm/test/MC/AArch64/LSFE/stfminnm.s @@ -0,0 +1,121 @@ +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST +// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ +// RUN: | FileCheck %s --check-prefix=CHECK-ERROR +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=+lsfe - | FileCheck %s --check-prefix=CHECK-INST +// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+lsfe < %s \ +// RUN: | llvm-objdump -d --mattr=-lsfe - | FileCheck %s --check-prefix=CHECK-UNKNOWN +// Disassemble encoding and check the re-encoding (-show-encoding) matches. +// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+lsfe < %s \ +// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \ +// RUN: | llvm-mc -triple=aarch64 -mattr=+lsfe -disassemble -show-encoding \ +// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST + +//------------------------------------------------------------------------------ +// STFMINNM +//------------------------------------------------------------------------------ + +stfminnm h0, [x2] +// CHECK-INST: stfminnm h0, [x2] +// CHECK-ENCODING: [0x5f,0xf0,0x20,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c20f05f + +stfminnm h2, [sp] +// CHECK-INST: stfminnm h2, [sp] +// CHECK-ENCODING: [0xff,0xf3,0x22,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c22f3ff + +stfminnm s0, [x2] +// CHECK-INST: stfminnm s0, [x2] +// CHECK-ENCODING: [0x5f,0xf0,0x20,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc20f05f + +stfminnm s2, [sp] +// CHECK-INST: stfminnm s2, [sp] +// CHECK-ENCODING: [0xff,0xf3,0x22,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc22f3ff + +stfminnm d0, [x2] +// CHECK-INST: stfminnm d0, [x2] +// CHECK-ENCODING: [0x5f,0xf0,0x20,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc20f05f + +stfminnm d2, [sp] +// CHECK-INST: stfminnm d2, [sp] +// CHECK-ENCODING: [0xff,0xf3,0x22,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc22f3ff + +// -- stfminnml + +stfminnml h0, [x2] +// CHECK-INST: stfminnml h0, [x2] +// CHECK-ENCODING: [0x5f,0xf0,0x60,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c60f05f + +stfminnml h2, [sp] +// CHECK-INST: stfminnml h2, [sp] +// CHECK-ENCODING: [0xff,0xf3,0x62,0x7c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 7c62f3ff + +stfminnml s0, [x2] +// CHECK-INST: stfminnml s0, [x2] +// CHECK-ENCODING: [0x5f,0xf0,0x60,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc60f05f + +stfminnml s2, [sp] +// CHECK-INST: stfminnml s2, [sp] +// CHECK-ENCODING: [0xff,0xf3,0x62,0xbc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: bc62f3ff + +stfminnml d0, [x2] +// CHECK-INST: stfminnml d0, [x2] +// CHECK-ENCODING: [0x5f,0xf0,0x60,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc60f05f + +stfminnml d2, [sp] +// CHECK-INST: stfminnml d2, [sp] +// CHECK-ENCODING: [0xff,0xf3,0x62,0xfc] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: fc62f3ff + +//------------------------------------------------------------------------------ +// STBFMINNM +//------------------------------------------------------------------------------ + +stbfminnm h0, [x2] +// CHECK-INST: stbfminnm h0, [x2] +// CHECK-ENCODING: [0x5f,0xf0,0x20,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c20f05f + +stbfminnm h2, [sp] +// CHECK-INST: stbfminnm h2, [sp] +// CHECK-ENCODING: [0xff,0xf3,0x22,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c22f3ff + +// -- stbfminnml + +stbfminnml h0, [x2] +// CHECK-INST: stbfminnml h0, [x2] +// CHECK-ENCODING: [0x5f,0xf0,0x60,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c60f05f + +stbfminnml h2, [sp] +// CHECK-INST: stbfminnml h2, [sp] +// CHECK-ENCODING: [0xff,0xf3,0x62,0x3c] +// CHECK-ERROR: instruction requires: lsfe +// CHECK-UNKNOWN: 3c62f3ff \ No newline at end of file