True. Nice catch. This will simplify this section even more.
I will send an updated patch with this change included.

Petar
________________________________________
From: Peter Maydell [peter.mayd...@linaro.org]
Sent: Thursday, May 09, 2013 7:54 PM
To: Petar Jovanovic
Cc: qemu-devel@nongnu.org; Petar Jovanovic; aurel...@aurel32.net
Subject: Re: [Qemu-devel] [PATCH] target-mips: clean-up in BIT_INSV

On 9 May 2013 18:28, Petar Jovanovic <petar.jovano...@rt-rk.com> wrote:
> @@ -2921,7 +2922,7 @@ target_ulong helper_##name(CPUMIPSState *env, 
> target_ulong rs,  \
>          return rt;                                              \
>      }                                                           \
>                                                                  \
> -    filter = ((int64_t)0x01 << size) - 1;                       \
> +    filter = (1LL << size) - 1;                                 \
>      filter = filter << pos;                                     \
>      temprs = (rs << pos) & filter;                              \
>      temprt = rt & ~filter;                                      \

This section of code is pretty much hand-coding
temp = deposit64(rt, pos, size, rs);
isn't it?

-- PMM


Reply via email to