This is the mail archive of the gdb-patches@sources.redhat.com 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]

[PATCH]: Fix 68HC11 simulator init register not correct


Hi!

I've committed this patch from Marko to fix the handling of INIT register
in 68HC11 simulator.  The IO and RAM bits were swapped.

	Stephane

2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>

	* dv-m68hc11.c (m68hc11cpu_io_write): Fix to update IO mapping
	when IO mapping changed, not when internal RAM mapping is changed.

Index: dv-m68hc11.c
===================================================================
RCS file: /cvs/src/src/sim/m68hc11/dv-m68hc11.c,v
retrieving revision 1.6
diff -u -p -r1.6 dv-m68hc11.c
--- dv-m68hc11.c	7 Mar 2002 19:17:04 -0000	1.6
+++ dv-m68hc11.c	13 Aug 2002 07:52:35 -0000
@@ -1002,7 +1002,7 @@ m68hc11cpu_io_write (struct hw *me, sim_
 
 	/* Update IO mapping.  Detach from the old address
 	   and attach to the new one.  */
-	if ((old_bank & 0xF0) != (val & 0xF0))
+	if ((old_bank & 0x0F) != (val & 0x0F))
 	  {
             struct m68hc11cpu *controller = hw_data (me);
 
@@ -1018,7 +1018,7 @@ m68hc11cpu_io_write (struct hw *me, sim_
                                controller->attach_size,
                                me);
 	  }
-	if ((old_bank & 0x0F) != (val & 0x0F))
+	if ((old_bank & 0xF0) != (val & 0xF0))
 	  {
 	    ;
 	  }

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