[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/5] decodetree: Move documentation to docs/deco

From: Bastian Koppelmann
Subject: Re: [Qemu-devel] [PATCH 2/5] decodetree: Move documentation to docs/decodetree.rst
Date: Mon, 25 Feb 2019 11:06:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

On 2/24/19 12:29 AM, Richard Henderson wrote:
+Argument Sets
+  args_def    := '&' identifier ( args_elt )+ ( !extern )?
+  args_elt    := identifier
+Each *args_elt* defines an argument within the argument set.
+Each argument set will be rendered as a C structure "arg_$name"
+with each of the fields being one of the member arguments.
+If ``!extern`` is specified, the backing structure is assumed
+to have been already declared, typically via a second decoder.
+Argument set examples::
+  &reg3       ra rb rc
+  &loadstore  reg base offset

Can we explain why argument sets are useful? This was puzzling for me at first. Something like:

This is used to have shared translate functions for instructions with differently named arguments. For instance if two variants of the same instructions have different sizes in some immediate, we can use a argument set to group these immediates together and use the same translate functions for both.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]