1 /* bitfield-alias.s Test file for AArch64 bitfield instructions
4 Copyright (C) 2011-2018 Free Software Foundation, Inc.
5 Contributed by ARM Ltd.
7 This file is part of GAS.
9 GAS is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the license, or
12 (at your option) any later version.
14 GAS is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; see the file COPYING3. If not,
21 see <http://www.gnu.org/licenses/>. */
23 /* This file tests the GAS's ability in assembling the alias mnemonics
24 of sbfm, bfm and ubfm. Disassembler should prefer to use alias
25 mnemonics to display {[u|s]}bfm instructions.
26 bitfield-bfm.s and bitfield-alias.s will be assembled into idential
27 binary, which is why the two tests share the same dump match
29 This assembly file is also used for the bitfield-no-aliases test. */
41 // <op> <Wd>, <Wn>, #<shift>
42 .macro bf_32s op, shift
46 // <op> <Xd>, <Xn>, #<shift>
47 .macro bf_64s op, shift
51 // <op> <Wd>, <Wn>, #<lsb>, #<width>
52 .macro bf_32 op, lsb, width
53 \op wzr, w7, #\lsb, #\width
56 // <op> <Xd>, <Xn>, #<lsb>, #<width>
57 .macro bf_64 op, lsb, width
58 \op xzr, x7, #\lsb, #\width
83 .irp op, asr, lsr, lsl
96 .irp op, sbfiz, sbfx, bfi, bfxil, ubfiz, ubfx