This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Add SSE4.2 support - pcmpstr part
Jan Hubicka wrote:
H. J. Lu wrote:
To achieve all this functionality, we need to introduce new register
class, where the only member is %xmm0. This is needed for reload to
select most appropriate CConly instruction
I forgot to add, that this new class is represented by "z" register
constraint (for SSE reg number "z"ero). Without new letter, there is no
way to model correct output register or clobber for "pcmp?strm" insn in
asm statements.
OK, if the support was only for the asm statements I am not quite sure
it is worth it - I believe two new letters would be needed since at
least original H.J's patch had SSE1 as special output for some
intstructions too.
No, it is also needed for new __cconly instructions to instantiate
instruction that has free register to clobber. IMO there is no other way
for allocator to choose between two alternative instructions.
As Rth correctly complained, the extra register classes are slowing down
regclass and startup that is n^3 (for n being number of classes), so
they needs to be added with a care. On the other hand, I don't see any
noticeable slowdowns on the bootstrap/SPEC build time graphs today, so
it don't seem to be that bad (assuming that the patch was run).
Perhaps startup time (ie time of compilation of empty file) should be
double checked.
I didn't notice any slowdowns (but I have a fast machine, so this can't
be a measure...)
Please don't forget to update texinfo docs if the constraint is
supposed to be user visible.
Just nitpicking, with two letter constraints and shortage of letters
perhaps something like Y0 would be better option?
I have considered this option, but Y classes are intended when whole
register sets are swithed, and it just didn't fit there... I was also
under impression that texinfo docs are automatically updated from
constraints.md, but I'll update them manually if this isn't true.
Uros.