[PATCH, i386]: Generate xlat insn

Richard Guenther richard.guenther@gmail.com
Mon Sep 24 14:47:00 GMT 2007


On 9/24/07, Uros Bizjak <ubizjak@gmail.com> wrote:
> On 9/24/07, Paolo Bonzini <bonzini@gnu.org> wrote:
>
> > > This patch can be used to save a couple of bytes using xlat insn in a
> > > few special cases involving tables (as in an example above).
>
> > As that insn requires two specific registers, one of them even call-saved,
> > can't this turn into significant pessimization though?
> >
> > In addition to what Jakub said, I would conditionalize it on target
> > being i386 (maybe NetBurst architectures too??), or -Os being active.
> > For sure, it is a speed loss on P5 and P6.
>
> Yes, this is both true. Although the size of the insn itself looks promising:
>
>    c:   d7                      xlat   %ds:(%ebx)
>
> vs.
>
>    b:   0f b6 04 02             movzbl (%edx,%eax,1),%eax
>
> I very much doubt that it is worth to generate this insn. OTOH, if we
> conditionalize this to -Os, there will be at least a way to generate
> it.

Maybe this should be done post-reload only to avoid the register constraining?

Richard.



More information about the Gcc-patches mailing list