* config/mips/tm-mips.h (GDB_TARGET_IS_MIPS64): If not already
authorIan Lance Taylor <ian@airs.com>
Thu, 6 Oct 1994 16:43:40 +0000 (16:43 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 6 Oct 1994 16:43:40 +0000 (16:43 +0000)
defined, define as 0.
(FIX_CALL_DUMMY): Rewrite to remove presumption that host and
target are similar.
* config/mips/tm-idt.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
* config/mips/tm-idtl.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
* config/mips/tm-idt64.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
(BREAKPOINT): Remove definition.
* config/mips/tm-idtl64.h (TARGET_BYTE_ORDER_SELECTABLE): Define.
(BREAKPOINT): Remove definition.
* config/mips/tm-mips64.h (GDB_TARGET_IS_MIPS64): Define with a
value of 1, rather than without a value.
* config/mips/tm-bigmips64.h (GDB_TARGET_IS_MIPS64): Likewise.

gdb/config/mips/tm-bigmips64.h
gdb/config/mips/tm-idt.h
gdb/config/mips/tm-idt64.h
gdb/config/mips/tm-idtl.h
gdb/config/mips/tm-idtl64.h
gdb/config/mips/tm-mips.h
gdb/config/mips/tm-mips64.h

index a9161d8039bb60992a37058015474a4f21691b40..1f45b18774322aac6f0580206874537cc910cf5c 100644 (file)
@@ -18,7 +18,7 @@ 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.  */
 
-#define GDB_TARGET_IS_MIPS64
+#define GDB_TARGET_IS_MIPS64 1
 
 /* force LONGEST to be long long in gdb */
 #define FORCE_LONG_LONG
index bb4697d2136ae410fd4258a5e9e2452208fad434..e53e5e7dd490a2669edbcb8b362a1a8b067daf2c 100644 (file)
@@ -16,4 +16,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.  */
 
+#define TARGET_BYTE_ORDER_SELECTABLE
+
 #include "mips/tm-bigmips.h"
index 4f60ae4da43aa71f214149f476f393bff203c52e..51f0cd8ca084b4e49fd50f8057a0591432e6f669 100644 (file)
@@ -16,10 +16,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 "mips/tm-bigmips64.h"
-
-/* The IDT board uses an unusual breakpoint value, and sometimes gets
-   confused when it sees the usual MIPS breakpoint instruction.  */
+#define TARGET_BYTE_ORDER_SELECTABLE
 
-#undef BREAKPOINT
-#define BREAKPOINT {0, 0, 0x0a, 0x0d}
+#include "mips/tm-bigmips64.h"
index 3410bcac091f90affd2231034204df4791eec512..d00bb0444900dd543fc8f44d37d2076385c1257f 100644 (file)
@@ -16,4 +16,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.  */
 
+#define TARGET_BYTE_ORDER_SELECTABLE
+
 #include "mips/tm-mips.h"
index dbe4eb508753fc546844e09ccd9615dfed9d490e..73aa62128a4d945509f20da48d79e55883147b06 100644 (file)
@@ -16,10 +16,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 "mips/tm-mips64.h"
-
-/* The IDT board uses an unusual breakpoint value, and sometimes gets
-   confused when it sees the usual MIPS breakpoint instruction.  */
+#define TARGET_BYTE_ORDER_SELECTABLE
 
-#undef BREAKPOINT
-#define BREAKPOINT {0x0d, 0x0a, 0, 0}
+#include "mips/tm-mips64.h"
index 3deb7b6ae2f92d52e901e57f9452bc46ada4c2ea..87fbfe66d8f61109f8a22b172af796f860d130f4 100644 (file)
@@ -27,6 +27,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #define TARGET_BYTE_ORDER LITTLE_ENDIAN
 #endif
 
+#if !defined (GDB_TARGET_IS_MIPS64)
+#define GDB_TARGET_IS_MIPS64 0
+#endif
+
 /* Floating point is IEEE compliant */
 #define IEEE_FLOAT
 
@@ -344,50 +348,57 @@ extern int in_sigtramp PARAMS ((CORE_ADDR, char *));
 /* Insert the specified number of args and function address
    into a call sequence of the above form stored at DUMMYNAME.  */
 
-#if TARGET_BYTE_ORDER == BIG_ENDIAN && ! defined (GDB_TARGET_IS_MIPS64)
 /* For big endian mips machines we need to switch the order of the
    words with a floating-point value (it was already coerced to a double
    by mips_push_arguments).  */
 #define FIX_CALL_DUMMY(dummyname, start_sp, fun, nargs, args, rettype, gcc_p) \
-  do {                                                                 \
-    ((int*)(dummyname))[11] |= ((unsigned long)(fun)) >> 16;           \
-    ((int*)(dummyname))[12] |= (unsigned short)(fun);                  \
-    if (! mips_fpu) {                                                  \
-      ((int *) (dummyname))[3] = 0; ((int *) (dummyname))[4] = 0;      \
-      ((int *) (dummyname))[5] = 0; ((int *) (dummyname))[6] = 0;      \
-    } else {                                                           \
-      if (nargs > 0 &&                                                 \
-         TYPE_CODE(VALUE_TYPE(args[0])) == TYPE_CODE_FLT) {            \
-       if (TYPE_LENGTH(VALUE_TYPE(args[0])) > 8)                       \
-         error ("Can't pass floating point value of more than 8 bytes to a function"); \
-       ((int *) (dummyname))[3] = MK_OP(OP_LDFPR,SP_REGNUM,12,4);      \
-       ((int *) (dummyname))[4] = MK_OP(OP_LDFPR,SP_REGNUM,13,0);      \
-      }                                                                        \
-      if (nargs > 1 &&                                                 \
-         TYPE_CODE(VALUE_TYPE(args[1])) == TYPE_CODE_FLT) {            \
-       if (TYPE_LENGTH(VALUE_TYPE(args[1])) > 8)                       \
-         error ("Can't pass floating point value of more than 8 bytes to a function"); \
-       ((int *) (dummyname))[5] = MK_OP(OP_LDFPR,SP_REGNUM,14,12);     \
-       ((int *) (dummyname))[6] = MK_OP(OP_LDFPR,SP_REGNUM,15,8);      \
-      }                                                                        \
+  do                                                                   \
+    {                                                                  \
+      store_unsigned_integer                                           \
+       (dummyname + 11 * 4, 4,                                         \
+        (extract_unsigned_integer (dummyname + 11 * 4, 4)              \
+         | (((fun) >> 16) & 0xffff)));                                 \
+      store_unsigned_integer                                           \
+       (dummyname + 12 * 4, 4,                                         \
+        (extract_unsigned_integer (dummyname + 12 * 4, 4)              \
+         | ((fun) & 0xffff)));                                         \
+      if (! mips_fpu)                                                  \
+       {                                                               \
+         store_unsigned_integer (dummyname + 3 * 4, 4,                 \
+                                 (unsigned LONGEST) 0);                \
+         store_unsigned_integer (dummyname + 4 * 4, 4,                 \
+                                 (unsigned LONGEST) 0);                \
+         store_unsigned_integer (dummyname + 5 * 4, 4,                 \
+                                 (unsigned LONGEST) 0);                \
+         store_unsigned_integer (dummyname + 6 * 4, 4,                 \
+                                 (unsigned LONGEST) 0);                \
+       }                                                               \
+      else if (TARGET_BYTE_ORDER == BIG_ENDIAN                         \
+              && ! GDB_TARGET_IS_MIPS64)                               \
+       {                                                               \
+         if (nargs > 0                                                 \
+             && TYPE_CODE (VALUE_TYPE (args[0])) == TYPE_CODE_FLT)     \
+           {                                                           \
+             if (TYPE_LENGTH (VALUE_TYPE (args[0])) > 8)               \
+               error ("floating point value too large to pass to function");\
+             store_unsigned_integer                                    \
+               (dummyname + 3 * 4, 4, MK_OP (OP_LDFPR, SP_REGNUM, 12, 4));\
+             store_unsigned_integer                                    \
+               (dummyname + 4 * 4, 4, MK_OP (OP_LDFPR, SP_REGNUM, 13, 0));\
+           }                                                           \
+         if (nargs > 1                                                 \
+             && TYPE_CODE (VALUE_TYPE (args[1])) == TYPE_CODE_FLT)     \
+           {                                                           \
+             if (TYPE_LENGTH (VALUE_TYPE (args[1])) > 8)               \
+               error ("floating point value too large to pass to function");\
+             store_unsigned_integer                                    \
+               (dummyname + 5 * 4, 4, MK_OP (OP_LDFPR, SP_REGNUM, 14, 12));\
+             store_unsigned_integer                                    \
+               (dummyname + 6 * 4, 4, MK_OP (OP_LDFPR, SP_REGNUM, 15, 8));\
+           }                                                           \
+       }                                                               \
     }                                                                  \
-  } while (0)
-#else
-#define FIX_CALL_DUMMY(dummyname, start_sp, fun, nargs,        args, rettype, gcc_p)\
-  do \
-    { \
-      ((int*)(dummyname))[11] |= ((unsigned long)(fun)) >> 16; \
-      ((int*)(dummyname))[12] |= (unsigned short)(fun); \
-      if (! mips_fpu) \
-       { \
-         ((int *) (dummyname))[3] = 0; \
-         ((int *) (dummyname))[4] = 0; \
-         ((int *) (dummyname))[5] = 0; \
-         ((int *) (dummyname))[6] = 0; \
-       } \
-    } \
   while (0)
-#endif
 
 /* There's a mess in stack frame creation.  See comments in blockframe.c
    near reference to INIT_FRAME_PC_FIRST.  */
index 87afc21c8a4ba9dad16ea0c9b8f9d09307d85d11..10384f60f19befd04077abb03871f5b8e9d18dd2 100644 (file)
@@ -18,7 +18,7 @@ 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.  */
 
-#define GDB_TARGET_IS_MIPS64
+#define GDB_TARGET_IS_MIPS64 1
 
 /* force LONGEST to be long long in gdb */
 #define FORCE_LONG_LONG