ARM: allow cortex-m0 to use hint instructions
[oota-llvm.git] / test / MC / ARM / thumb-hints.s
1 @ RUN: llvm-mc -triple=thumbv7-apple-darwin -show-encoding < %s | FileCheck %s
2 @ RUN: llvm-mc -triple=thumbv6-apple-darwin -mcpu=cortex-m0 -show-encoding < %s | FileCheck %s 
3 @ RUN: not llvm-mc -triple=thumbv6-apple-darwin -show-encoding < %s > %t 2> %t2
4 @ RUN: FileCheck %s --check-prefix=CHECK-EVIL-PRE-UAL < %t
5 @ RUN: FileCheck %s --check-prefix CHECK-ERROR < %t2
6
7   .syntax unified
8
9         nop
10         yield
11         wfe
12         wfi
13         sev
14 @ CHECK: nop                            @ encoding: [0x00,0xbf]
15 @ CHECK: yield                          @ encoding: [0x10,0xbf]
16 @ CHECK: wfe                            @ encoding: [0x20,0xbf]
17 @ CHECK: wfi                            @ encoding: [0x30,0xbf]
18 @ CHECK: sev                            @ encoding: [0x40,0xbf]
19
20
21 @ CHECK-EVIL-PRE-UAL: mov r8, r8                     @ encoding: [0xc0,0x46]
22
23
24 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2
25 @ CHECK-ERROR-NEXT: yield
26
27 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2
28 @ CHECK-ERROR-NEXT: wfe
29
30 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2
31 @ CHECK-ERROR-NEXT: wfi
32
33 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2
34 @ CHECK-ERROR-NEXT: sev