OSDN Git Service

2005-08-19 Dave Brolley <brolley@redhat.com>
authorbrolley <brolley>
Fri, 19 Aug 2005 19:42:25 +0000 (19:42 +0000)
committerbrolley <brolley>
Fri, 19 Aug 2005 19:42:25 +0000 (19:42 +0000)
        * Contribute the following changes:

        2005-07-13  Dave Brolley  <brolley@redhat.com>

        * cgen-cpu.h (notify_ret): Set last_caller and last_callee.

        2005-05-29  Dave Brolley  <brolley@redhat.com>

        * cgen-cpu.h (branch, done_insn, done_cti_insn, notify_ret):
        New virtual overrides.
        (was_return): New member of cgen_bi_endian_cpu.

sid/component/cgen-cpu/ChangeLog
sid/component/cgen-cpu/cgen-cpu.h

index 1501727..480371f 100644 (file)
@@ -1,5 +1,19 @@
 2005-08-19  Dave Brolley  <brolley@redhat.com>
 
+       * Contribute the following changes:
+
+       2005-07-13  Dave Brolley  <brolley@redhat.com>
+
+       * cgen-cpu.h (notify_ret): Set last_caller and last_callee.
+
+       2005-05-29  Dave Brolley  <brolley@redhat.com>
+
+       * cgen-cpu.h (branch, done_insn, done_cti_insn, notify_ret): 
+       New virtual overrides.
+       (was_return): New member of cgen_bi_endian_cpu.
+
+2005-08-19  Dave Brolley  <brolley@redhat.com>
+
        * cgen-fpu.cxx: New file.
        * cgen-fpu.h: New file.
        * Makefile.am (libcgencpu_la_SOURCES): Add cgen-fpu.cxx.
index 87963b8..03e4252 100644 (file)
@@ -1,6 +1,6 @@
 // cgen-cpu.h  -*- C++ -*-
 
-// Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat.
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Red Hat.
 // This file is part of SID and is licensed under the GPL.
 // See the file COPYING.SID for conditions for redistribution.
 
@@ -82,6 +82,33 @@ protected:
   void trace_counter (PCADDR pc);
 
 public:
+  // Called by semantic code to perform branches.
+  virtual void
+  branch (PCADDR new_pc, PCADDR& npc, sem_status& status)
+  {
+    branch_was_return = false;
+  }
+
+  // Called by the semantic code at the end of a non-cti insn.
+  // Make this a NOP; ordinary sequential PC stepping is done
+  // elsewhere.
+  virtual void done_insn (PCADDR npc, sem_status& status) {}
+     
+  // Called by the semantic code at the end of a cti insn.
+  virtual void
+  done_cti_insn (PCADDR npc, sem_status& status)
+  {
+    if (branch_was_return)
+      this->cg_return_pin.drive (npc);
+    branch_was_return = false;
+  }
+
+  virtual void notify_ret (sid::host_int_4 addr) { branch_was_return = true; last_caller = addr; last_callee = 0; }
+
+protected:
+  bool branch_was_return;
+
+public:
   cgen_bi_endian_cpu ();
   ~cgen_bi_endian_cpu () throw();