[ARM] Introduce the 'sevl' instruction in ARMv8.
[oota-llvm.git] / test / MC / ARM / basic-arm-instructions-v8.s
1 @ New ARMv8 A32 encodings
2
3 @ RUN: not llvm-mc -triple armv8 -show-encoding -mattr=+db < %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         dmb #20
27
28 @ CHECK-V8: dmb ishld @ encoding: [0x59,0xf0,0x7f,0xf5]
29 @ CHECK-V8: dmb oshld @ encoding: [0x51,0xf0,0x7f,0xf5]
30 @ CHECK-V8: dmb nshld @ encoding: [0x55,0xf0,0x7f,0xf5]
31 @ CHECK-V8: dmb ld @ encoding: [0x5d,0xf0,0x7f,0xf5]
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 @ CHECK-V7: error: invalid operand for instruction
36 @ CHECK-V7: error: immediate value out of range
37
38 @------------------------------------------------------------------------------
39 @ DSB (v8 barriers)
40 @------------------------------------------------------------------------------
41         dsb ishld
42         dsb oshld
43         dsb nshld
44         dsb ld
45
46 @ CHECK-V8: dsb ishld @ encoding: [0x49,0xf0,0x7f,0xf5]
47 @ CHECK-V8: dsb oshld @ encoding: [0x41,0xf0,0x7f,0xf5]
48 @ CHECK-V8: dsb nshld @ encoding: [0x45,0xf0,0x7f,0xf5]
49 @ CHECK-V8: dsb ld @ encoding: [0x4d,0xf0,0x7f,0xf5]
50 @ CHECK-V7: error: invalid operand for instruction
51 @ CHECK-V7: error: invalid operand for instruction
52 @ CHECK-V7: error: invalid operand for instruction
53
54 @------------------------------------------------------------------------------
55 @ SEVL
56 @------------------------------------------------------------------------------
57         sevl
58
59 @ CHECK: sevl @ encoding: [0x05,0xf0,0x20,0xe3]