[PATCH RESEND v2] Aarch64: Allow explicit size specifier for predicate operand of {sq, uq, }{incp, decp}
Richard Sandiford
richard.sandiford@arm.com
Mon Oct 10 10:25:04 GMT 2022
"dongbo (E)" <dongbo4@huawei.com> writes:
> Hi, Richard.
>
> On 2022/9/30 22:54, Richard Sandiford wrote:
>> "dongbo (E)" <dongbo4@huawei.com> writes:
>>>
>>> We tried to put `S_H` in front of `NIL`:
>>>
>>> ```
>>>
>>> #define OP_SVE_Vv_HSD \
>>> { \
>>> QLF2(S_H,S_H), \
>>> QLF2(S_S,S_S), \
>>> QLF2(S_D,S_D), \
>>> QLF2(S_H,NIL), \
>>> QLF2(S_S,NIL), \
>>> QLF2(S_D,NIL), \
>>> }
>>>
>>> ```
>> Yeah, good point. It should be in this order, like you say.
>>
>> The fixes you mention look correct to me.
>>
>>> But assembler will fail in `match_operands_qualifier` :(.
>>>
>>> ```
>>>
>>> match_operands_qualifier (aarch64_inst *inst, bool update_p)
>>> {
>>> ...
>>> if (!aarch64_find_best_match (...))
>>> ...
>>> if (inst->opcode->flags & F_STRICT)
>>> {
>>> /* Require an exact qualifier match, even for NIL
>>> qualifiers. */
>>> nops = aarch64_num_of_operands (inst->opcode);
>>> for (i = 0; i < nops; ++i)
>>> if (inst->operands[i].qualifier != qualifiers[i])
>>> return false;
>>> }
>>> }
>>>
>>> ```
>> I think that's a misfeature of the F_STRICT handling. Does it work
>> with the patch below?
>
> We cannot find the `tree-data-ref.cc` in binutils, it is a file in GCC?
>
> Is `0001-data-ref-Fix-ranges_maybe_overlap_p-test.patch` the patch you
> meant to send?
Gah, no, sorry.
> We also found a way to fix the F_STRICT matching failure. See patch
> below. :)
>
> The main point is to give another `find_best_match` try when we get a
> qualifier mismatch for HSD operands.
I think it's simpler than that. Here's the patch I meant to send
(which is more -s than +s).
Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-aarch64-Tweak-handling-of-F_STRICT.patch
Type: text/x-diff
Size: 2706 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20221010/8875df09/attachment.bin>
More information about the Binutils
mailing list