39 lines · plain
1// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+v8.9a < %s \2// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST3// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+v9.4a < %s \4// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST5// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+chk < %s \6// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST7// RUN: llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \8// RUN: | FileCheck %s --check-prefixes=CHECK-ERROR9// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+chk < %s \10// RUN: | llvm-objdump -d --mattr=+chk - | FileCheck %s --check-prefix=CHECK-INST11// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+chk < %s \12// RUN: | llvm-objdump -d --mattr=-chk - | FileCheck %s --check-prefix=CHECK-UNKNOWN13// Disassemble encoding and check the re-encoding (-show-encoding) matches.14// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+chk < %s \15// RUN: | sed '/.text/d' | sed 's/.*encoding: //g' \16// RUN: | llvm-mc -triple=aarch64 -mattr=+chk -disassemble -show-encoding \17// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST18 19 20// FEAT_CHK is mandatory from v8.0-a, but a clang user may not be using the LLVM21// integrated assembler, so we cannot just print `chkfeat x16` in all22// circumstances. Thankfully, we can always print `hint #40` when we cannot23// print `chkfeat x16`.24// So, in this case, we only print `chkfeat x16` from v8.9-a onwards, as an25// assembler that understands v8.9-a will understand `chkfeat x16`, and those26// that understand previous versions may not.27 28chkfeat x1629// CHECK-INST: chkfeat x1630// CHECK-ENCODING: encoding: [0x1f,0x25,0x03,0xd5]31// CHECK-ERROR: hint #4032// CHECK-UNKNOWN: d503251f hint #4033 34hint #4035// CHECK-INST: chkfeat x1636// CHECK-ENCODING: encoding: [0x1f,0x25,0x03,0xd5]37// CHECK-ERROR: hint #4038// CHECK-UNKNOWN: d503251f hint #4039