xref: /qemu/tests/decode/succ_named_field.decode (revision 78f314cf)
1# This work is licensed under the terms of the GNU LGPL, version 2 or later.
2# See the COPYING.LIB file in the top-level directory.
3
4# field using a named_field
5%imm_sz	8:8 sz:3
6insn 00000000 00000000 ........ 00000000 imm_sz=%imm_sz sz=1
7
8# Ditto, via a format. Here a field in the format
9# references a named field defined in the insn pattern:
10&imm_a imm alpha
11%foo 0:16 alpha:4
12@foo 00000001 ........ ........ ........ &imm_a imm=%foo
13i1   ........ 00000000 ........ ........ @foo alpha=1
14i2   ........ 00000001 ........ ........ @foo alpha=2
15
16# Here the named field is defined in the format and referenced
17# from the insn pattern:
18@bar 00000010 ........ ........ ........ &imm_a alpha=4
19i3   ........ 00000000 ........ ........ @bar imm=%foo
20