On 2/8/21 11:30 AM, Peter Maydell wrote:
> On Mon, 8 Feb 2021 at 18:58, Richard Henderson
> <richard.hender...@linaro.org> wrote:
>>
>> On 2/8/21 10:28 AM, Peter Maydell wrote:
>>> On Mon, 8 Feb 2021 at 17:53, Peter Maydell <peter.mayd...@linaro.org> wrote:
>>>> The AAPCS says that q4-q7 are preserved across calls.
>>>
>>> Speaking of which, doesn't that mean we also need to
>>> save and restore q4-q7 in tcg_target_qemu_prologue()
>>> if we might be generating neon insns? (It doesn't look like
>>> aarch64's prologue does this, which seems like a bug.)
>>
>> I just put them on the reserved list so that they don't get used.
>>
>>>     tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V8);
>> ...
>>>     tcg_regset_reset_reg(tcg_target_call_clobber_regs, TCG_REG_V15);
> 
> I'm confused. That's not the reserved list, it's the call-clobber
> list

Oops.  It's actually done by not adding them to tcg_target_reg_alloc_order.

    /* V8 - V15 are call-saved, and skipped.  */

Which works as well, I suppose.  I dunno which makes more sense.


r~

Reply via email to