This commit was generated by cvs2svn to track changes on a CVS vendor
[deliverable/binutils-gdb.git] / gdb / config / m68k / tm-isi.h
index f994524dd696ea749a9526757523610d0be54117..1442d178f5b35e920fd7c1e50db532622d0b68d0 100644 (file)
@@ -1,21 +1,22 @@
 /* Definitions to target GDB on an ISI Optimum V (3.05) under 4.3bsd.
    Copyright (C) 1987, 1989, 1991, 1993 Free Software Foundation, Inc.
 
-This file is part of GDB.
+   This file is part of GDB.
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
 
-This program is distributed in the hope that it 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.
+   This program is distributed in the hope that it 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 program; if not, write to the Free Software
-Foundation, Inc., 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 program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
 
 /* This has not been tested on ISI's running BSD 4.2, but it will probably
    work.  */
@@ -36,23 +37,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    On the ISI, the kernel resets the pc to the trap instr */
 
 #define DECR_PC_AFTER_BREAK 0
-
 \f
+
 /* Return number of args passed to a frame.
    Can return -1, meaning no way to tell.  */
 
-#define FRAME_NUM_ARGS(val, fi)  \
-{ register CORE_ADDR pc = FRAME_SAVED_PC (fi);                 \
-  register int insn = 0177777 & read_memory_integer (pc, 2);   \
-  val = 0;                                                     \
-  if (insn == 0047757 || insn == 0157374)  /* lea W(sp),sp or addaw #W,sp */ \
-    val = read_memory_integer (pc + 2, 2);                     \
-  else if ((insn & 0170777) == 0050217 /* addql #N, sp */      \
-          || (insn & 0170777) == 0050117)  /* addqw */         \
-    { val = (insn >> 9) & 7; if (val == 0) val = 8; }          \
-  else if (insn == 0157774) /* addal #WW, sp */                        \
-    val = read_memory_integer (pc + 2, 4);                     \
-  val >>= 2; }
+extern int isi_frame_num_args PARAMS ((struct frame_info * fi));
+#define FRAME_NUM_ARGS(fi) (isi_frame_num_args ((fi)))
 
 /* Put here the code to store, into a struct frame_saved_regs,
    the addresses of the saved registers of frame described by FRAME_INFO.
@@ -131,20 +122,7 @@ retry:                                                                     \
 /* The only reason this is here is the tm-isi.h reference below.  It
    was moved back here from tm-m68k.h.  FIXME? */
 
-#define SKIP_PROLOGUE(pc)   \
-{ register int op = read_memory_integer (pc, 2);       \
-  if (op == 0047126)                                   \
-    pc += 4;   /* Skip link #word */                   \
-  else if (op == 0044016)                              \
-    pc += 6;   /* Skip link #long */                   \
-  /* Not sure why branches are here.  */               \
-  /* From tm-isi.h, tm-altos.h */                      \
-  else if (op == 0060000)                              \
-    pc += 4;   /* Skip bra #word */                    \
-  else if (op == 00600377)                             \
-    pc += 6;   /* skip bra #long */                    \
-  else if ((op & 0177400) == 0060000)                  \
-    pc += 2;   /* skip bra #char */                    \
-}
+extern CORE_ADDR isi_skip_prologue PARAMS ((CORE_ADDR));
+#define SKIP_PROLOGUE(pc) (isi_skip_prologue (pc))
 
 #include "m68k/tm-m68k.h"
This page took 0.026289 seconds and 4 git commands to generate.