This commit was manufactured by cvs2svn to create tag 'kettenis-
i386newframe-20030316-mergepoint'.

Sprout from cagney_lazyid-20030317-branch 2003-03-17 14:23:51 UTC nobody 'This commit was manufactured by cvs2svn to create branch'
Cherrypick from master 2003-03-16 00:00:02 UTC gdbadmin <gdbadmin@sourceware.org> '*** empty log message ***':
    bfd/version.h
    gdb/ChangeLog
    gdb/d10v-tdep.c
    gdb/dummy-frame.c
    gdb/frame-unwind.c
    gdb/frame-unwind.h
    gdb/frame.c
    gdb/frame.h
    gdb/i386-tdep.c
    gdb/sentinel-frame.c
    gdb/version.in
    include/opcode/ChangeLog
    include/opcode/h8300.h
    opcodes/ChangeLog
    opcodes/ppc-opc.c
diff --git a/bfd/version.h b/bfd/version.h
index c42c449..d4e9430 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030317
+#define BFD_VERSION_DATE 20030316
 #define BFD_VERSION @bfd_version@
 #define BFD_VERSION_STRING @bfd_version_string@
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index bec734b8..ae39b61 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,57 +1,3 @@
-2003-03-17  Andrew Cagney  <cagney@redhat.com>
-
-	Fix frame off-by-one bug.
-	* frame-unwind.h (frame_this_id_ftype): Replace
-	frame_unwind_id_ftype.
-	(frame_prev_register_ftype): Replace frame_unwind_reg_ftype.
-	(struct frame_unwind): Replace "id" with "this_id".  Replace "reg"
-	with "prev_register".
-	* frame-unwind.c (frame_unwind_find_by_pc): Return
-	legacy_saved_regs_unwind instead of trad_frame_unwind.  Update
-	comment.
-	* dummy-frame.c (cached_find_dummy_frame): Delete function.
-	(dummy_frame_this_id): Replace dummy_frame_id_unwind.
-	(dummy_frame_prev_register): Replace dummy_frame_register_unwind.
-	(dummy_frame_unwind): Update.
-	* sentinel-frame.c (sentinel_frame_prev_register): Replace
-	sentinel_frame_register_unwind.
-	(sentinel_frame_this_id): Replace sentinel_frame_id_unwind.
-	(sentinel_frame_unwinder): Update.
-	* frame.h (legacy_saved_regs_unwind): Replace trad_frame_unwind.
-	(struct frame_info): Rename "unwind_cache" to "prologue_cache".
-	* frame.c (create_sentinel_frame): Update. Initialize
-	"prologue_cache" instead of "unwind_cache".
-	(frame_register_unwind): Call this frame's prev_register with the
-	next frame and this frame's prologue cache.
-	(get_prev_frame): Simplify.  Always call prev frame's this_id with
-	this frame and prev frame's prologue cache.  Document that this
-	call is shifted one to the left when compared to the
-	frame_register_unwind call.
-	(legacy_saved_regs_prev_register): Replace
-	frame_saved_regs_register_unwind.
-	(legacy_saved_regs_this_id): Replace frame_saved_regs_id_unwind.
-	(legacy_saved_regs_unwinder): Replace trad_frame_unwinder.
-	(legacy_saved_regs_unwind): Replace trad_frame_unwind.
-	* d10v-tdep.c (d10v_frame_this_id): Replace d10v_frame_id_unwind.
-	(d10v_frame_unwind): Update.
-	(d10v_frame_prev_register): Replace d10v_frame_register_unwind.
-	(d10v_frame_unwind_cache): Replace this "fi" with "next_frame".
-	(saved_regs_unwinder): Replace this "frame" with "next_frame", and
-	"saved_regs" with "this_saved_regs".
-
-2003-03-16  Andrew Cagney  <cagney@redhat.com>
-
-	* frame.c (frame_pop): Don't call target_store_registers.  Fix
-	problem reported by Mark Kettenis.
-
-2003-03-16  Mark Kettenis  <kettenis@gnu.org>
-
-	* i386-tdep.c (i386_register_type): Renamed from
-	i386_register_virtual_type.  Adjust function signature.
-	(i386_gdbarch_init): Set register_type instead of
-	deprecated_max_register_raw_size,
-	deprecated_max_register_virtual_size and register_virtual_type.
-
 2003-03-14  Andrew Cagney  <cagney@redhat.com>
 
 	* frame.c (get_prev_frame): When a legacy frame, always call
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index f443cef..b60ce7f 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -705,8 +705,8 @@
    for it IS the sp for the next frame. */
 
 struct d10v_unwind_cache *
-d10v_frame_unwind_cache (struct frame_info *next_frame,
-			 void **this_prologue_cache)
+d10v_frame_unwind_cache (struct frame_info *fi,
+			 void **cache)
 {
   CORE_ADDR pc;
   ULONGEST prev_sp;
@@ -716,18 +716,18 @@
   int i;
   struct d10v_unwind_cache *info;
 
-  if ((*this_prologue_cache))
-    return (*this_prologue_cache);
+  if ((*cache))
+    return (*cache);
 
   info = FRAME_OBSTACK_ZALLOC (struct d10v_unwind_cache);
-  (*this_prologue_cache) = info;
+  (*cache) = info;
   info->saved_regs = frame_obstack_zalloc (SIZEOF_FRAME_SAVED_REGS);
 
   info->size = 0;
   info->return_pc = 0;
   info->sp_offset = 0;
 
-  pc = get_pc_function_start (frame_pc_unwind (next_frame));
+  pc = get_pc_function_start (get_frame_pc (fi));
 
   info->uses_frame = 0;
   while (1)
@@ -788,7 +788,7 @@
       /* The SP was moved to the FP.  This indicates that a new frame
          was created.  Get THIS frame's FP value by unwinding it from
          the next frame.  */
-      frame_unwind_unsigned_register (next_frame, FP_REGNUM, &this_base);
+      frame_read_unsigned_register (fi, FP_REGNUM, &this_base);
       /* The FP points at the last saved register.  Adjust the FP back
          to before the first saved register giving the SP.  */
       prev_sp = this_base + info->size;
@@ -806,7 +806,7 @@
     {
       /* Assume that the FP is this frame's SP but with that pushed
          stack space added back.  */
-      frame_unwind_unsigned_register (next_frame, SP_REGNUM, &this_base);
+      frame_read_unsigned_register (fi, SP_REGNUM, &this_base);
       prev_sp = this_base + info->size;
     }
 
@@ -831,7 +831,7 @@
   else
     {
       ULONGEST return_pc;
-      frame_unwind_unsigned_register (next_frame, LR_REGNUM, &return_pc);
+      frame_read_unsigned_register (fi, LR_REGNUM, &return_pc);
       info->return_pc = d10v_make_iaddr (return_pc);
     }
 
@@ -1457,55 +1457,58 @@
    frame.  This will be used to create a new GDB frame struct.  */
 
 static void
-d10v_frame_this_id (struct frame_info *next_frame,
-		    void **this_prologue_cache,
-		    struct frame_id *this_id)
+d10v_frame_id_unwind (struct frame_info *frame,
+		      void **cache,
+		      struct frame_id *id)
 {
-  struct d10v_unwind_cache *info
-    = d10v_frame_unwind_cache (next_frame, this_prologue_cache);
-  CORE_ADDR base;
-  CORE_ADDR pc;
+  struct d10v_unwind_cache *info = d10v_frame_unwind_cache (frame, cache);
+  CORE_ADDR addr;
 
   /* Start with a NULL frame ID.  */
-  (*this_id) = null_frame_id;
+  (*id) = null_frame_id;
 
-  /* The PC is easy.  */
-  pc = frame_pc_unwind (next_frame);
+  if (info->return_pc == IMEM_START
+      || info->return_pc <= IMEM_START
+      || inside_entry_file (info->return_pc))
+    {
+      /* This is meant to halt the backtrace at "_start".
+	 Make sure we don't halt it at a generic dummy frame. */
+      return;
+    }
 
-  /* This is meant to halt the backtrace at "_start".  Make sure we
-     don't halt it at a generic dummy frame. */
-  if (pc == IMEM_START || pc <= IMEM_START || inside_entry_file (pc))
+  if (!info->saved_regs[FP_REGNUM])
+    {
+      if (!info->saved_regs[SP_REGNUM]
+	  || info->saved_regs[SP_REGNUM] == STACK_START)
+	return;
+
+      id->base = info->saved_regs[SP_REGNUM];
+      id->pc = info->return_pc;
+    }
+
+  addr = read_memory_unsigned_integer (info->saved_regs[FP_REGNUM],
+				       register_size (current_gdbarch, FP_REGNUM));
+  if (addr == 0)
     return;
 
-  /* Hopefully the prologue analysis either correctly determined the
-     frame's base (which is the SP from the previous frame), or set
-     that base to "NULL".  */
-  base = info->base;
-  if (base == STACK_START || base == 0)
-    return;
-
-  /* Check that we're not going round in circles with the same frame
-     ID (but avoid applying the test to sentinel frames which do go
-     round in circles).  Can't use frame_id_eq() as that doesn't yet
-     compare the frame's PC value.  */
-  if (frame_relative_level (next_frame) >= 0
-      && get_frame_type (next_frame) != DUMMY_FRAME
-      && get_frame_id (next_frame).pc == pc
-      && get_frame_id (next_frame).base == base)
-    return;
-
-  this_id->base = base;
-  this_id->pc = pc;
+  id->base = d10v_make_daddr (addr);
+  id->pc = info->return_pc;
 }
 
 static void
-saved_regs_unwinder (struct frame_info *next_frame,
-		     CORE_ADDR *this_saved_regs,
+saved_regs_unwinder (struct frame_info *frame,
+		     CORE_ADDR *saved_regs,
 		     int regnum, int *optimizedp,
 		     enum lval_type *lvalp, CORE_ADDR *addrp,
 		     int *realnump, void *bufferp)
 {
-  if (this_saved_regs[regnum] != 0)
+  /* If we're using generic dummy frames, we'd better not be in a call
+     dummy.  (generic_call_dummy_register_unwind ought to have been called
+     instead.)  */
+  gdb_assert (!(DEPRECATED_USE_GENERIC_DUMMY_FRAMES
+		&& (get_frame_type (frame) == DUMMY_FRAME)));
+
+  if (saved_regs[regnum] != 0)
     {
       if (regnum == SP_REGNUM)
 	{
@@ -1516,7 +1519,7 @@
 	  *realnump = -1;
 	  if (bufferp != NULL)
 	    store_address (bufferp, register_size (current_gdbarch, regnum),
-			   this_saved_regs[regnum]);
+			   saved_regs[regnum]);
 	}
       else
 	{
@@ -1524,12 +1527,12 @@
 	     a local copy of its value.  */
 	  *optimizedp = 0;
 	  *lvalp = lval_memory;
-	  *addrp = this_saved_regs[regnum];
+	  *addrp = saved_regs[regnum];
 	  *realnump = -1;
 	  if (bufferp != NULL)
 	    {
 	      /* Read the value in from memory.  */
-	      read_memory (this_saved_regs[regnum], bufferp,
+	      read_memory (saved_regs[regnum], bufferp,
 			   register_size (current_gdbarch, regnum));
 	    }
 	}
@@ -1540,39 +1543,38 @@
      value.  If a value is needed, pass the request on down the chain;
      otherwise just return an indication that the value is in the same
      register as the next frame.  */
-  frame_register_unwind (next_frame, regnum, optimizedp, lvalp, addrp,
-			 realnump, bufferp);
+  frame_register (frame, regnum, optimizedp, lvalp, addrp,
+		  realnump, bufferp);
 }
 
 
 static void
-d10v_frame_prev_register (struct frame_info *next_frame,
-			  void **this_prologue_cache,
-			  int regnum, int *optimizedp,
-			  enum lval_type *lvalp, CORE_ADDR *addrp,
-			  int *realnump, void *bufferp)
+d10v_frame_register_unwind (struct frame_info *frame,
+			    void **cache,
+			    int regnum, int *optimizedp,
+			    enum lval_type *lvalp, CORE_ADDR *addrp,
+			    int *realnump, void *bufferp)
 {
-  struct d10v_unwind_cache *info
-    = d10v_frame_unwind_cache (next_frame, this_prologue_cache);
+  struct d10v_unwind_cache *info = d10v_frame_unwind_cache (frame, cache);
   if (regnum == PC_REGNUM)
     {
       /* The call instruction saves the caller's PC in LR.  The
 	 function prologue of the callee may then save the LR on the
 	 stack.  Find that possibly saved LR value and return it.  */
-      saved_regs_unwinder (next_frame, info->saved_regs, LR_REGNUM, optimizedp,
+      saved_regs_unwinder (frame, info->saved_regs, LR_REGNUM, optimizedp,
 			   lvalp, addrp, realnump, bufferp);
     }
   else
     {
-      saved_regs_unwinder (next_frame, info->saved_regs, regnum, optimizedp,
+      saved_regs_unwinder (frame, info->saved_regs, regnum, optimizedp,
 			   lvalp, addrp, realnump, bufferp);
     }
 }
 
 
 static struct frame_unwind d10v_frame_unwind = {
-  d10v_frame_this_id,
-  d10v_frame_prev_register
+  d10v_frame_id_unwind,
+  d10v_frame_register_unwind
 };
 
 const struct frame_unwind *
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index 3f7746f..bf4a31c 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -30,10 +30,6 @@
 #include "gdb_assert.h"
 #include "frame-unwind.h"
 
-static void dummy_frame_this_id (struct frame_info *next_frame,
-				 void **this_prologue_cache,
-				 struct frame_id *this_id);
-
 /* Dummy frame.  This saves the processor state just prior to setting
    up the inferior function call.  Older targets save the registers
    on the target stack (but that really slows down function calls).  */
@@ -108,6 +104,14 @@
   return NULL;
 }
 
+struct dummy_frame *
+cached_find_dummy_frame (struct frame_info *frame, void **cache)
+{
+  if ((*cache) == NULL)
+    (*cache) = find_dummy_frame (get_frame_pc (frame), get_frame_base (frame));
+  return (*cache);
+}
+
 struct regcache *
 generic_find_dummy_frame (CORE_ADDR pc, CORE_ADDR fp)
 {
@@ -309,19 +313,12 @@
    register value is taken from the local copy of the register buffer.  */
 
 static void
-dummy_frame_prev_register (struct frame_info *next_frame,
-			   void **this_prologue_cache,
-			   int regnum, int *optimized,
-			   enum lval_type *lvalp, CORE_ADDR *addrp,
-			   int *realnum, void *bufferp)
+dummy_frame_register_unwind (struct frame_info *frame, void **cache,
+			     int regnum, int *optimized,
+			     enum lval_type *lvalp, CORE_ADDR *addrp,
+			     int *realnum, void *bufferp)
 {
-  struct dummy_frame *dummy;
-  struct frame_id id;
-
-  /* Call the ID method which, if at all possible, will set the
-     prologue cache.  */
-  dummy_frame_this_id (next_frame, this_prologue_cache, &id);
-  dummy = (*this_prologue_cache);
+  struct dummy_frame *dummy = cached_find_dummy_frame (frame, cache);
   gdb_assert (dummy != NULL);
 
   /* Describe the register's location.  Generic dummy frames always
@@ -342,80 +339,28 @@
     }
 }
 
-/* Assuming that THIS frame is a dummy (remember, the NEXT and not
-   THIS frame is passed in), return the ID of THIS frame.  That ID is
-   determined by examining the NEXT frame's unwound registers using
-   the method unwind_dummy_id().  As a side effect, THIS dummy frame's
-   dummy cache is located and and saved in THIS_PROLOGUE_CACHE.  */
+/* Assuming that FRAME is a dummy, return the ID of the calling frame
+   (the frame that the dummy has the saved state of).  */
 
 static void
-dummy_frame_this_id (struct frame_info *next_frame,
-		     void **this_prologue_cache,
-		     struct frame_id *this_id)
+dummy_frame_id_unwind (struct frame_info *frame,
+		       void **cache,
+		       struct frame_id *id)
 {
-  struct dummy_frame *dummy = (*this_prologue_cache);
-  if (dummy != NULL)
-    {
-      (*this_id) = dummy->id;
-      return;
-    }
-  /* When unwinding a normal frame, the stack structure is determined
-     by analyzing the frame's function's code (be it using brute force
-     prologue analysis, or the dwarf2 CFI).  In the case of a dummy
-     frame, that simply isn't possible.  The The PC is either the
-     program entry point, or some random address on the stack.  Trying
-     to use that PC to apply standard frame ID unwind techniques is
-     just asking for trouble.  */
-  if (gdbarch_unwind_dummy_id_p (current_gdbarch))
-    {
-      /* Assume hand_function_call(), via SAVE_DUMMY_FRAME_TOS,
-	 previously saved the dummy frame's ID.  Things only work if
-	 the two return the same value.  */
-      gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
-      /* Use an architecture specific method to extract the prev's
-	 dummy ID from the next frame.  Note that this method uses
-	 frame_register_unwind to obtain the register values needed to
-	 determine the dummy frame's ID.  */
-      (*this_id) = gdbarch_unwind_dummy_id (current_gdbarch, next_frame);
-    }
-  else if (frame_relative_level (next_frame) < 0)
-    {
-      /* We're unwinding a sentinel frame, the PC of which is pointing
-	 at a stack dummy.  Fake up the dummy frame's ID using the
-	 same sequence as is found a traditional unwinder.  Once all
-	 architectures supply the unwind_dummy_id method, this code
-	 can go away.  */
-      (*this_id).base = read_fp ();
-      (*this_id).pc = read_pc ();
-    }
-  else if (legacy_frame_p (current_gdbarch)
-	   && get_prev_frame (next_frame))
-    {
-      /* Things are looking seriously grim!  Assume that the legacy
-         get_prev_frame code has already created THIS frame and linked
-         it in to the frame chain (a pretty bold assumption), extract
-         the ID from THIS base / pc.  */
-      (*this_id).base = get_frame_base (get_prev_frame (next_frame));
-      (*this_id).pc = get_frame_pc (get_prev_frame (next_frame));
-    }
+  struct dummy_frame *dummy = cached_find_dummy_frame (frame, cache);
+  /* Oops!  In a dummy-frame but can't find the stack dummy.  Pretend
+     that the frame doesn't unwind.  Should this function instead
+     return a has-no-caller indication?  */
+  if (dummy == NULL)
+    (*id) = null_frame_id;
   else
-    {
-      /* Outch!  We're not trying to find the innermost frame's ID yet
-	 we're trying to unwind to a dummy.  The architecture must
-	 provide the unwind_dummy_id() method.  Abandon the unwind
-	 process but only after first warning the user.  */
-      internal_warning (__FILE__, __LINE__,
-			"Missing unwind_dummy_id architecture method");
-      (*this_id) = null_frame_id;
-      return;
-    }
-  (*this_prologue_cache) = find_dummy_frame ((*this_id).pc, (*this_id).base);
+    (*id) = dummy->id;
 }
 
 static struct frame_unwind dummy_frame_unwind =
 {
-  dummy_frame_this_id,
-  dummy_frame_prev_register
+  dummy_frame_id_unwind,
+  dummy_frame_register_unwind
 };
 
 const struct frame_unwind *
diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
index c72d24a..a889f95 100644
--- a/gdb/frame-unwind.c
+++ b/gdb/frame-unwind.c
@@ -83,19 +83,16 @@
   int i;
   struct frame_unwind_table *table =
     gdbarch_data (gdbarch, frame_unwind_data);
+  /* Seriously old code.  Don't even try to use this new mechanism.  */
   if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES)
-    /* Seriously old code.  Don't even try to use this new mechanism.
-       (Note: The variable USE_GENERIC_DUMMY_FRAMES is deprecated, not
-       the dummy frame mechanism.  All architectures should be using
-       generic dummy frames).  */
-    return legacy_saved_regs_unwind;
+    return trad_frame_unwind;
   for (i = 0; i < table->nr; i++)
     {
       const struct frame_unwind *desc = table->p[i] (pc);
       if (desc != NULL)
 	return desc;
     }
-  return legacy_saved_regs_unwind;
+  return trad_frame_unwind;
 }
 
 void
diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h
index 099f9de..5d85efe 100644
--- a/gdb/frame-unwind.h
+++ b/gdb/frame-unwind.h
@@ -47,92 +47,42 @@
 							   *gdbarch,
 							   CORE_ADDR pc);
 
-/* The following unwind functions assume a chain of frames forming the
-   sequence: (outer) prev <-> this <-> next (inner).  All the
-   functions are called with called with the next frame's `struct
-   frame_info' and and this frame's prologue cache.
+/* Return the location (and possibly value) of REGNUM for the previous
+   (older, up) frame.  All parameters except VALUEP can be assumed to
+   be non NULL.  When VALUEP is NULL, just the location of the
+   register should be returned.
 
-   THIS frame's register values can be obtained by unwinding NEXT
-   frame's registers (a recursive operation).
+   UNWIND_CACHE is provided as mechanism for implementing a per-frame
+   local cache.  It's initial value being NULL.  Memory for that cache
+   should be allocated using frame_obstack_zalloc().
 
-   THIS frame's prologue cache can be used to cache information such
-   as where this frame's prologue stores the previous frame's
-   registers.  */
+   Register window architectures (eg SPARC) should note that REGNUM
+   identifies the register for the previous frame.  For instance, a
+   request for the value of "o1" for the previous frame would be found
+   in the register "i1" in this FRAME.  */
 
-/* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
-   use the NEXT frame, and its register unwind method, to determine
-   the frame ID of THIS frame.
+typedef void (frame_unwind_reg_ftype) (struct frame_info * frame,
+				       void **unwind_cache,
+				       int regnum,
+				       int *optimized,
+				       enum lval_type * lvalp,
+				       CORE_ADDR *addrp,
+				       int *realnump, void *valuep);
 
-   A frame ID provides an invariant that can be used to re-identify an
-   instance of a frame.  It is a combination of the frame's `base' and
-   the frame's function's code address.
+/* Same as for registers above, but return the ID of the frame that
+   called this one.  */
 
-   Traditionally, THIS frame's ID was determined by examining THIS
-   frame's function's prologue, and identifying the register/offset
-   used as THIS frame's base.
-
-   Example: An examination of THIS frame's prologue reveals that, on
-   entry, it saves the PC(+12), SP(+8), and R1(+4) registers
-   (decrementing the SP by 12).  Consequently, the frame ID's base can
-   be determined by adding 12 to the THIS frame's stack-pointer, and
-   the value of THIS frame's SP can be obtained by unwinding the NEXT
-   frame's SP.
-
-   THIS_PROLOGUE_CACHE can be used to share any prolog analysis data
-   with the other unwind methods.  Memory for that cache should be
-   allocated using frame_obstack_zalloc().  */
-
-typedef void (frame_this_id_ftype) (struct frame_info *next_frame,
-				    void **this_prologue_cache,
-				    struct frame_id *this_id);
-
-/* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
-   use the NEXT frame, and its register unwind method, to unwind THIS
-   frame's registers (returning the value of the specified register
-   REGNUM in the previous frame).
-
-   Traditionally, THIS frame's registers were unwound by examining
-   THIS frame's function's prologue and identifying which registers
-   that prolog code saved on the stack.
-
-   Example: An examination of THIS frame's prologue reveals that, on
-   entry, it saves the PC(+12), SP(+8), and R1(+4) registers
-   (decrementing the SP by 12).  Consequently, the value of the PC
-   register in the previous frame is found in memory at SP+12, and
-   THIS frame's SP can be obtained by unwinding the NEXT frame's SP.
-
-   Why not pass in THIS_FRAME?  By passing in NEXT frame and THIS
-   cache, the supplied parameters are consistent with the sibling
-   function THIS_ID.
-
-   Can the code call ``frame_register (get_prev_frame (NEXT_FRAME))''?
-   Won't the call frame_register (THIS_FRAME) be faster?  Well,
-   ignoring the possability that the previous frame does not yet
-   exist, the ``frame_register (FRAME)'' function is expanded to
-   ``frame_register_unwind (get_next_frame (FRAME)'' and hence that
-   call will expand to ``frame_register_unwind (get_next_frame
-   (get_prev_frame (NEXT_FRAME)))''.  Might as well call
-   ``frame_register_unwind (NEXT_FRAME)'' directly.
-
-   THIS_PROLOGUE_CACHE can be used to share any prolog analysis data
-   with the other unwind methods.  Memory for that cache should be
-   allocated using frame_obstack_zalloc().  */
-
-typedef void (frame_prev_register_ftype) (struct frame_info *next_frame,
-					  void **this_prologue_cache,
-					  int prev_regnum,
-					  int *optimized,
-					  enum lval_type * lvalp,
-					  CORE_ADDR *addrp,
-					  int *realnump, void *valuep);
+typedef void (frame_unwind_id_ftype) (struct frame_info * frame,
+				      void **unwind_cache,
+				      struct frame_id * id);
 
 struct frame_unwind
 {
   /* Should the frame's type go here? */
   /* Should an attribute indicating the frame's address-in-block go
      here?  */
-  frame_this_id_ftype *this_id;
-  frame_prev_register_ftype *prev_register;
+  frame_unwind_id_ftype *id;
+  frame_unwind_reg_ftype *reg;
 };
 
 #endif
diff --git a/gdb/frame.c b/gdb/frame.c
index 900b515..cf9349d 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -215,14 +215,6 @@
       struct regcache *scratch = regcache_xmalloc (current_gdbarch);
       struct cleanup *cleanups = make_cleanup_regcache_xfree (scratch);
       regcache_save (scratch, do_frame_unwind_register, this_frame);
-      /* FIXME: cagney/2003-03-16: It should be possible to tell the
-         target's register cache that it is about to be hit with a
-         burst register transfer and that the sequence of register
-         writes should be batched.  The pair target_prepare_to_store()
-         and target_store_registers() kind of suggest this
-         functionality.  Unfortunatly, they don't implement it.  Their
-         lack of a formal definition can lead to targets writing back
-         bogus values (arguably a bug in the target code mind).  */
       /* Now copy those saved registers into the current regcache.
          Here, regcache_cpy() calls regcache_restore().  */
       regcache_cpy (current_regcache, scratch);
@@ -230,6 +222,7 @@
     }
   /* We've made right mess of GDB's local state, just discard
      everything.  */
+  target_store_registers (-1);
   flush_cached_frames ();
 }
 
@@ -254,12 +247,9 @@
      detected the problem before calling here.  */
   gdb_assert (frame != NULL);
 
-  /* Ask this frame to unwind its register.  See comment in
-     "frame-unwind.h" for why NEXT frame and this unwind cace are
-     passed in.  */
-  frame->unwind->prev_register (frame->next, &frame->prologue_cache, regnum,
-				optimizedp, lvalp, addrp, realnump, bufferp);
-
+  /* Ask this frame to unwind its register.  */
+  frame->unwind->reg (frame, &frame->unwind_cache, regnum,
+		      optimizedp, lvalp, addrp, realnump, bufferp);
 }
 
 void
@@ -493,7 +483,7 @@
   /* Explicitly initialize the sentinel frame's cache.  Provide it
      with the underlying regcache.  In the future additional
      information, such as the frame's thread will be added.  */
-  frame->prologue_cache = sentinel_frame_cache (regcache);
+  frame->unwind_cache = sentinel_frame_cache (regcache);
   /* For the moment there is only one sentinel frame implementation.  */
   frame->unwind = sentinel_frame_unwind;
   /* Link this frame back to itself.  The frame is self referential
@@ -650,20 +640,19 @@
    most frame.  */
 
 static void
-legacy_saved_regs_prev_register (struct frame_info *next_frame,
-				 void **this_prologue_cache,
-				 int regnum, int *optimizedp,
-				 enum lval_type *lvalp, CORE_ADDR *addrp,
-				 int *realnump, void *bufferp)
+frame_saved_regs_register_unwind (struct frame_info *frame, void **cache,
+				  int regnum, int *optimizedp,
+				  enum lval_type *lvalp, CORE_ADDR *addrp,
+				  int *realnump, void *bufferp)
 {
-  /* HACK: New code is passed the next frame and this cache.
-     Unfortunatly, old code expects this frame.  Since this is a
-     backward compatibility hack, cheat by walking one level along the
-     prologue chain to the frame the old code expects.
-
-     Do not try this at home.  Professional driver, closed course.  */
-  struct frame_info *frame = next_frame->prev;
+  /* There is always a frame at this point.  And THIS is the frame
+     we're interested in.  */
   gdb_assert (frame != NULL);
+  /* If we're using generic dummy frames, we'd better not be in a call
+     dummy.  (generic_call_dummy_register_unwind ought to have been called
+     instead.)  */
+  gdb_assert (!(DEPRECATED_USE_GENERIC_DUMMY_FRAMES
+		&& (get_frame_type (frame) == DUMMY_FRAME)));
 
   /* Only (older) architectures that implement the
      DEPRECATED_FRAME_INIT_SAVED_REGS method should be using this
@@ -701,13 +690,13 @@
 #if 1
 	      /* Save each register value, as it is read in, in a
                  frame based cache.  */
-	      void **regs = (*this_prologue_cache);
+	      void **regs = (*cache);
 	      if (regs == NULL)
 		{
 		  int sizeof_cache = ((NUM_REGS + NUM_PSEUDO_REGS)
 				      * sizeof (void *));
 		  regs = frame_obstack_zalloc (sizeof_cache);
-		  (*this_prologue_cache) = regs;
+		  (*cache) = regs;
 		}
 	      if (regs[regnum] == NULL)
 		{
@@ -727,33 +716,22 @@
       return;
     }
 
-  /* No luck.  Assume this and the next frame have the same register
-     value.  Pass the unwind request down the frame chain to the next
-     frame.  Hopefully that frame will find the register's location.  */
-  frame_register_unwind (next_frame, regnum, optimizedp, lvalp, addrp,
-			 realnump, bufferp);
+  /* No luck, assume this and the next frame have the same register
+     value.  Pass the request down the frame chain to the next frame.
+     Hopefully that will find the register's location, either in a
+     register or in memory.  */
+  frame_register (frame, regnum, optimizedp, lvalp, addrp, realnump,
+		  bufferp);
 }
 
 static void
-legacy_saved_regs_this_id (struct frame_info *next_frame,
-			   void **this_prologue_cache,
-			   struct frame_id *id)
+frame_saved_regs_id_unwind (struct frame_info *next_frame, void **cache,
+			    struct frame_id *id)
 {
   int fromleaf;
   CORE_ADDR base;
   CORE_ADDR pc;
 
-  if (frame_relative_level (next_frame) < 0)
-    {
-      /* FIXME: cagney/2003-03-14: We've got the extra special case of
-	 unwinding a sentinel frame, the PC of which is pointing at a
-	 stack dummy.  Fake up the dummy frame's ID using the same
-	 sequence as is found a traditional unwinder.  */
-      (*id).base = read_fp ();
-      (*id).pc = read_pc ();
-      return;
-    }
-
   /* Start out by assuming it's NULL.  */
   (*id) = null_frame_id;
 
@@ -807,14 +785,15 @@
   id->base = base;
 }
 	
-const struct frame_unwind legacy_saved_regs_unwinder = {
-  legacy_saved_regs_this_id,
-  legacy_saved_regs_prev_register
+const struct frame_unwind trad_frame_unwinder = {
+  frame_saved_regs_id_unwind,
+  frame_saved_regs_register_unwind
 };
-const struct frame_unwind *legacy_saved_regs_unwind = &legacy_saved_regs_unwinder;
+const struct frame_unwind *trad_frame_unwind = &trad_frame_unwinder;
 
 
 /* Function: deprecated_generic_get_saved_register
+
    Find register number REGNUM relative to FRAME and put its (raw,
    target format) contents in *RAW_BUFFER.
 
@@ -1510,57 +1489,63 @@
 						prev_frame->pc);
 
   /* Find the prev's frame's ID.  */
-
-  /* The callee expects to be invoked with:
-
-     this->unwind->this_id (this->next, &this->cache, &this->id);
-
-     The below is carefully shifted one frame `to the left' so that
-     both the unwind->this_id and unwind->prev_register methods are
-     consistently invoked with NEXT_FRAME and THIS_PROLOGUE_CACHE.
-       
-     Also note that, while the PC for this new previous frame was
-     unwound first (see above), the below is the first call that
-     [potentially] requires analysis of the new previous frame's
-     prologue.  Consequently, it is this call, that typically ends up
-     initializing the previous frame's prologue cache.  */
-  prev_frame->unwind->this_id (this_frame,
-			       &prev_frame->prologue_cache,
-			       &prev_frame->id);
-
-  /* Check that the unwound ID is valid.  */
-  if (!frame_id_p (prev_frame->id))
+  switch (prev_frame->type)
     {
-      if (frame_debug)
-	fprintf_unfiltered (gdb_stdlog,
-			    "Outermost frame - unwound frame ID invalid\n");
-      return NULL;
+    case DUMMY_FRAME:
+      /* When unwinding a normal frame, the stack structure is
+	 determined by analyzing the frame's function's code (be it
+	 using brute force prologue analysis, or the dwarf2 CFI).  In
+	 the case of a dummy frame, that simply isn't possible.  The
+	 The PC is either the program entry point, or some random
+	 address on the stack.  Trying to use that PC to apply
+	 standard frame ID unwind techniques is just asking for
+	 trouble.  */
+      gdb_assert (gdbarch_unwind_dummy_id_p (current_gdbarch));
+	/* Assume hand_function_call(), via SAVE_DUMMY_FRAME_TOS,
+	   previously saved the dummy frame's ID.  Things only work if
+	   the two return the same value.  */
+      gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
+      /* Use an architecture specific method to extract the prev's
+	 dummy ID from the next frame.  Note that this method uses
+	 frame_register_unwind to obtain the register values needed to
+	 determine the dummy frame's ID.  */
+      prev_frame->id = gdbarch_unwind_dummy_id (current_gdbarch, this_frame);
+      break;
+    case NORMAL_FRAME:
+    case SIGTRAMP_FRAME:
+      /* FIXME: cagney/2003-03-04: The below call isn't right.  It
+	 should instead be doing something like "prev_frame -> unwind
+	 -> id (this_frame, & prev_frame -> unwind_cache, & prev_frame
+	 -> id)" but that requires more extensive (pending) changes.  */
+      this_frame->unwind->id (this_frame, &this_frame->unwind_cache,
+			      &prev_frame->id);
+      /* Check that the unwound ID is valid.  */
+      if (!frame_id_p (prev_frame->id))
+	{
+	  if (frame_debug)
+	    fprintf_unfiltered (gdb_stdlog,
+				"Outermost frame - unwound frame ID invalid\n");
+	  return NULL;
+	}
+      /* Check that the new frame isn't inner to (younger, below,
+	 next) the old frame.  If that happens the frame unwind is
+	 going backwards.  */
+      /* FIXME: cagney/2003-02-25: Ignore the sentinel frame since
+	 that doesn't have a valid frame ID.  Should instead set the
+	 sentinel frame's frame ID to a `sentinel'.  Leave it until
+	 after the switch to storing the frame ID, instead of the
+	 frame base, in the frame object.  */
+      if (this_frame->level >= 0
+	  && frame_id_inner (prev_frame->id, get_frame_id (this_frame)))
+	error ("Unwound frame inner-to selected frame (corrupt stack?)");
+      /* Note that, due to frameless functions, the stronger test of
+	 the new frame being outer to the old frame can't be used -
+	 frameless functions differ by only their PC value.  */
+      break;
+    default:
+      internal_error (__FILE__, __LINE__, "bad switch");
     }
 
-  /* Check that the new frame isn't inner to (younger, below, next)
-     the old frame.  If that happens the frame unwind is going
-     backwards.  */
-  /* FIXME: cagney/2003-02-25: Ignore the sentinel frame since that
-     doesn't have a valid frame ID.  Should instead set the sentinel
-     frame's frame ID to a true `sentinel'.  Leave it until after the
-     switch to storing the frame ID, instead of the frame base, in the
-     frame object.  */
-  if (this_frame->level >= 0
-      && frame_id_inner (prev_frame->id, get_frame_id (this_frame)))
-    error ("Unwound frame inner-to selected frame (corrupt stack?)");
-
-  /* FIXME: cagney/2003-03-14: Should check that this and next frame's
-     IDs are different (i.e., !frame_id_eq()).  Can't yet do that as
-     the EQ function doesn't yet compare PC values.  */
-
-  /* FIXME: cagney/2003-03-14: Should delay the evaluation of the
-     frame ID until when it is needed.  That way the inner most frame
-     can be created without needing to do prologue analysis.  */
-
-  /* Note that, due to frameless functions, the stronger test of the
-     new frame being outer to the old frame can't be used - frameless
-     functions differ by only their PC value.  */
-
   /* FIXME: cagney/2002-12-18: Instead of this hack, should only store
      the frame ID in PREV_FRAME.  Unfortunatly, some architectures
      (HP/UX) still reply on EXTRA_FRAME_INFO and, hence, still poke at
diff --git a/gdb/frame.h b/gdb/frame.h
index ee0fc7e..c4905dd 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -27,9 +27,8 @@
 struct frame_unwind;
 struct block;
 
-/* A legacy unwinder to prop up architectures using the old style
-   saved regs array.  */
-extern const struct frame_unwind *legacy_saved_regs_unwind;
+/* The traditional frame unwinder.  */
+extern const struct frame_unwind *trad_frame_unwind;
 
 /* The frame object.  */
 
@@ -398,9 +397,9 @@
        related unwind data.  */
     struct context *context;
 
-    /* Prologue cache shared between the unwind functions.  See
-       "frame-unwind.h" for more information.  */
-    void *prologue_cache;
+    /* Unwind cache shared between the unwind functions - they had
+       better all agree as to the contents.  */
+    void *unwind_cache;
 
     /* The frame's unwinder.  */
     const struct frame_unwind *unwind;
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index bb588bf..b438266 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1129,7 +1129,7 @@
    potentially they could be used for things other than address.  */
 
 static struct type *
-i386_register_type (struct gdbarch *gdbarch, int regnum)
+i386_register_virtual_type (int regnum)
 {
   if (regnum == PC_REGNUM || regnum == FP_REGNUM || regnum == SP_REGNUM)
     return lookup_pointer_type (builtin_type_void);
@@ -1558,7 +1558,9 @@
   set_gdbarch_register_name (gdbarch, i386_register_name);
   set_gdbarch_register_size (gdbarch, 4);
   set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS);
-  set_gdbarch_register_type (gdbarch, i386_register_type);
+  set_gdbarch_deprecated_max_register_raw_size (gdbarch, I386_MAX_REGISTER_SIZE);
+  set_gdbarch_deprecated_max_register_virtual_size (gdbarch, I386_MAX_REGISTER_SIZE);
+  set_gdbarch_register_virtual_type (gdbarch, i386_register_virtual_type);
 
   set_gdbarch_print_float_info (gdbarch, i387_print_float_info);
 
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
index e4060d2..961e030 100644
--- a/gdb/sentinel-frame.c
+++ b/gdb/sentinel-frame.c
@@ -45,13 +45,13 @@
 /* Here the register value is taken direct from the register cache.  */
 
 void
-sentinel_frame_prev_register (struct frame_info *next_frame,
-			      void **this_prologue_cache,
-			      int regnum, int *optimized,
-			      enum lval_type *lvalp, CORE_ADDR *addrp,
-			      int *realnum, void *bufferp)
+sentinel_frame_register_unwind (struct frame_info *frame,
+				void **unwind_cache,
+				int regnum, int *optimized,
+				enum lval_type *lvalp, CORE_ADDR *addrp,
+				int *realnum, void *bufferp)
 {
-  struct frame_unwind_cache *cache = *this_prologue_cache;
+  struct frame_unwind_cache *cache = *unwind_cache;
   /* Describe the register's location.  A reg-frame maps all registers
      onto the corresponding hardware register.  */
   *optimized = 0;
@@ -71,20 +71,22 @@
 }
 
 void
-sentinel_frame_this_id (struct frame_info *next_frame,
-			void **this_prologue_cache,
-			struct frame_id *this_id)
+sentinel_frame_id_unwind (struct frame_info *frame,
+			  void **cache,
+			  struct frame_id *id)
 {
-  /* The sentinel frame is used as a starting point for creating the
-     previous (inner most) frame.  That frame's THIS_ID method will be
-     called to determine the inner most frame's ID.  Not this one.  */
-  internal_error (__FILE__, __LINE__, "sentinel_frame_this_id called");
+  /* FIXME: cagney/2003-01-08: This should be using a per-architecture
+     method that doesn't suffer from DECR_PC_AFTER_BREAK problems.
+     Such a method would take unwind_cache, regcache and stop reason
+     parameters.  */
+  id->base = read_fp ();
+  id->pc = read_pc ();
 }
 
 const struct frame_unwind sentinel_frame_unwinder =
 {
-  sentinel_frame_this_id,
-  sentinel_frame_prev_register
+  sentinel_frame_id_unwind,
+  sentinel_frame_register_unwind
 };
 
 const struct frame_unwind *const sentinel_frame_unwind = &sentinel_frame_unwinder;
diff --git a/gdb/version.in b/gdb/version.in
index c9ca6c9..44cef3b 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-03-17-cvs
+2003-03-16-cvs
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 53adca3..f04439c 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,8 +1,3 @@
-2003-03-17 D.Venkatasubramanian <dvenkat@noida.hcltech.com>
-
-	* h8300.h (O_SYS_CMDLINE): New pseudo opcode for command line
-	processing.
-
 2003-02-21  Noida D.Venkatasubramanian  <dvenkat@noida.hcltech.com>
 
 	* h8300.h (ldmac, stmac): Replace MACREG with MS32 and MD32.
diff --git a/include/opcode/h8300.h b/include/opcode/h8300.h
index bdba345..034c7bc 100644
--- a/include/opcode/h8300.h
+++ b/include/opcode/h8300.h
@@ -313,8 +313,6 @@
 #define O_SYS_CLOSE 105
 #define O_SYS_STAT 106
 #define O_SYS_FSTAT 107
-/* Space reserved for future file I/O system calls.  */
-#define O_SYS_CMDLINE 120
 /* End of System Call specific Changes.  */
 #define SB 0
 #define SW 1
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 94d8721..b22d9f6 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,7 +1,3 @@
-2003-03-17  Nick Clifton  <nickc@redhat.com>
-
-	* ppc-opc.c: Fix formatting.  Update copyright date.
-
 2003-03-14  Daniel Jacobowitz  <drow@mvista.com>
 
 	* ppc-opc.c (powerpc_opcodes): Readd tlbre for PPC403.
diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
index 27eb23e..204c16b 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -1,24 +1,24 @@
 /* ppc-opc.c -- PowerPC opcode list
-   Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003
+   Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support
 
-   This file is part of GDB, GAS, and the GNU binutils.
+This file is part of GDB, GAS, and the GNU binutils.
 
-   GDB, GAS, and the GNU binutils are free software; you can redistribute
-   them and/or modify them under the terms of the GNU General Public
-   License as published by the Free Software Foundation; either version
-   2, or (at your option) any later version.
+GDB, GAS, and the GNU binutils are free software; you can redistribute
+them and/or modify them under the terms of the GNU General Public
+License as published by the Free Software Foundation; either version
+2, or (at your option) any later version.
 
-   GDB, GAS, and the GNU binutils are distributed in the hope that they
-   will be useful, but WITHOUT ANY WARRANTY; without even the implied
-   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-   the GNU General Public License for more details.
+GDB, GAS, and the GNU binutils are distributed in the hope that they
+will be useful, but WITHOUT ANY WARRANTY; without even the implied
+warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+the GNU General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this file; see the file COPYING.  If not, write to the Free
-   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+You should have received a copy of the GNU General Public License
+along with this file; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.  */
 
 #include <stdio.h>
 #include "sysdep.h"
@@ -497,52 +497,52 @@
 #define UI U + 1
   { 16, 0, 0, 0, 0 },
 
-  /* The VA field in a VA, VX or VXR form instruction.  */
+  /* The VA field in a VA, VX or VXR form instruction. */
 #define VA UI + 1
 #define VA_MASK	(0x1f << 16)
   { 5, 16, 0, 0, PPC_OPERAND_VR },
 
-  /* The VB field in a VA, VX or VXR form instruction.  */
+  /* The VB field in a VA, VX or VXR form instruction. */
 #define VB VA + 1
 #define VB_MASK (0x1f << 11)
   { 5, 11, 0, 0, PPC_OPERAND_VR },
 
-  /* The VC field in a VA form instruction.  */
+  /* The VC field in a VA form instruction. */
 #define VC VB + 1
 #define VC_MASK (0x1f << 6)
   { 5, 6, 0, 0, PPC_OPERAND_VR },
 
-  /* The VD or VS field in a VA, VX, VXR or X form instruction.  */
+  /* The VD or VS field in a VA, VX, VXR or X form instruction. */
 #define VD VC + 1
 #define VS VD
 #define VD_MASK (0x1f << 21)
   { 5, 21, 0, 0, PPC_OPERAND_VR },
 
-  /* The SIMM field in a VX form instruction.  */
+  /* The SIMM field in a VX form instruction. */
 #define SIMM VD + 1
   { 5, 16, 0, 0, PPC_OPERAND_SIGNED},
 
-  /* The UIMM field in a VX form instruction.  */
+  /* The UIMM field in a VX form instruction. */
 #define UIMM SIMM + 1
   { 5, 16, 0, 0, 0 },
 
-  /* The SHB field in a VA form instruction.  */
+  /* The SHB field in a VA form instruction. */
 #define SHB UIMM + 1
   { 4, 6, 0, 0, 0 },
 
-  /* The other UIMM field in a EVX form instruction.  */
+  /* The other UIMM field in a EVX form instruction. */
 #define EVUIMM SHB + 1
   { 5, 11, 0, 0, 0 },
 
-  /* The other UIMM field in a half word EVX form instruction.  */
+  /* The other UIMM field in a half word EVX form instruction. */
 #define EVUIMM_2 EVUIMM + 1
   { 32, 11, insert_ev2, extract_ev2, PPC_OPERAND_PARENS },
 
-  /* The other UIMM field in a word EVX form instruction.  */
+  /* The other UIMM field in a word EVX form instruction. */
 #define EVUIMM_4 EVUIMM_2 + 1
   { 32, 11, insert_ev4, extract_ev4, PPC_OPERAND_PARENS },
 
-  /* The other UIMM field in a double EVX form instruction.  */
+  /* The other UIMM field in a double EVX form instruction. */
 #define EVUIMM_8 EVUIMM_4 + 1
   { 32, 11, insert_ev8, extract_ev8, PPC_OPERAND_PARENS },
 
@@ -1499,22 +1499,22 @@
 #define SC(op, sa, lk) (OP (op) | ((((unsigned long)(sa)) & 1) << 1) | ((lk) & 1))
 #define SC_MASK (OP_MASK | (((unsigned long)0x3ff) << 16) | (((unsigned long)1) << 1) | 1)
 
-/* An VX form instruction.  */
+/* An VX form instruction. */
 #define VX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x7ff))
 
-/* The mask for an VX form instruction.  */
+/* The mask for an VX form instruction. */
 #define VX_MASK	VX(0x3f, 0x7ff)
 
-/* An VA form instruction.  */
+/* An VA form instruction. */
 #define VXA(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x03f))
 
-/* The mask for an VA form instruction.  */
+/* The mask for an VA form instruction. */
 #define VXA_MASK VXA(0x3f, 0x3f)
 
-/* An VXR form instruction.  */
+/* An VXR form instruction. */
 #define VXR(op, xop, rc) (OP (op) | (((rc) & 1) << 10) | (((unsigned long)(xop)) & 0x3ff))
 
-/* The mask for a VXR form instruction.  */
+/* The mask for a VXR form instruction. */
 #define VXR_MASK VXR(0x3f, 0x3ff, 1)
 
 /* An X form instruction.  */
@@ -1538,7 +1538,7 @@
 /* An X_MASK with the RA and RB fields fixed.  */
 #define XRARB_MASK (X_MASK | RA_MASK | RB_MASK)
 
-/* An XRARB_MASK, but with the L bit clear.  */
+/* An XRARB_MASK, but with the L bit clear. */
 #define XRLARB_MASK (XRARB_MASK & ~((unsigned long) 1 << 16))
 
 /* An X_MASK with the RT and RA fields fixed.  */
@@ -2349,34 +2349,34 @@
 { "cau",     OP(15),	OP_MASK,	PWRCOM,		{ RT,RA,SISIGNOPT } },
 { "subis",   OP(15),	OP_MASK,	PPCCOM,		{ RT, RA, NSI } },
 
-{ "bdnz-",   BBO(16,BODNZ,0,0),      BBOATBI_MASK, PPCCOM,	{ BDM } },
-{ "bdnz+",   BBO(16,BODNZ,0,0),      BBOATBI_MASK, PPCCOM,	{ BDP } },
-{ "bdnz",    BBO(16,BODNZ,0,0),      BBOATBI_MASK, PPCCOM,	{ BD } },
-{ "bdn",     BBO(16,BODNZ,0,0),      BBOATBI_MASK, PWRCOM,	{ BD } },
-{ "bdnzl-",  BBO(16,BODNZ,0,1),      BBOATBI_MASK, PPCCOM,	{ BDM } },
-{ "bdnzl+",  BBO(16,BODNZ,0,1),      BBOATBI_MASK, PPCCOM,	{ BDP } },
-{ "bdnzl",   BBO(16,BODNZ,0,1),      BBOATBI_MASK, PPCCOM,	{ BD } },
-{ "bdnl",    BBO(16,BODNZ,0,1),      BBOATBI_MASK, PWRCOM,	{ BD } },
-{ "bdnza-",  BBO(16,BODNZ,1,0),      BBOATBI_MASK, PPCCOM,	{ BDMA } },
-{ "bdnza+",  BBO(16,BODNZ,1,0),      BBOATBI_MASK, PPCCOM,	{ BDPA } },
-{ "bdnza",   BBO(16,BODNZ,1,0),      BBOATBI_MASK, PPCCOM,	{ BDA } },
-{ "bdna",    BBO(16,BODNZ,1,0),      BBOATBI_MASK, PWRCOM,	{ BDA } },
-{ "bdnzla-", BBO(16,BODNZ,1,1),      BBOATBI_MASK, PPCCOM,	{ BDMA } },
-{ "bdnzla+", BBO(16,BODNZ,1,1),      BBOATBI_MASK, PPCCOM,	{ BDPA } },
-{ "bdnzla",  BBO(16,BODNZ,1,1),      BBOATBI_MASK, PPCCOM,	{ BDA } },
-{ "bdnla",   BBO(16,BODNZ,1,1),      BBOATBI_MASK, PWRCOM,	{ BDA } },
-{ "bdz-",    BBO(16,BODZ,0,0),       BBOATBI_MASK, PPCCOM,	{ BDM } },
-{ "bdz+",    BBO(16,BODZ,0,0),       BBOATBI_MASK, PPCCOM,	{ BDP } },
-{ "bdz",     BBO(16,BODZ,0,0),       BBOATBI_MASK, COM,		{ BD } },
-{ "bdzl-",   BBO(16,BODZ,0,1),       BBOATBI_MASK, PPCCOM,	{ BDM } },
-{ "bdzl+",   BBO(16,BODZ,0,1),       BBOATBI_MASK, PPCCOM,	{ BDP } },
-{ "bdzl",    BBO(16,BODZ,0,1),       BBOATBI_MASK, COM,		{ BD } },
-{ "bdza-",   BBO(16,BODZ,1,0),       BBOATBI_MASK, PPCCOM,	{ BDMA } },
-{ "bdza+",   BBO(16,BODZ,1,0),       BBOATBI_MASK, PPCCOM,	{ BDPA } },
-{ "bdza",    BBO(16,BODZ,1,0),       BBOATBI_MASK, COM,		{ BDA } },
-{ "bdzla-",  BBO(16,BODZ,1,1),       BBOATBI_MASK, PPCCOM,	{ BDMA } },
-{ "bdzla+",  BBO(16,BODZ,1,1),       BBOATBI_MASK, PPCCOM,	{ BDPA } },
-{ "bdzla",   BBO(16,BODZ,1,1),       BBOATBI_MASK, COM,		{ BDA } },
+{ "bdnz-",   BBO(16,BODNZ,0,0), BBOATBI_MASK, PPCCOM,	{ BDM } },
+{ "bdnz+",   BBO(16,BODNZ,0,0), BBOATBI_MASK, PPCCOM,	{ BDP } },
+{ "bdnz",    BBO(16,BODNZ,0,0), BBOATBI_MASK, PPCCOM,	{ BD } },
+{ "bdn",     BBO(16,BODNZ,0,0), BBOATBI_MASK, PWRCOM,	{ BD } },
+{ "bdnzl-",  BBO(16,BODNZ,0,1), BBOATBI_MASK, PPCCOM,	{ BDM } },
+{ "bdnzl+",  BBO(16,BODNZ,0,1), BBOATBI_MASK, PPCCOM,	{ BDP } },
+{ "bdnzl",   BBO(16,BODNZ,0,1), BBOATBI_MASK, PPCCOM,	{ BD } },
+{ "bdnl",    BBO(16,BODNZ,0,1), BBOATBI_MASK, PWRCOM,	{ BD } },
+{ "bdnza-",  BBO(16,BODNZ,1,0), BBOATBI_MASK, PPCCOM,	{ BDMA } },
+{ "bdnza+",  BBO(16,BODNZ,1,0), BBOATBI_MASK, PPCCOM,	{ BDPA } },
+{ "bdnza",   BBO(16,BODNZ,1,0), BBOATBI_MASK, PPCCOM,	{ BDA } },
+{ "bdna",    BBO(16,BODNZ,1,0), BBOATBI_MASK, PWRCOM,	{ BDA } },
+{ "bdnzla-", BBO(16,BODNZ,1,1), BBOATBI_MASK, PPCCOM,	{ BDMA } },
+{ "bdnzla+", BBO(16,BODNZ,1,1), BBOATBI_MASK, PPCCOM,	{ BDPA } },
+{ "bdnzla",  BBO(16,BODNZ,1,1), BBOATBI_MASK, PPCCOM,	{ BDA } },
+{ "bdnla",   BBO(16,BODNZ,1,1), BBOATBI_MASK, PWRCOM,	{ BDA } },
+{ "bdz-",    BBO(16,BODZ,0,0),  BBOATBI_MASK, PPCCOM,	{ BDM } },
+{ "bdz+",    BBO(16,BODZ,0,0),  BBOATBI_MASK, PPCCOM,	{ BDP } },
+{ "bdz",     BBO(16,BODZ,0,0),  BBOATBI_MASK, COM,	{ BD } },
+{ "bdzl-",   BBO(16,BODZ,0,1),  BBOATBI_MASK, PPCCOM,	{ BDM } },
+{ "bdzl+",   BBO(16,BODZ,0,1),  BBOATBI_MASK, PPCCOM,	{ BDP } },
+{ "bdzl",    BBO(16,BODZ,0,1),  BBOATBI_MASK, COM,	{ BD } },
+{ "bdza-",   BBO(16,BODZ,1,0),  BBOATBI_MASK, PPCCOM,	{ BDMA } },
+{ "bdza+",   BBO(16,BODZ,1,0),  BBOATBI_MASK, PPCCOM,	{ BDPA } },
+{ "bdza",    BBO(16,BODZ,1,0),  BBOATBI_MASK, COM,	{ BDA } },
+{ "bdzla-",  BBO(16,BODZ,1,1),  BBOATBI_MASK, PPCCOM,	{ BDMA } },
+{ "bdzla+",  BBO(16,BODZ,1,1),  BBOATBI_MASK, PPCCOM,	{ BDPA } },
+{ "bdzla",   BBO(16,BODZ,1,1),  BBOATBI_MASK, COM,	{ BDA } },
 { "blt-",    BBOCB(16,BOT,CBLT,0,0), BBOATCB_MASK, PPCCOM,	{ CR, BDM } },
 { "blt+",    BBOCB(16,BOT,CBLT,0,0), BBOATCB_MASK, PPCCOM,	{ CR, BDP } },
 { "blt",     BBOCB(16,BOT,CBLT,0,0), BBOATCB_MASK, COM,		{ CR, BD } },
@@ -2625,7 +2625,7 @@
 { "ba",      B(18,1,0),	B_MASK,		COM,		{ LIA } },
 { "bla",     B(18,1,1),	B_MASK,		COM,		{ LIA } },
 
-{ "mcrf",    XL(19,0),	XLBB_MASK|(3 << 21)|(3 << 16), COM,	{ BF, BFA } },
+{ "mcrf",    XL(19,0),	XLBB_MASK|(3<<21)|(3<<16), COM,	{ BF, BFA } },
 
 { "blr",     XLO(19,BOU,16,0), XLBOBIBB_MASK, PPCCOM,	{ 0 } },
 { "br",      XLO(19,BOU,16,0), XLBOBIBB_MASK, PWRCOM,	{ 0 } },
@@ -2854,7 +2854,8 @@
 
 { "crnot",   XL(19,33), XL_MASK,	PPCCOM,		{ BT, BA, BBA } },
 { "crnor",   XL(19,33),	XL_MASK,	COM,		{ BT, BA, BB } },
-{ "rfmci",    X(19,38), 0xffffffff,	PPCRFMCI,	{ 0 } },
+{ "rfmci",    X(19,38),  0xffffffff,	PPCRFMCI,	{ 0 } },
+
 
 { "rfi",     XL(19,50),	0xffffffff,	COM,		{ 0 } },
 { "rfci",    XL(19,51),	0xffffffff,	PPC403,		{ 0 } },