1@ RUN: llvm-mc -triple=thumbv6t2--none-eabi -show-encoding < %s | FileCheck %s
2@ RUN: llvm-mc -triple=thumbv7a--none-eabi -show-encoding < %s | FileCheck %s
3@ RUN: llvm-mc -triple=thumbv7r--none-eabi -show-encoding < %s | FileCheck %s
4@ RUN: llvm-mc -triple=thumbv8a--none-eabi -show-encoding < %s | FileCheck %s
5@ RUN: not llvm-mc -triple=thumbv7m--none-eabi -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=UNDEF
6@ RUN: not llvm-mc -triple=thumbv6--none-eabi -show-encoding < %s 2>%t | FileCheck %s --check-prefix=V6
7@ RUN: FileCheck %s < %t --check-prefix=V6-ERRORS
8
9  cpsie f
10  cpsie i, #3
11  cps #0
12
13@ CHECK: cpsie f                         @ encoding: [0x61,0xb6]
14@ CHECK: cpsie   i, #3                   @ encoding: [0xaf,0xf3,0x43,0x85]
15@ CHECK: cps     #0                      @ encoding: [0xaf,0xf3,0x00,0x81]
16
17@ UNDEF-DAG: cpsie f                         @ encoding: [0x61,0xb6]
18@ UNDEF-DAG: instruction requires:
19@ UNDEF-DAG: error: instruction 'cps' requires effect for M-class
20
21@ V6: cpsie f                         @ encoding: [0x61,0xb6]
22@ V6-ERRORS: error: invalid instruction, any one of the following would fix this:
23@ V6-ERRORS-NEXT: cpsie i, #3
24@ V6-ERRORS: note: instruction requires: thumb2
25@ V6-ERRORS: note: instruction requires: arm-mode
26@ V6-ERRORS: note: too many operands for instruction
27@ V6-ERRORS: error: invalid instruction, any one of the following would fix this:
28@ V6-ERRORS: cps #0
29@ V6-ERRORS: note: too few operands for instruction
30@ V6-ERRORS: note: instruction requires: arm-mode
31@ V6-ERRORS: note: instruction requires: thumb2
32