[frv sim] clip cut point for MWCUT
Dave Brolley
brolley@redhat.com
Wed Dec 19 14:59:00 GMT 2007
Yes. Please commit this patch.
Dave
DJ Delorie wrote:
> The MWCUT opcode only looks at the six LSBs of the cut point register.
> The frv.c code was looking at the whole register, resulting in
> incorrect cut results. This patch clips the cut_point argument to six
> bits (0..63). Ok to apply?
>
> * frv/frv.c (frvbf_cut): Only look at the six LSBs of
> cut_point.
>
> Index: frv.c
> ===================================================================
> RCS file: /cvs/src/src/sim/frv/frv.c,v
> retrieving revision 1.9
> diff -p -U3 -r1.9 frv.c
> --- frv.c 24 Aug 2007 14:28:36 -0000 1.9
> +++ frv.c 18 Dec 2007 21:42:50 -0000
> @@ -1055,6 +1055,7 @@ SI
> frvbf_cut (SIM_CPU *current_cpu, SI reg1, SI reg2, SI cut_point)
> {
> SI result;
> + cut_point &= 0x3f;
> if (cut_point < 32)
> {
> result = reg1 << cut_point;
>
More information about the Gdb-patches
mailing list