llvm.org GIT mirror llvm / f635ab8
ARM: permit bare dmb/dsb/isb aliases on Cortex-M0 Cortex-M0 supports these 32-bit instructions despite being Thumb1 only (mostly). We knew about that but not that the aliases without the default "sy" operand were also permitted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194094 91177308-0d34-0410-b5e6-96231b3b80d8 Tim Northover 6 years ago
2 changed file(s) with 34 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
43284328 (t2TSTrr GPRnopc:$Rn, rGPR:$Rm, pred:$p)>;
43294329
43304330 // Memory barriers
4331 def : InstAlias<"dmb${p}", (t2DMB 0xf, pred:$p)>, Requires<[IsThumb2, HasDB]>;
4332 def : InstAlias<"dsb${p}", (t2DSB 0xf, pred:$p)>, Requires<[IsThumb2, HasDB]>;
4333 def : InstAlias<"isb${p}", (t2ISB 0xf, pred:$p)>, Requires<[IsThumb2, HasDB]>;
4331 def : InstAlias<"dmb${p}", (t2DMB 0xf, pred:$p)>, Requires<[HasDB]>;
4332 def : InstAlias<"dsb${p}", (t2DSB 0xf, pred:$p)>, Requires<[HasDB]>;
4333 def : InstAlias<"isb${p}", (t2ISB 0xf, pred:$p)>, Requires<[HasDB]>;
43344334
43354335 // Alias for LDR, LDRB, LDRH, LDRSB, and LDRSH without the ".w" optional
43364336 // width specifier.
1616 @ CHECK: wfi @ encoding: [0x30,0xbf]
1717 @ CHECK: sev @ encoding: [0x40,0xbf]
1818
19 @ CHECK-EVIL-PRE-UAL: mov r8, r8 @ encoding: [0xc0,0x46]
1920
20 @ CHECK-EVIL-PRE-UAL: mov r8, r8 @ encoding: [0xc0,0x46]
21 dmb sy
22 dmb
23 dsb sy
24 dsb
25 isb sy
26 isb
27 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
28 @ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
29 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
30 @ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
31 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
32 @ CHECK: isb sy @ encoding: [0xbf,0xf3,0x6f,0x8f]
2133
2234
2335 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2
3143
3244 @ CHECK-ERROR: error: instruction requires: armv6m or armv6t2
3345 @ CHECK-ERROR-NEXT: sev
46
47 @ CHECK-ERROR: error:
48 @ CHECK-ERROR-NEXT: dmb sy
49
50 @ CHECK-ERROR: error: instruction requires: data-barriers
51 @ CHECK-ERROR-NEXT: dmb
52
53 @ CHECK-ERROR: error:
54 @ CHECK-ERROR-NEXT: dsb sy
55
56 @ CHECK-ERROR: error: instruction requires: data-barriers
57 @ CHECK-ERROR-NEXT: dsb
58
59 @ CHECK-ERROR: error:
60 @ CHECK-ERROR-NEXT: isb sy
61
62 @ CHECK-ERROR: error: instruction requires: data-barriers
63 @ CHECK-ERROR-NEXT: isb