Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Volkov <Andrew.Volkov@transas.com>
To: gdb-patches@sources.redhat.com
Subject: RE: [patch/rfc] h8300 Change literal reg numbers to REGNUM macros
Date: Wed, 15 May 2002 06:02:00 -0000	[thread overview]
Message-ID: <2E74F312D6980D459F3A05492BA40F8DDA4246@clue.transas.com> (raw)

Corrected
 
 Andrey
> 
> > -----Original Message-----
> > From: Richard Earnshaw [mailto:rearnsha@arm.com]
> > Sent: Wednesday, May 15, 2002 4:04 PM
> > To: Andrew Volkov
> > Cc: gdb-patches@sources.redhat.com; Richard.Earnshaw@arm.com
> > Subject: [patch/rfc] h8300 Change literal reg numbers to 
> REGNUM macros
> > 
> > 
> > !   return time (0);	//WinXX HAS UNIX like 'time', so why 
> > not using it?
> > C++ style comments are not legal ANSI C.
> > 
> > R.
> > 
> >
> 

Index: gdb/h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.7
diff -u -u -c -p -r1.7 h8300-tdep.c
*** h8300-tdep.c	16 Mar 2001 22:34:45 -0000	1.7
--- h8300-tdep.c	15 May 2002 12:45:44 -0000
*************** _initialize_h8300m (void)
*** 828,841 ****
  void
  h8300_print_register_hook (int regno)
  {
!   if (regno == 8)
      {
        /* CCR register */
        int C, Z, N, V;
!       unsigned char b[4];
        unsigned char l;
        read_relative_register_raw_bytes (regno, b);
!       l = b[REGISTER_VIRTUAL_SIZE (8) - 1];
        printf_unfiltered ("\t");
        printf_unfiltered ("I-%d - ", (l & 0x80) != 0);
        printf_unfiltered ("H-%d - ", (l & 0x20) != 0);
--- 828,841 ----
  void
  h8300_print_register_hook (int regno)
  {
!   if (regno == CCR_REGNUM)
      {
        /* CCR register */
        int C, Z, N, V;
!       unsigned char b[REGISTER_SIZE];
        unsigned char l;
        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);
Index: sim/h8300/compile.c
===================================================================
RCS file: /cvs/src/src/sim/h8300/compile.c,v
retrieving revision 1.8
diff -u -r1.8 compile.c
--- h8300/compile.c	20 Dec 2001 17:36:23 -0000	1.8
+++ h8300/compile.c	15 May 2002 12:41:48 -0000
@@ -111,10 +111,7 @@
 static int
 get_now ()
 {
-#ifndef WIN32
-  return time (0);
-#endif
-  return 0;
+  return time (0);	/* WinXX HAS UNIX like 'time', so why not using it?
*/
 }
 
 static int
@@ -155,7 +152,7 @@
       return X (OP_MEM, SP);
 
     default:
-      abort ();
+      abort (); /* ?? May be something more usefull? */
     }
 }
 
@@ -608,7 +605,7 @@
       return t;
 
     default:
-      abort ();
+      abort (); /* ?? May be something more usefull? */
 
     }
 }
@@ -997,8 +994,12 @@
 
 #endif
 
-      cycles += code->cycles;
-      insts++;
+      if (code->opcode)
+       {
+        cycles += code->cycles;
+        insts++;
+       }
+
       switch (code->opcode)
 	{
 	case 0:
@@ -1860,10 +1861,10 @@
     {
     default:
       abort ();
-    case 8:
+    case CCR_REGNUM:
       v = cpu.ccr;
       break;
-    case 9:
+    case PC_REGNUM:
       v = cpu.pc;
       break;
     case R0_REGNUM:
@@ -1876,15 +1877,15 @@
     case R7_REGNUM:
       v = cpu.regs[rn];
       break;
-    case 10:
+    case CYCLE_REGNUM:
       v = cpu.cycles;
       longreg = 1;
       break;
-    case 11:
+    case TICK_REGNUM:
       v = cpu.ticks;
       longreg = 1;
       break;
-    case 12:
+    case INST_REGNUM:
       v = cpu.insts;
       longreg = 1;
       break;


             reply	other threads:[~2002-05-15 13:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-15  6:02 Andrew Volkov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-15  6:59 Andrew Volkov
2002-05-15  4:32 Andrew Volkov
2002-05-15  5:04 ` Richard Earnshaw
2002-05-15  5:33   ` Andreas Schwab
2002-05-15  5:39     ` Richard Earnshaw
2002-05-15  5:49       ` Andreas Schwab
2002-05-15  5:57         ` Richard Earnshaw
2002-05-15  6:21           ` Andreas Schwab
2002-05-15  9:56             ` Andrew Cagney
2002-05-15 10:05               ` Richard Earnshaw
2002-05-18 14:20                 ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2E74F312D6980D459F3A05492BA40F8DDA4246@clue.transas.com \
    --to=andrew.volkov@transas.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox