This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR optimization/8746 (x86)


> > Indeed.  And according to
> >
> >    1 0000 66F7C30400            testw   $4, %bx
> >    3 0008 F7C304000000          testl   $4, %ebx
> >
> > they're larger for HImode as well.  I'd support simply removing
> > these patterns entirely unless Jan can defend their existance.
> 
> My vague recollection of my x86 asm programming days tells me that it was not 
> recommended to mix 16-bit code with 32-bit code, but that mixing 8-bit code 
> with 32-bit code was ok (but this was probably for early Pentiums).

Pentium has no problem about mixing the code, except for the cost of
prefix for each 16bit operations.  PentiumPro and K6 do have reformating
penalty whenever the register is stored in shorter size than used later
that is really important to avoid.  TEST should not cause this problem as it
does not write to the output.  I seem to vaguely remember that some
older K6 believed that test writes into it's operand...
>
> So we could scap them entirely for QImode and conditionalize them on 
> !optimize_size for HImode.
The QImode promoters are for K6 benefit, that does execute QImode
operations only in one pipeline, while full sized operations execute in
the both pipes.

Honza
> 
> -- 
> Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]