1@ RUN: not llvm-mc -triple armv6-eabi -filetype asm -o /dev/null 2>&1 %s \
2@ RUN:   | FileCheck %s -check-prefix CHECK-ARMv6 -check-prefix CHECK-V6
3@ RUN: not llvm-mc -triple armv7-eabi -filetype asm -o /dev/null 2>&1 %s \
4@ RUN:   | FileCheck %s -check-prefix CHECK-ARMv7 -check-prefix CHECK-V7
5@ RUN: not llvm-mc -triple armv7m-eabi -filetype asm -o /dev/null 2>&1 %s \
6@ RUN:   | FileCheck %s -check-prefix CHECK-ARMv7M -check-prefix CHECK-V7M
7@ RUN: not llvm-mc -triple thumbv6-eabi -filetype asm -o /dev/null 2>&1 %s \
8@ RUN:   | FileCheck %s -check-prefix CHECK-THUMBv6 -check-prefix CHECK-V6
9@ RUN: not llvm-mc -triple thumbv7-eabi -filetype asm -o /dev/null 2>&1 %s \
10@ RUN:   | FileCheck %s -check-prefix CHECK-THUMBv7 -check-prefix CHECK-V7
11@ RUN: not llvm-mc -triple thumbv7m-eabi -filetype asm -o /dev/null 2>&1 %s \
12@ RUN:   | FileCheck %s -check-prefix CHECK-THUMBv7M -check-prefix CHECK-V7M
13
14	.syntax unified
15
16	.arch_extension idiv
17@ CHECK-V6: error: architectural extension 'idiv' is not allowed for the current base architecture
18@ CHECK-V6-NEXT: 	.arch_extension idiv
19@ CHECK-V6-NEXT:                     ^
20@ CHECK-V7M: error: architectural extension 'idiv' is not allowed for the current base architecture
21@ CHECK-V7M-NEXT: 	.arch_extension idiv
22@ CHECK-V7M-NEXT:                     ^
23
24	.type idiv,%function
25idiv:
26	udiv r0, r1, r2
27@ CHECK-ARMv6: error: instruction requires: divide in ARM
28@ CHECK-THUMBv6: error: instruction requires: divide in ARM arm-mode
29	sdiv r0, r1, r2
30@ CHECK-ARMv6: error: instruction requires: divide in ARM
31@ CHECK-THUMBv6: error: instruction requires: divide in ARM arm-mode
32
33	.arch_extension noidiv
34@ CHECK-V6: error: architectural extension 'idiv' is not allowed for the current base architecture
35@ CHECK-V6-NEXT: 	.arch_extension noidiv
36@ CHECK-V6-NEXT:                     ^
37@ CHECK-V7M: error: architectural extension 'idiv' is not allowed for the current base architecture
38@ CHECK-V7M-NEXT: 	.arch_extension noidiv
39@ CHECK-V7M-NEXT:                     ^
40
41	.type noidiv,%function
42noidiv:
43	udiv r0, r1, r2
44@ CHECK-ARMv6: error: instruction requires: divide in ARM
45@ CHECK-THUMBv6: error: instruction requires: divide in ARM arm-mode
46@ CHECK-ARMv7: error: instruction requires: divide in ARM
47@ CHECK-THUMBv7: error: instruction requires: divide in THUMB
48	sdiv r0, r1, r2
49@ CHECK-ARMv6: error: instruction requires: divide in ARM
50@ CHECK-THUMBv6: error: instruction requires: divide in ARM arm-mode
51@ CHECK-ARMv7: error: instruction requires: divide in ARM
52@ CHECK-THUMBv7: error: instruction requires: divide in THUMB
53
54