diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2023-05-23 13:04:46 +0100 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2023-05-30 10:55:39 -0700 |
| commit | 7e6c28be2739c2286fe09702adef4740d9a1ed41 (patch) | |
| tree | 965bce7a22851a90abd1f2ea722c87799528131a /python/qemu/machine | |
| parent | 36d612448273d0c295f519d9df3b10208177487a (diff) | |
| download | focaccia-qemu-7e6c28be2739c2286fe09702adef4740d9a1ed41.tar.gz focaccia-qemu-7e6c28be2739c2286fe09702adef4740d9a1ed41.zip | |
scripts/decodetree: Implement named field support
Implement support for named fields, i.e. where one field is defined in terms of another, rather than directly in terms of bits extracted from the instruction. The new method referenced_fields() on all the Field classes returns a list of fields that this field references. This just passes through, except for the new NamedField class. We can then use referenced_fields() to: * construct a list of 'dangling references' for a format or pattern, which is the fields that the format/pattern uses but doesn't define itself * do a topological sort, so that we output "field = value" assignments in an order that means that we assign a field before we reference it in a subsequent assignment * check when we output the code for a pattern whether we need to fill in the format fields before or after the pattern fields, and do other error checking Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230523120447.728365-6-peter.maydell@linaro.org>
Diffstat (limited to 'python/qemu/machine')
0 files changed, 0 insertions, 0 deletions