[Qemu-devel] [PATCH V4 08/11] Add MIPS DSP Bit/Manipulation instructions Support

2012-03-29 Thread Jia Liu
Add MIPS DSP Bit/Manipulation instructions Support. Signed-off-by: Jia Liu --- target-mips/dsp_helper.c | 42 +++ target-mips/helper.h |4 ++ target-mips/translate.c | 103 ++ 3 files changed, 149 insertions(+), 0 deletions(

Re: [Qemu-devel] [PATCH V4 08/11] Add MIPS DSP Bit/Manipulation instructions Support

2012-03-30 Thread Richard Henderson
On 03/29/2012 11:17 PM, Jia Liu wrote: > +int32_t temp; > +uint32_t rd; > +int i, last; > + > +temp = rt & MIPSDSP_LO; > +rd = 0; > +for (i = 0; i < 16; i++) { > +last = temp % 2; > +temp = temp >> 1; temp should not be signed, as that % doesn't do what you

Re: [Qemu-devel] [PATCH V4 08/11] Add MIPS DSP Bit/Manipulation instructions Support

2012-03-30 Thread Jia Liu
On Fri, Mar 30, 2012 at 7:05 PM, Richard Henderson wrote: > On 03/29/2012 11:17 PM, Jia Liu wrote: >> +    int32_t temp; >> +    uint32_t rd; >> +    int i, last; >> + >> +    temp = rt & MIPSDSP_LO; >> +    rd = 0; >> +    for (i = 0; i < 16; i++) { >> +        last = temp % 2; >> +        temp =