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]

Committed: sim/cris/cris-tmpl.c: 64-bit host adjustments.


Fixes testsuite results on x86_64-unknown-linux-gnu (FC4).

sim/:
	* cris/cris-tmpl.c (MY (f_model_insn_before)): Make sure only the
	low 32 bits are used after an unsigned long cast.


Index: cris-tmpl.c
===================================================================
RCS file: /cvs/src/src/sim/cris/cris-tmpl.c,v
retrieving revision 1.1
diff -p -u -r1.1 cris-tmpl.c
--- cris-tmpl.c	28 Jan 2005 04:28:59 -0000	1.1
+++ cris-tmpl.c	16 Nov 2005 04:42:20 -0000
@@ -121,13 +121,15 @@ MY (f_model_insn_before) (SIM_CPU *curre
     char flags[7];
     SIM_DESC sd = CPU_STATE (current_cpu);
 
-    cris_trace_printf (sd, current_cpu, "%lx ", (unsigned long) (CPU (h_pc)));
+    cris_trace_printf (sd, current_cpu, "%lx ",
+		       0xffffffffUL & (unsigned long) (CPU (h_pc)));
 
     for (i = 0; i < 15; i++)
       cris_trace_printf (sd, current_cpu, "%lx ",
-			 (unsigned long) (XCONCAT3(crisv,BASENUM,
-						   f_h_gr_get) (current_cpu,
-								i)));
+			 0xffffffffUL
+			 & (unsigned long) (XCONCAT3(crisv,BASENUM,
+						     f_h_gr_get) (current_cpu,
+								  i)));
     flags[0] = GET_H_IBIT () != 0 ? 'I' : 'i';
     flags[1] = GET_H_XBIT () != 0 ? 'X' : 'x';
     flags[2] = GET_H_NBIT () != 0 ? 'N' : 'n';
@@ -148,9 +150,10 @@ MY (f_model_insn_before) (SIM_CPU *curre
 			     ->unaligned_mem_dword_count
 			     - CPU_CRIS_PREV_MISC_PROFILE (current_cpu)
 			     ->unaligned_mem_dword_count)),
-			 (unsigned long) (XCONCAT3(crisv,BASENUM,
-						   f_h_gr_get) (current_cpu,
-								15)));
+			 0xffffffffUL
+			 & (unsigned long) (XCONCAT3(crisv,BASENUM,
+						     f_h_gr_get) (current_cpu,
+								  15)));
     else
       cris_trace_printf (sd, current_cpu, "%s %d\n", flags,
 			 (int)

brgds, H-P


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