1 ; RUN
: llvm-mc
-triple arm64-apple-darwin
-show-encoding
< %s | FileCheck
%s
4 ;
==---------------------------------------------------------------------------==
5 ;
5.4.4 Bitfield Operations
6 ;
==---------------------------------------------------------------------------==
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 ;
==---------------------------------------------------------------------------==
37 ; CHECK
: extr w1
, w2
, w3
, #15 ; encoding: [0x41,0x3c,0x83,0x13]
38 ; CHECK
: extr x2
, x3
, x4
, #1 ; encoding: [0x62,0x04,0xc4,0x93]