diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-08-19 16:55:30 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-08-19 16:55:30 +0100 |
| commit | 6894576347a71cdf7a1638650ccf3378cfa2a22d (patch) | |
| tree | cfb221f43082c9463107a986708ca41a02412313 /docs/devel | |
| parent | 50d69ee0d82378c7c21f482492dacfe0916b4863 (diff) | |
| parent | 59a3a1c0c211640e18b058a1b0444154c4eb6f99 (diff) | |
| download | focaccia-qemu-6894576347a71cdf7a1638650ccf3378cfa2a22d.tar.gz focaccia-qemu-6894576347a71cdf7a1638650ccf3378cfa2a22d.zip | |
Merge remote-tracking branch 'remotes/rth/tags/pull-dt-20190819' into staging
Implement parameter fields. Push warning pragmas into the generated code. # gpg: Signature made Mon 19 Aug 2019 16:14:41 BST # gpg: using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F # gpg: issuer "richard.henderson@linaro.org" # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full] # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F * remotes/rth/tags/pull-dt-20190819: target/riscv: Remove redundant declaration pragmas decodetree: Suppress redundant declaration warnings decodetree: Allow !function with no input bits Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs/devel')
| -rw-r--r-- | docs/devel/decodetree.rst | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/devel/decodetree.rst b/docs/devel/decodetree.rst index 44ac621ea8..ce7f52308f 100644 --- a/docs/devel/decodetree.rst +++ b/docs/devel/decodetree.rst @@ -23,7 +23,7 @@ Fields Syntax:: - field_def := '%' identifier ( unnamed_field )+ ( !function=identifier )? + field_def := '%' identifier ( unnamed_field )* ( !function=identifier )? unnamed_field := number ':' ( 's' ) number For *unnamed_field*, the first number is the least-significant bit position @@ -34,6 +34,12 @@ present, they are concatenated. In this way one can define disjoint fields. If ``!function`` is specified, the concatenated result is passed through the named function, taking and returning an integral value. +One may use ``!function`` with zero ``unnamed_fields``. This case is called +a *parameter*, and the named function is only passed the ``DisasContext`` +and returns an integral value extracted from there. + +A field with no ``unnamed_fields`` and no ``!function`` is in error. + FIXME: the fields of the structure into which this result will be stored is restricted to ``int``. Which means that we cannot expand 64-bit items. |