Introduce MOD2 switch to segregate material on Modula-2; eventually
[deliverable/binutils-gdb.git] / gdb / m88k-tdep.c
index 27d4bea0e57b6863a45ab109c7823694df36385c..1ebc893a9b987d13ab83bd7ddec6cc3275d7b7cd 100644 (file)
@@ -17,7 +17,6 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
@@ -46,6 +45,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "setjmp.h"
 #include "value.h"
 
+/* Size of an instruction */
+#define        BYTES_PER_88K_INSN      4
+
 void frame_find_saved_regs ();
 
 
@@ -92,7 +94,7 @@ frame_chain_valid (chain, thisframe)
      struct frame_info *thisframe;
 {
   return (chain != 0
-       && outside_startup_file (FRAME_SAVED_PC (thisframe)));
+       && !inside_entry_file (FRAME_SAVED_PC (thisframe)));
 }
 
 void
@@ -179,11 +181,8 @@ next_insn (memaddr, pword1)
 {
   unsigned long buf[1];
 
-  read_memory (memaddr, buf, sizeof (buf));
-  *pword1 = buf[0];
-  SWAP_TARGET_AND_HOST (pword1, sizeof (long));
-
-  return memaddr + 4;
+  *pword1 = read_memory_integer (memaddr, BYTES_PER_88K_INSN);
+  return memaddr + BYTES_PER_88K_INSN;
 }
 
 /* Read a register from frames called by us (or from the hardware regs).  */
@@ -558,37 +557,6 @@ frame_saved_pc (frame)
 }
 
 
-#if TARGET_BYTE_ORDER != HOST_BYTE_ORDER
-you lose
-#else /* Host and target byte order the same.  */
-#define SINGLE_EXP_BITS  8
-#define DOUBLE_EXP_BITS 11
-int
-IEEE_isNAN(fp, len)
-     int *fp, len;
-     /* fp points to a single precision OR double precision
-      * floating point value; len is the number of bytes, either 4 or 8.
-      * Returns 1 iff fp points to a valid IEEE floating point number.
-      * Returns 0 if fp points to a denormalized number or a NaN
-      */
-{
-  int exponent;
-  if (len == 4)
-    {
-      exponent = *fp;
-      exponent = exponent << 1 >> (32 - SINGLE_EXP_BITS - 1);
-      return ((exponent == -1) || (! exponent && *fp));
-    }
-  else if (len == 8)
-    {
-      exponent = *(fp+1);
-      exponent = exponent << 1 >> (32 - DOUBLE_EXP_BITS - 1);
-      return ((exponent == -1) || (! exponent && *fp * *(fp+1)));
-    }
-  else return 1;
-}
-#endif /* Host and target byte order the same.  */
-
 static int
 pushed_size (prev_words, v)
      int prev_words;
@@ -604,7 +572,7 @@ pushed_size (prev_words, v)
       case TYPE_CODE_ENUM:             /* Enumeration type */
       case TYPE_CODE_INT:              /* Integer type */
       case TYPE_CODE_REF:              /* C++ Reference types */
-      case TYPE_CODE_ARRAY:            /* Array type, lower bound zero */
+      case TYPE_CODE_ARRAY:            /* Array type, lower & upper bounds */
 
        return 1;
 
@@ -627,7 +595,7 @@ pushed_size (prev_words, v)
       case TYPE_CODE_FUNC:             /* Function type */
       case TYPE_CODE_SET:              /* Pascal sets */
       case TYPE_CODE_RANGE:            /* Range (integers within bounds) */
-      case TYPE_CODE_PASCAL_ARRAY:     /* Array with explicit type of index */
+      case TYPE_CODE_STRING:           /* String type */
       case TYPE_CODE_MEMBER:           /* Member type */
       case TYPE_CODE_METHOD:           /* Method type */
        /* Don't know how to pass these yet.  */
@@ -643,7 +611,7 @@ store_parm_word (address, val)
      CORE_ADDR address;
      int val;
 {
-  write_memory (address, &val, 4);
+  write_memory (address, (char *)&val, 4);
 }
 
 static int
@@ -664,7 +632,7 @@ store_parm (prev_words, left_parm_addr, v)
       case TYPE_CODE_PTR:              /* Pointer type */
       case TYPE_CODE_ENUM:             /* Enumeration type */
       case TYPE_CODE_INT:              /* Integer type */
-      case TYPE_CODE_ARRAY:            /* Array type, lower bound zero */
+      case TYPE_CODE_ARRAY:            /* Array type, lower & upper bounds */
       case TYPE_CODE_REF:              /* C++ Reference types */
 
        store_parm_word (start, *val_addr);
This page took 0.024645 seconds and 4 git commands to generate.