diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2023-05-23 13:04:44 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-05-30 10:55:39 -0700 |
commit | aeac22ba1e91a40d1d831cb02a1935391e67c7e2 (patch) | |
tree | 54450f1dd9fcca9971f111253cb1c7eec286c0df /blockjob.c | |
parent | 7e62609353b88d9aeee9715b534588af351075af (diff) |
scripts/decodetree: Pass lvalue-formatter function to str_extract()
To support referring to other named fields in field definitions, we
need to pass the str_extract() method a function which tells it how
to emit the code for a previously initialized named field. (In
Pattern::output_code() the other field will be "u.f_foo.field", and
in Format::output_extract() it is "a->field".)
Refactor the two callsites that currently do "output code to
initialize each field", and have them pass a lambda that defines how
to format the lvalue in each case. This is then used both in
emitting the LHS of the assignment and also passed down to
str_extract() as a new argument (unused at the moment, but will be
used in the following patch).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230523120447.728365-4-peter.maydell@linaro.org>
Diffstat (limited to 'blockjob.c')
0 files changed, 0 insertions, 0 deletions