Re: [Qemu-devel] [PATCH 1/6] target-arm: Fix rounding constant addition for Neon shift instructions.

2011-02-15 Thread Christophe Lyon
On 14.02.2011 19:12, Peter Maydell wrote: On 11 February 2011 15:10, christophe.l...@st.com wrote: +uint32_t HELPER(neon_rshl_s32)(uint32_t valop, uint32_t shiftop) +{ +int32_t dest; +int32_t val = (int32_t)valop; +int8_t shift = (int8_t)shiftop; +if (shift = 32) { +

Re: [Qemu-devel] [PATCH 1/6] target-arm: Fix rounding constant addition for Neon shift instructions.

2011-02-14 Thread Peter Maydell
On 11 February 2011 15:10, christophe.l...@st.com wrote: +uint32_t HELPER(neon_rshl_s32)(uint32_t valop, uint32_t shiftop) +{ +    int32_t dest; +    int32_t val = (int32_t)valop; +    int8_t shift = (int8_t)shiftop; +    if (shift = 32) { +        dest = 0; +    } else if (shift -32) {

[Qemu-devel] [PATCH 1/6] target-arm: Fix rounding constant addition for Neon shift instructions.

2011-02-11 Thread christophe.lyon
From: Christophe Lyon christophe.l...@st.com Handle cases where adding the rounding constant could overflow in Neon shift instructions: VRSHR, VRSRA, VQRSHRN, VQRSHRUN, VRSHRN. Signed-off-by: Christophe Lyon christophe.l...@st.com --- target-arm/neon_helper.c | 149