On Tue, 10 Jan 2023 at 13:19, Fabiano Rosas <[email protected]> wrote:
>
> Richard Henderson <[email protected]> writes:
>
> > On 1/9/23 14:42, Fabiano Rosas wrote:
> >> We want to move sme_helper into the tcg directory, but the cpregs
> >> accessor functions cannot go along, otherwise they would be separate
> >> from the respective ARMCPRegInfo definition which needs to be compiled
> >> with CONFIG_TCG=n as well.
> >
> > Hmm.  I would have hoped these could stay tcg-only, somehow.
> > I wonder if it warrants being an ARM_CP_SPECIAL_MASK value instead of 
> > svcr_write.
>
> In general, what characterizes as "special" for a register to use
> ARM_CP_SPECIAL_MASK?

It means that the register has special-case handling code
in the translate.c/translate-a64.c TCG codegen functions.
Non-special registers can be handled all in the same way
(load a constant, read a field from the CPU state struct,
or call a read/write function); the special cases directly
emit code to handle whatever they are doing. See the switch
commented "Handle special cases first" in target/arm/translate-a64.c
function handle_sys().

-- PMM

Reply via email to