aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/ns32k
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-05-26 17:59:39 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-05-26 17:59:39 +0000
commitf2c762e031983be932f3d26aa45a91aa2711fe20 (patch)
treece3ed971a4ebe487c643b09e57cd791e27d3742d /gdb/config/ns32k
parentd43efbe3280e3f780c19bac2b50030e82f003e78 (diff)
downloadgdb-f2c762e031983be932f3d26aa45a91aa2711fe20.zip
gdb-f2c762e031983be932f3d26aa45a91aa2711fe20.tar.gz
gdb-f2c762e031983be932f3d26aa45a91aa2711fe20.tar.bz2
* ns32k-tdep.c (ns32k_register_byte_32082,
ns32k_register_byte_32382, ns32k_register_raw_size, ns32k_register_virtual_size, ns32k_register_virtual_type): New functions. * config/ns32k/tm-nbsd.h (REGISTER_BYTE): Define as ns32k_register_byte_32382. * config/ns32k/tm-umax.h: Update copyright years. (REGISTER_BYTE): Define as ns32k_register_byte_32082. (REGISTER_RAW_SIZE): Define as ns32k_register_raw_size. (REGISTER_VIRTUAL_SIZE): Define as ns32k_register_virtual_size. (REGISTER_VIRTUAL_TYPE): Define as ns32k_register_virtual_type. (ns32k_get_enter_addr): Fix prototype.
Diffstat (limited to 'gdb/config/ns32k')
-rw-r--r--gdb/config/ns32k/tm-nbsd.h15
-rw-r--r--gdb/config/ns32k/tm-umax.h37
2 files changed, 13 insertions, 39 deletions
diff --git a/gdb/config/ns32k/tm-nbsd.h b/gdb/config/ns32k/tm-nbsd.h
index a3bebbe..ae29bcf 100644
--- a/gdb/config/ns32k/tm-nbsd.h
+++ b/gdb/config/ns32k/tm-nbsd.h
@@ -49,7 +49,7 @@
/* tm-umax.h assumes a 32082 fpu. We have a 32382 fpu. */
#undef REGISTER_NAME
-#define REGISTER_NAME(REGNUM) ns32k_register_name_32382(REGNUM)
+#define REGISTER_NAME(REGNUM) ns32k_register_name_32382((REGNUM))
#undef NUM_REGS
#define NUM_REGS 29
@@ -61,18 +61,7 @@
((NUM_REGS - 4) * REGISTER_RAW_SIZE(R0_REGNUM) \
+ 8 * REGISTER_RAW_SIZE(LP0_REGNUM))
-/* Index within `registers' of the first byte of the space for
- register N. */
-
-/* This is a bit yuck. The even numbered double precision floating
- point long registers occupy the same space as the even:odd numbered
- single precision floating point registers, but the extra 32381 fpu
- registers are at the end. Doing it this way is compatable for both
- 32081 and 32381 equiped machines. */
-
#undef REGISTER_BYTE
-#define REGISTER_BYTE(N) (((N) < LP0_REGNUM? (N)\
- : ((N) - LP0_REGNUM) & 1? (N) - 1 \
- : ((N) - LP0_REGNUM + FP0_REGNUM)) * 4)
+#define REGISTER_BYTE(N) ns32k_register_byte_32382 ((N))
#endif /* TM_NBSD_H */
diff --git a/gdb/config/ns32k/tm-umax.h b/gdb/config/ns32k/tm-umax.h
index ed77f3c..8583866 100644
--- a/gdb/config/ns32k/tm-umax.h
+++ b/gdb/config/ns32k/tm-umax.h
@@ -1,5 +1,5 @@
/* Definitions to make GDB run on an encore under umax 4.2
- Copyright 1987, 1989, 1991, 1993, 1994, 1998, 1999, 2000, 2001
+ Copyright 1987, 1989, 1991, 1993, 1994, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GDB.
@@ -106,21 +106,15 @@ extern char *ns32k_register_name_32382 (int);
/* Index within `registers' of the first byte of the space for
register N. */
+extern int ns32k_register_byte_32082 (int);
+extern int ns32k_register_byte_32382 (int);
+#define REGISTER_BYTE(N) ns32k_register_byte_32082 ((N))
-#define REGISTER_BYTE(N) ((N) >= LP0_REGNUM ? \
- LP0_REGNUM * 4 + ((N) - LP0_REGNUM) * 8 : (N) * 4)
+extern int ns32k_register_raw_size (int);
+#define REGISTER_RAW_SIZE(N) ns32k_register_raw_size ((N))
-/* Number of bytes of storage in the actual machine representation
- for register N. On the 32000, all regs are 4 bytes
- except for the doubled floating registers. */
-
-#define REGISTER_RAW_SIZE(N) ((N) >= LP0_REGNUM ? 8 : 4)
-
-/* Number of bytes of storage in the program's representation
- for register N. On the 32000, all regs are 4 bytes
- except for the doubled floating registers. */
-
-#define REGISTER_VIRTUAL_SIZE(N) ((N) >= LP0_REGNUM ? 8 : 4)
+extern int ns32k_register_virtual_size (int);
+#define REGISTER_VIRTUAL_SIZE(N) ns32k_register_virtual_size ((N))
/* Largest value REGISTER_RAW_SIZE can have. */
@@ -130,17 +124,8 @@ extern char *ns32k_register_name_32382 (int);
#define MAX_REGISTER_VIRTUAL_SIZE 8
-/* Return the GDB type object for the "standard" data type
- of data in register N. */
-
-#define REGISTER_VIRTUAL_TYPE(N) \
- (((N) < FP0_REGNUM) ? \
- builtin_type_int : \
- ((N) < FP0_REGNUM + 8) ? \
- builtin_type_float : \
- ((N) < LP0_REGNUM) ? \
- builtin_type_int : \
- builtin_type_double)
+struct type *ns32k_register_virtual_type (int);
+#define REGISTER_VIRTUAL_TYPE(N) ns32k_register_virtual_type ((N))
/* Store the address of the place in which to copy the structure the
subroutine will return. This is called from call_function.
@@ -199,7 +184,7 @@ extern char *ns32k_register_name_32382 (int);
Returns positive address > 1 if pc is between enter/exit,
1 if pc before enter or after exit, 0 otherwise. */
-extern CORE_ADDR ns32k_get_enter_addr ();
+extern CORE_ADDR ns32k_get_enter_addr (CORE_ADDR);
/* Return number of args passed to a frame.
Can return -1, meaning no way to tell. */