Re: [Qemu-devel] [PATCH 11/14] i386: convert gen_compute_eflags_c to TCG

2012-10-09 Thread Paolo Bonzini
Il 09/10/2012 22:07, Richard Henderson ha scritto: >> > +case CC_OP_ADCB: >> > +case CC_OP_ADCW: >> > +case CC_OP_ADCL: >> > +case CC_OP_ADCQ: >> > +/* (DATA_TYPE)CC_DST <= (DATA_TYPE)CC_SRC */ >> > +size = (s->cc_op - CC_OP_ADDB) & 3; >> > +t1 = gen_ext_tl(c

Re: [Qemu-devel] [PATCH 11/14] i386: convert gen_compute_eflags_c to TCG

2012-10-09 Thread Richard Henderson
On 10/06/2012 05:30 AM, Paolo Bonzini wrote: > +case CC_OP_SUBB: > +case CC_OP_SUBW: > +case CC_OP_SUBL: > +case CC_OP_SUBQ: > +/* (DATA_TYPE)(CC_DST + CC_SRC) < (DATA_TYPE)CC_SRC */ > +size = (s->cc_op - CC_OP_ADDB) & 3; I guess the & 3 makes the result "just so ha

Re: [Qemu-devel] [PATCH 11/14] i386: convert gen_compute_eflags_c to TCG

2012-10-07 Thread Blue Swirl
On Sat, Oct 6, 2012 at 12:30 PM, Paolo Bonzini wrote: > Do the switch at translation time, converting the helper templates to > TCG opcodes. In some cases CF can be computed with a single setcond, > though others it may require a little more work. > > In the CC_OP_DYNAMIC case, compute the whole

[Qemu-devel] [PATCH 11/14] i386: convert gen_compute_eflags_c to TCG

2012-10-06 Thread Paolo Bonzini
Do the switch at translation time, converting the helper templates to TCG opcodes. In some cases CF can be computed with a single setcond, though others it may require a little more work. In the CC_OP_DYNAMIC case, compute the whole EFLAGS, same as for ZF/SF/PF. Signed-off-by: Paolo Bonzini ---