> On Oct 1, 2020, at 11:20 AM, Richard Sandiford <richard.sandif...@arm.com>
> wrote:
>
> Qing Zhao <qing.z...@oracle.com> writes:
>> Hi, Richard,
>>
>> To answer the question, which registers should be included in “ALL”.
>> I studied X86 hard register set in more details. And also consulted with
>> H.J.Lu, And found:
>>
>> In the current x86 implementation, mask registers, MM0-MM7 registers, and
>> ST0-ST7 registers are not zeroed.
>>
>> The reasons actually are:
>> 1. Mask registers are marked as “FIXED_REGS” by middle end, (in the
>> following place, reginfo.c, init_reg_sets_1)
>>
>> /* If a register is too limited to be treated as a register operand,
>> then it should never be allocated to a pseudo. */
>> if (!TEST_HARD_REG_BIT (operand_reg_set, i))
>> fixed_regs[i] = 1;
>
> But isn't that only true when AVX512F is disabled?
You are right.
Yes, when AVX512F is present, mask registers are not fixed register anymore.
I just added the zeroing of mask registers into i386 implementation and also
the testing case.
Thanks.
Qing
>
> The question is more why the registers shouldn't be zeroed when
> they're available.
>