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 @ CHECK-EVIL-PRE-UAL: mov r8, r8 @ encoding: [0xc0,0x46] 21 22 dmb sy 23 dmb 24 dsb sy 25 dsb 26 isb sy 27 isb 28 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f] 29 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f] 30 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f] 31 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f] 32 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f] 33 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f] 34 35 36 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2 37 @ CHECK-ERROR-NEXT: yield 38 39 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2 40 @ CHECK-ERROR-NEXT: wfe 41 42 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2 43 @ CHECK-ERROR-NEXT: wfi 44 45 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2 46 @ CHECK-ERROR-NEXT: sev 47 48 @ CHECK-ERROR: error: 49 @ CHECK-ERROR-NEXT: dmb sy 50 51 @ CHECK-ERROR: error: instruction requires: data-barriers 52 @ CHECK-ERROR-NEXT: dmb 53 54 @ CHECK-ERROR: error: 55 @ CHECK-ERROR-NEXT: dsb sy 56 57 @ CHECK-ERROR: error: instruction requires: data-barriers 58 @ CHECK-ERROR-NEXT: dsb 59 60 @ CHECK-ERROR: error: 61 @ CHECK-ERROR-NEXT: isb sy 62 63 @ CHECK-ERROR: error: instruction requires: data-barriers 64 @ CHECK-ERROR-NEXT: isb 65