This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [frv sim] clip cut point for MWCUT


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]