]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/MC/ARM/basic-arm-instructions-v8.s
Vendor import of llvm release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / MC / ARM / basic-arm-instructions-v8.s
1 @ New ARMv8 A32 encodings
2
3 @ RUN: llvm-mc -triple armv8 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-V8
4 @ RUN: not llvm-mc -triple armv7 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-V7
5
6 @ HLT
7         hlt  #0
8         hlt  #65535
9 @ CHECK-V8: hlt  #0                       @ encoding: [0x70,0x00,0x00,0xe1]
10 @ CHECK-V8: hlt  #65535                   @ encoding: [0x7f,0xff,0x0f,0xe1]
11 @ CHECK-V7: error: instruction requires: armv8
12 @ CHECK-V7: error: instruction requires: armv8
13
14 @ AL condition code allowable
15         hltal  #0
16 @ CHECK-V8: hlt  #0                       @ encoding: [0x70,0x00,0x00,0xe1]
17 @ CHECK-V7: error: instruction requires: armv8
18
19 @------------------------------------------------------------------------------
20 @ DMB (v8 barriers)
21 @------------------------------------------------------------------------------
22         dmb ishld
23         dmb oshld
24         dmb nshld
25         dmb ld
26
27 @ CHECK-V8: dmb ishld @ encoding: [0x59,0xf0,0x7f,0xf5]
28 @ CHECK-V8: dmb oshld @ encoding: [0x51,0xf0,0x7f,0xf5]
29 @ CHECK-V8: dmb nshld @ encoding: [0x55,0xf0,0x7f,0xf5]
30 @ CHECK-V8: dmb ld @ encoding: [0x5d,0xf0,0x7f,0xf5]
31 @ CHECK-V7: error: invalid operand for instruction
32 @ CHECK-V7: error: invalid operand for instruction
33 @ CHECK-V7: error: invalid operand for instruction
34 @ CHECK-V7: error: invalid operand for instruction
35
36 @------------------------------------------------------------------------------
37 @ DSB (v8 barriers)
38 @------------------------------------------------------------------------------
39         dsb ishld
40         dsb oshld
41         dsb nshld
42         dsb ld
43
44 @ CHECK-V8: dsb ishld @ encoding: [0x49,0xf0,0x7f,0xf5]
45 @ CHECK-V8: dsb oshld @ encoding: [0x41,0xf0,0x7f,0xf5]
46 @ CHECK-V8: dsb nshld @ encoding: [0x45,0xf0,0x7f,0xf5]
47 @ CHECK-V8: dsb ld @ encoding: [0x4d,0xf0,0x7f,0xf5]
48 @ CHECK-V7: error: invalid operand for instruction
49 @ CHECK-V7: error: invalid operand for instruction
50 @ CHECK-V7: error: invalid operand for instruction
51 @ CHECK-V7: error: invalid operand for instruction
52
53 @------------------------------------------------------------------------------
54 @ SEVL
55 @------------------------------------------------------------------------------
56         sevl
57
58 @ CHECK-V8: sevl @ encoding: [0x05,0xf0,0x20,0xe3]
59 @ CHECK-V7: error: instruction requires: armv8