1// CLRBHB is optional for all v8a/v9a, mandatory for 8.9a/9.4a. 2// Assembly is always permitted for instructions in the hint space. 3 4// Invalid before v8 5// RUN: not llvm-mc -show-encoding -triple armv7-none-none-eabi < %s 2>&1 | FileCheck %s --check-prefix=INVALID 6// RUN: not llvm-mc -show-encoding -triple armv7-none-none-eabi -mattr=-clrbhb < %s 2>&1 | FileCheck %s --check-prefix=INVALID 7// RUN: not llvm-mc -show-encoding -triple armv7-none-none-eabi -mattr=+clrbhb < %s 2>&1 | FileCheck %s --check-prefix=REQUIRESV8 8 9// Optional, off by default 10// RUN: llvm-mc -show-encoding -triple armv8-none-none-eabi < %s | FileCheck %s --check-prefix=A32_HINT 11// RUN: llvm-mc -show-encoding -triple armv8.8a-none-none-eabi < %s | FileCheck %s --check-prefix=A32_HINT 12// RUN: llvm-mc -show-encoding -triple thumbv8-none-none-eabi < %s | FileCheck %s --check-prefix=T32_HINT 13// RUN: llvm-mc -show-encoding -triple thumbv8.8a-none-none-eabi < %s | FileCheck %s --check-prefix=T32_HINT 14 15// Optional, off by default, doubly disabled 16// RUN: llvm-mc -show-encoding -triple armv8-none-none-eabi -mattr=-clrbhb < %s | FileCheck %s --check-prefix=A32_HINT 17// RUN: llvm-mc -show-encoding -triple armv8.8a-none-none-eabi -mattr=-clrbhb < %s | FileCheck %s --check-prefix=A32_HINT 18// RUN: llvm-mc -show-encoding -triple thumbv8-none-none-eabi -mattr=-clrbhb < %s | FileCheck %s --check-prefix=T32_HINT 19// RUN: llvm-mc -show-encoding -triple thumbv8.8a-none-none-eabi -mattr=-clrbhb < %s | FileCheck %s --check-prefix=T32_HINT 20 21// Optional, off by default, manually enabled 22// RUN: llvm-mc -show-encoding -triple armv8-none-none-eabi -mattr=+clrbhb < %s | FileCheck %s --check-prefix=A32_CLRBHB 23// RUN: llvm-mc -show-encoding -triple armv8.8a-none-none-eabi -mattr=+clrbhb < %s | FileCheck %s --check-prefix=A32_CLRBHB 24// RUN: llvm-mc -show-encoding -triple thumbv8-none-none-eabi -mattr=+clrbhb < %s | FileCheck %s --check-prefix=T32_CLRBHB 25// RUN: llvm-mc -show-encoding -triple thumbv8.8a-none-none-eabi -mattr=+clrbhb < %s | FileCheck %s --check-prefix=T32_CLRBHB 26 27// Mandatory, enabled by default 28// RUN: llvm-mc -show-encoding -triple armv8.9a-none-none-eabi < %s | FileCheck %s --check-prefix=A32_CLRBHB 29// RUN: llvm-mc -show-encoding -triple thumbv8.9a-none-none-eabi < %s | FileCheck %s --check-prefix=T32_CLRBHB 30 31// Mandatory, on by default, doubly enabled 32// RUN: llvm-mc -show-encoding -triple armv8.9a-none-none-eabi -mattr=+clrbhb < %s | FileCheck %s --check-prefix=A32_CLRBHB 33// RUN: llvm-mc -show-encoding -triple thumbv8.9a-none-none-eabi -mattr=+clrbhb < %s | FileCheck %s --check-prefix=T32_CLRBHB 34 35// Mandatory, can't prevent disabling in LLVM 36// RUN: llvm-mc -show-encoding -triple armv8.9a-none-none-eabi -mattr=-clrbhb < %s | FileCheck %s --check-prefix=A32_HINT 37// RUN: llvm-mc -show-encoding -triple thumbv8.9a-none-none-eabi -mattr=-clrbhb < %s | FileCheck %s --check-prefix=T32_HINT 38 39 clrbhb 40 hint #22 41 42// INVALID: <stdin>:[[@LINE-3]]:9: error: invalid instruction 43// INVALID-NOT: <stdin>:[[@LINE-3]]:9: error: invalid instruction 44// REQUIRESV8: <stdin>:[[@LINE-5]]:9: error: instruction requires: armv8 45// REQUIRESV8-NOT: <stdin>:[[@LINE-5]]:9: error: instruction requires: armv8 46// A32_CLRBHB: clrbhb @ encoding: [0x16,0xf0,0x20,0xe3] 47// A32_CLRBHB: clrbhb @ encoding: [0x16,0xf0,0x20,0xe3] 48// A32_HINT: hint #22 @ encoding: [0x16,0xf0,0x20,0xe3] 49// A32_HINT: hint #22 @ encoding: [0x16,0xf0,0x20,0xe3] 50// T32_CLRBHB: clrbhb @ encoding: [0xaf,0xf3,0x16,0x80] 51// T32_CLRBHB: clrbhb @ encoding: [0xaf,0xf3,0x16,0x80] 52// T32_HINT: hint.w #22 @ encoding: [0xaf,0xf3,0x16,0x80] 53// T32_HINT: hint.w #22 @ encoding: [0xaf,0xf3,0x16,0x80] 54