[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AArch64 / arm64-bitfield-encoding.s
blob1589aa7139f42adf6d9677604968d97a3e82daff
1 ; RUN: llvm-mc -triple arm64-apple-darwin -show-encoding < %s | FileCheck %s
3 foo:
4 ;==---------------------------------------------------------------------------==
5 ; 5.4.4 Bitfield Operations
6 ;==---------------------------------------------------------------------------==
8 bfm w1, w2, #1, #15
9 bfm x1, x2, #1, #15
10 sbfm w1, w2, #1, #15
11 sbfm x1, x2, #1, #15
12 ubfm w1, w2, #1, #15
13 ubfm x1, x2, #1, #15
14 sbfiz wzr, w0, #31, #1
15 sbfiz xzr, x0, #31, #1
16 ubfiz wzr, w0, #31, #1
17 ubfiz xzr, x0, #31, #1
19 ; CHECK: bfxil w1, w2, #1, #15 ; encoding: [0x41,0x3c,0x01,0x33]
20 ; CHECK: bfxil x1, x2, #1, #15 ; encoding: [0x41,0x3c,0x41,0xb3]
21 ; CHECK: sbfx w1, w2, #1, #15 ; encoding: [0x41,0x3c,0x01,0x13]
22 ; CHECK: sbfx x1, x2, #1, #15 ; encoding: [0x41,0x3c,0x41,0x93]
23 ; CHECK: ubfx w1, w2, #1, #15 ; encoding: [0x41,0x3c,0x01,0x53]
24 ; CHECK: ubfx x1, x2, #1, #15 ; encoding: [0x41,0x3c,0x41,0xd3]
25 ; CHECK: sbfiz wzr, w0, #31, #1 ; encoding: [0x1f,0x00,0x01,0x13]
26 ; CHECK: sbfiz xzr, x0, #31, #1 ; encoding: [0x1f,0x00,0x61,0x93]
27 ; CHECK: lsl wzr, w0, #31 ; encoding: [0x1f,0x00,0x01,0x53]
28 ; CHECK: ubfiz xzr, x0, #31, #1 ; encoding: [0x1f,0x00,0x61,0xd3]
30 ;==---------------------------------------------------------------------------==
31 ; 5.4.5 Extract (immediate)
32 ;==---------------------------------------------------------------------------==
34 extr w1, w2, w3, #15
35 extr x2, x3, x4, #1
37 ; CHECK: extr w1, w2, w3, #15 ; encoding: [0x41,0x3c,0x83,0x13]
38 ; CHECK: extr x2, x3, x4, #1 ; encoding: [0x62,0x04,0xc4,0x93]