Re: [Qemu-devel] x86: cvtsi2s{s,d} etc. array access

2012-05-15 Thread Blue Swirl
On Tue, May 15, 2012 at 5:27 PM, Peter Maydell wrote: > On 14 May 2012 22:05, Blue Swirl wrote: >> While working on the AREG0 patches, I noticed strange code in >> target-i386/translate.c. > >> It's accessed like this (line 3537): >>            sse_op2 = sse_op_table3[(s->dflag == 2) * 2 + ((b >>

Re: [Qemu-devel] x86: cvtsi2s{s,d} etc. array access

2012-05-15 Thread Peter Maydell
On 14 May 2012 22:05, Blue Swirl wrote: > While working on the AREG0 patches, I noticed strange code in > target-i386/translate.c. > It's accessed like this (line 3537): >            sse_op2 = sse_op_table3[(s->dflag == 2) * 2 + ((b >> 8) - 2)]; > > b >> 8 can be only either 1 or 0. I don't thin

Re: [Qemu-devel] x86: cvtsi2s{s,d} etc. array access

2012-05-15 Thread Blue Swirl
On Mon, May 14, 2012 at 9:05 PM, Blue Swirl wrote: > Hi, > > While working on the AREG0 patches, I noticed strange code in > target-i386/translate.c. > > We have this table of function pointers: > static void *sse_op_table3[4 * 3] = { >    gen_helper_cvtsi2ss, >    gen_helper_cvtsi2sd, >    X86_64

[Qemu-devel] x86: cvtsi2s{s,d} etc. array access

2012-05-14 Thread Blue Swirl
Hi, While working on the AREG0 patches, I noticed strange code in target-i386/translate.c. We have this table of function pointers: static void *sse_op_table3[4 * 3] = { gen_helper_cvtsi2ss, gen_helper_cvtsi2sd, X86_64_ONLY(gen_helper_cvtsq2ss), X86_64_ONLY(gen_helper_cvtsq2sd),