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]

Re:[PATCH/RFA] h8300 Multiple changes to gdb/sim-stage2


Splitting after suggestions of Andrew Cagney.

Andrey Volkov

2002-05-15  Andrey Volkov  <avolkov@sources.redhat.com>
	* gdb/h8300-tdep.c: Add additional CCR flags (I,UI,H,U) 
	* sim/h8300/compile.c: Ditto.

diff -ru gdb.old/gdb/h8300-tdep.c gdb/gdb/h8300-tdep.c
--- gdb.old/gdb/h8300-tdep.c	Wed May 15 19:45:49 2002
+++ gdb/gdb/h8300-tdep.c	Wed May 15 18:53:47 2002
@@ -837,8 +837,10 @@
       read_relative_register_raw_bytes (regno, b);
       l = b[REGISTER_VIRTUAL_SIZE (CCR_REGNUM) - 1];
       printf_unfiltered ("\t");
-      printf_unfiltered ("I-%d - ", (l & 0x80) != 0);
-      printf_unfiltered ("H-%d - ", (l & 0x20) != 0);
+      printf_unfiltered ("I-%d ", (l & 0x80) != 0);
+      printf_unfiltered ("UI-%d ", (l & 0x40) != 0);
+      printf_unfiltered ("H-%d ", (l & 0x20) != 0);
+      printf_unfiltered ("U-%d ", (l & 0x10) != 0);
       N = (l & 0x8) != 0;
       Z = (l & 0x4) != 0;
       V = (l & 0x2) != 0;
diff -ru gdb.old/sim/h8300/compile.c gdb/sim/h8300/compile.c
--- gdb.old/sim/h8300/compile.c	Wed May 15 19:45:49 2002
+++ gdb/sim/h8300/compile.c	Wed May 15 18:53:47 2002
@@ -81,13 +81,18 @@
 #define HIGH_BYTE(x) (((x) >> 8) & 0xff)
 #define P(X,Y) ((X << 8) | Y)
 
-#define BUILDSR()   cpu.ccr = (N << 3) | (Z << 2) | (V << 1) | C;
+#define BUILDSR()   cpu.ccr = (I << 7) | (UI << 6)| (H<<5) | (U<<4) | \
+                              (N << 3) | (Z << 2) | (V<<1) | C;
 
 #define GETSR()		    \
   c = (cpu.ccr >> 0) & 1;\
   v = (cpu.ccr >> 1) & 1;\
   nz = !((cpu.ccr >> 2) & 1);\
-  n = (cpu.ccr >> 3) & 1;
+  n = (cpu.ccr >> 3) & 1;\
+  u = (cpu.ccr >> 4) & 1;\
+  h = (cpu.ccr >> 5) & 1;\
+  ui = ((cpu.ccr >> 6) & 1);\
+  intMaskBit = (cpu.ccr >> 7) & 1;
 
 #ifdef __CHAR_IS_SIGNED__
 #define SEXTCHAR(x) ((char) (x))
@@ -775,6 +780,10 @@
 #define Z (nz == 0)
 #define V (v != 0)
 #define N (n != 0)
+#define U (u != 0)
+#define H (h != 0)
+#define UI (ui != 0)
+#define I (intMaskBit != 0)
 
 static int
 mop (code, bsize, sign)
@@ -934,7 +943,7 @@
   int ea;
   int bit;
   int pc;
-  int c, nz, v, n;
+  int c, nz, v, n, u, h, ui, intMaskBit;
   int oldmask;
   init_pointers ();
 


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