xref: /llvm-project/llvm/test/MC/AArch64/SME2/ldr.s (revision a20112a74cb34fa967d10e07185167cbc2906c0d)
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \
2// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4// RUN:        | FileCheck %s --check-prefix=CHECK-ERROR
5// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \
6// RUN:        | llvm-objdump -d --mattr=+sme2 - | FileCheck %s --check-prefix=CHECK-INST
7// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme2 < %s \
8// RUN:        | llvm-objdump -d --mattr=-sme2 - | FileCheck %s --check-prefix=CHECK-UNKNOWN
9// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme2 < %s \
10// RUN:        | sed '/.text/d' | sed 's/.*encoding: //g' \
11// RUN:        | llvm-mc -triple=aarch64 -mattr=+sme2 -disassemble -show-encoding \
12// RUN:        | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
13
14
15ldr     zt0, [x0]  // 11100001-00011111-10000000-00000000
16// CHECK-INST: ldr     zt0, [x0]
17// CHECK-ENCODING: [0x00,0x80,0x1f,0xe1]
18// CHECK-ERROR: instruction requires: sme2
19// CHECK-UNKNOWN: e11f8000 <unknown>
20
21ldr     zt0, [x10]  // 11100001-00011111-10000001-01000000
22// CHECK-INST: ldr     zt0, [x10]
23// CHECK-ENCODING: [0x40,0x81,0x1f,0xe1]
24// CHECK-ERROR: instruction requires: sme2
25// CHECK-UNKNOWN: e11f8140 <unknown>
26
27ldr     zt0, [x13]  // 11100001-00011111-10000001-10100000
28// CHECK-INST: ldr     zt0, [x13]
29// CHECK-ENCODING: [0xa0,0x81,0x1f,0xe1]
30// CHECK-ERROR: instruction requires: sme2
31// CHECK-UNKNOWN: e11f81a0 <unknown>
32
33ldr     zt0, [sp]  // 11100001-00011111-10000011-11100000
34// CHECK-INST: ldr     zt0, [sp]
35// CHECK-ENCODING: [0xe0,0x83,0x1f,0xe1]
36// CHECK-ERROR: instruction requires: sme2
37// CHECK-UNKNOWN: e11f83e0 <unknown>
38
39