Re: [Qemu-devel] [PATCH 14/14] i386: optimize setcc instructions

2012-10-09 Thread Paolo Bonzini
Il 09/10/2012 22:22, Richard Henderson ha scritto: > On 10/06/2012 05:30 AM, Paolo Bonzini wrote: >> +static inline void gen_setcc1(DisasContext *s, int b, TCGv reg) >> { >> +int inv, jcc_op, size, cond; >> +TCGv t0; >> + >> +inv = b & 1; >> jcc_op = (b >> 1) & 7; >> + >> swi

Re: [Qemu-devel] [PATCH 14/14] i386: optimize setcc instructions

2012-10-09 Thread Richard Henderson
On 10/06/2012 05:30 AM, Paolo Bonzini wrote: > +static inline void gen_setcc1(DisasContext *s, int b, TCGv reg) > { > +int inv, jcc_op, size, cond; > +TCGv t0; > + > +inv = b & 1; > jcc_op = (b >> 1) & 7; > + > switch(s->cc_op) { > +/* we optimize relational operators

Re: [Qemu-devel] [PATCH 14/14] i386: optimize setcc instructions

2012-10-07 Thread Blue Swirl
On Sat, Oct 6, 2012 at 12:30 PM, Paolo Bonzini wrote: > Reconstruct the arguments for complex conditions involving CC_OP_SUBx (BE, > L, LE). In the others do it via setcond and gen_setcc_slow (which is > not that slow in many cases). I think it would be useful to reconstruct also for add, inc an

[Qemu-devel] [PATCH 14/14] i386: optimize setcc instructions

2012-10-06 Thread Paolo Bonzini
Reconstruct the arguments for complex conditions involving CC_OP_SUBx (BE, L, LE). In the others do it via setcond and gen_setcc_slow (which is not that slow in many cases). Signed-off-by: Paolo Bonzini --- target-i386/translate.c | 93 +++-- 1 file m