docs: Document decodetree named field syntax
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 May 2023 12:04:43 +0000 (13:04 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 30 May 2023 17:55:39 +0000 (10:55 -0700)
commit7e62609353b88d9aeee9715b534588af351075af
tree01995f369779e02fd4aad3303c7690da756f8b76
parent656666dc7d1b8508b1a528367e683ad2af5960a3
docs: Document decodetree named field syntax

Document the named field syntax that we want to implement for the
decodetree script.  This allows a field to be defined in terms of
some other field that the instruction pattern has already set, for
example:

   %sz_imm 10:3 sz:3 !function=expand_sz_imm

to allow a function to be passed both an immediate field from the
instruction and also a sz value which might have been specified by
the instruction pattern directly (sz=1, etc) rather than being a
simple field within the instruction.

Note that the restriction on not having the format referring to the
pattern and the pattern referring to the format simultaneously is a
restriction of the decoder generator rather than inherently being a
silly thing to do.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230523120447.728365-3-peter.maydell@linaro.org>
docs/devel/decodetree.rst