1 // RUN
: llvm-mc
-triple aarch64-none-linux-gnu
-mattr
=+neon
-show-encoding
< %s | FileCheck
%s
3 // Check that the assembler can handle the documented syntax for AArch64
6 //------------------------------------------------------------------------------
7 // Vector Integer Shift Lef
(Signed
)
8 //------------------------------------------------------------------------------
9 sshl v0.8
b, v1.8
b, v2.8
b
10 sshl v0.16
b, v1.16
b, v2.16
b
11 sshl v0.4h
, v1.4h
, v2.4h
12 sshl v0.8h
, v1.8h
, v2.8h
13 sshl v0.2s
, v1.2s
, v2.2s
14 sshl v0.4s
, v1.4s
, v2.4s
15 sshl v0.2d
, v1.2d
, v2.2d
17 // CHECK
: sshl v0.8
b, v1.8
b, v2.8
b // encoding
: [0x20,0x44,0x22,0x0e]
18 // CHECK
: sshl v0.16
b, v1.16
b, v2.16
b // encoding
: [0x20,0x44,0x22,0x4e]
19 // CHECK
: sshl v0.4h
, v1.4h
, v2.4h
// encoding
: [0x20,0x44,0x62,0x0e]
20 // CHECK
: sshl v0.8h
, v1.8h
, v2.8h
// encoding
: [0x20,0x44,0x62,0x4e]
21 // CHECK
: sshl v0.2s
, v1.2s
, v2.2s
// encoding
: [0x20,0x44,0xa2,0x0e]
22 // CHECK
: sshl v0.4s
, v1.4s
, v2.4s
// encoding
: [0x20,0x44,0xa2,0x4e]
23 // CHECK
: sshl v0.2d
, v1.2d
, v2.2d
// encoding
: [0x20,0x44,0xe2,0x4e]
25 //------------------------------------------------------------------------------
26 // Vector Integer Shift Lef
(Unsigned
)
27 //------------------------------------------------------------------------------
28 ushl v0.8
b, v1.8
b, v2.8
b
29 ushl v0.16
b, v1.16
b, v2.16
b
30 ushl v0.4h
, v1.4h
, v2.4h
31 ushl v0.8h
, v1.8h
, v2.8h
32 ushl v0.2s
, v1.2s
, v2.2s
33 ushl v0.4s
, v1.4s
, v2.4s
34 ushl v0.2d
, v1.2d
, v2.2d
36 // CHECK
: ushl v0.8
b, v1.8
b, v2.8
b // encoding
: [0x20,0x44,0x22,0x2e]
37 // CHECK
: ushl v0.16
b, v1.16
b, v2.16
b // encoding
: [0x20,0x44,0x22,0x6e]
38 // CHECK
: ushl v0.4h
, v1.4h
, v2.4h
// encoding
: [0x20,0x44,0x62,0x2e]
39 // CHECK
: ushl v0.8h
, v1.8h
, v2.8h
// encoding
: [0x20,0x44,0x62,0x6e]
40 // CHECK
: ushl v0.2s
, v1.2s
, v2.2s
// encoding
: [0x20,0x44,0xa2,0x2e]
41 // CHECK
: ushl v0.4s
, v1.4s
, v2.4s
// encoding
: [0x20,0x44,0xa2,0x6e]
42 // CHECK
: ushl v0.2d
, v1.2d
, v2.2d
// encoding
: [0x20,0x44,0xe2,0x6e]
44 //------------------------------------------------------------------------------
45 // Vector Integer Shift Left by Immediate
46 //------------------------------------------------------------------------------
50 shl v0.16
b, v1.16
b, #3
55 // CHECK
: shl v0.8
b, v1.8
b, #3 // encoding: [0x20,0x54,0x0b,0x0f]
56 // CHECK
: shl v0.4h
, v1.4h
, #3 // encoding: [0x20,0x54,0x13,0x0f]
57 // CHECK
: shl v0.2s
, v1.2s
, #3 // encoding: [0x20,0x54,0x23,0x0f]
58 // CHECK
: shl v0.16
b, v1.16
b, #3 // encoding: [0x20,0x54,0x0b,0x4f]
59 // CHECK
: shl v0.8h
, v1.8h
, #3 // encoding: [0x20,0x54,0x13,0x4f]
60 // CHECK
: shl v0.4s
, v1.4s
, #3 // encoding: [0x20,0x54,0x23,0x4f]
61 // CHECK
: shl v0.2d
, v1.2d
, #3 // encoding: [0x20,0x54,0x43,0x4f]