qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 11/15] target/ppc: Move D/DS/X-form integer loads to decod


From: Richard Henderson
Subject: Re: [PATCH v2 11/15] target/ppc: Move D/DS/X-form integer loads to decodetree
Date: Wed, 28 Apr 2021 08:34:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 4/28/21 6:31 AM, Matheus K. Ferst wrote:
This is a bit problematic, the instruction form isn't enough to decide its
fields. Eg. setb is X-form, but the fields are rt:5 bfa:3, setbc is also X-form
and the fields are rt:5 ba:5. In fact, for the X-form, there is a whole page of
field designations in PowerISA v3.1.

I would break this into three cases:
  - Some forms have single field designations. Eg. B, XLS, XX4;
  - Others have multiple designations but are just alternative names for the
    fields. Eg. DQ, DS, M;
  - And there are forms with multiple designations, with a variable number of
    fields that may overlap each other. Eg. X, XFX, XX2.

The first is a non-issue, just use the form name as done here. The second seems
tractable, we could pick one field name for each part of the insn and still use
the form name as the identifier for args_def/fmt_def. The last case will likely
require multiple fmt_defs for each form, in which case we would need to come up
with a pattern to name them.

Yep.


Looking at what Binutils did when they added Power10 support, it seems that the
insn form is just a hint for opcode positions, and fields are specified for each
insn. The sad part of this kind of approach is that it would leave us with, eg.
arg_LBZX and arg_LBZUX instead of a single arg_X, making it harder to put
multiple insns under the same implementation.

You'll just make up names for those that are used by more than one instruction. E.g. X, X_rc, X_l, X_wc_pl, etc.


r~



reply via email to

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