HP 300 BSD port for machines at FSF. Also minor mips change.

This commit is contained in:
John Gilmore 1991-08-22 01:42:18 +00:00
parent a7f538ebd1
commit 9fa283782e
8 changed files with 43 additions and 25 deletions

View file

@ -1,3 +1,22 @@
Wed Aug 21 18:21:09 1991 John Gilmore (gnu at cygint.cygnus.com)
* infptrace.c (KERNEL_U_ADDR_BSD): Include a.out.gnu.h.
* i960-tdep.c, m68k-tdep.c, sparc-tdep.c, tm-i960.h,
tm-m68k.h, remote-nindy.c: Change ext_format_XXX structs
to single structures rather than arrays; when passing
their address, use &. This avoids trouble with bdead compilers.
* mcheck.c: Don't include <stdlib.h>; just declare "void abort();"
instead. This avoids portability headaches.
* mips-tdep.c (mips_do_registers_info): Only print FP regs if
asked to.
* source.c (open_source_file): Avoid ANSI const bdeath by
skipping declaration and then casting result value.
* tm-hp300bsd.h: Clarify comment.
* utils.c (strstr): Result is const char *; ANSI bdeath.
* xm-hp300bsd.h: Define HOST_BYTE_ORDER. Redefine INT_MIN,
since system include file defines it differently from "defs.h",
though the two are equivalent for our purposes.
Tue Aug 20 16:01:11 1991 John Gilmore (gnu at cygint.cygnus.com)
* tconfig/sun*4: Remove warnings about system assembler.

View file

@ -34,9 +34,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Structure of i960 extended floating point format. */
const struct ext_format ext_format_i960 [] = {
const struct ext_format ext_format_i960 = {
/* tot sbyte smask expbyte manbyte */
{ 12, 9, 0x80, 9,8, 4,0 }, /* i960 */
12, 9, 0x80, 9,8, 4,0, /* i960 */
};
/* gdb960 is always running on a non-960 host. Check its characteristics.

View file

@ -20,7 +20,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "ansidecl.h"
#include <stdlib.h>
#include "gmalloc.h"
/* Old hook values. */
@ -28,14 +27,9 @@ static void EXFUN((*old_free_hook), (PTR ptr));
static PTR EXFUN((*old_malloc_hook), (size_t size));
static PTR EXFUN((*old_realloc_hook), (PTR ptr, size_t size));
/* FIXME. We cannot *declare* abort() as either being void or being
int, because if the system declares it as the other, we get a fatal
error. It's senseless to configure the system for whether abort is
void or int. So we simply fail to declare it, which works on all
systems, but might produce a warning on yours. Please ignore the warning
and raise your middle finger in the general direction of the ANSI C
committee in tribute. */
/* Function to call when something awful happens. */
extern void abort();
static void EXFUN((*abortfunc), (void)) = (void (*)()) abort;
/* Arbitrary magical numbers. */

View file

@ -130,7 +130,7 @@ extern void generic_mourn_inferior ();
extern struct target_ops nindy_ops;
extern jmp_buf to_top_level;
extern FILE *instream;
extern struct ext_format ext_format_i960[]; /* i960-tdep.c */
extern struct ext_format ext_format_i960; /* i960-tdep.c */
extern char ninStopWhy ();
@ -495,7 +495,7 @@ nindy_fetch_registers(regno)
&nindy_regs.fp_as_double[8 * (regnum - FP0_REGNUM)],
&inv);
/* dub now in host byte order */
double_to_ieee_extended (ext_format_i960, &dub,
double_to_ieee_extended (&ext_format_i960, &dub,
&registers[REGISTER_BYTE (regnum)]);
}
@ -524,7 +524,7 @@ nindy_store_registers(regno)
bcopy (&registers[REGISTER_BYTE (TCW_REGNUM)], nindy_regs.tcw, 1*4);
/* Float regs. Only works on IEEE_FLOAT hosts. */
for (regnum = FP0_REGNUM; regnum < FP0_REGNUM + 4; regnum++) {
ieee_extended_to_double (ext_format_i960,
ieee_extended_to_double (&ext_format_i960,
&registers[REGISTER_BYTE (regnum)], &dub);
/* dub now in host byte order */
/* FIXME-someday, the arguments to unpack_double are backward.

View file

@ -149,7 +149,7 @@ read_memory_integer (read_register (SP_REGNUM), 4)
/* Put the declaration out here because if it's in the macros, PCC
will complain. */
extern struct ext_format ext_format_68881 [];
extern struct ext_format ext_format_68881;
/* Convert data from raw format for register REGNUM
to virtual format for register REGNUM. */
@ -157,7 +157,7 @@ extern struct ext_format ext_format_68881 [];
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
{ \
if ((REGNUM) >= FP0_REGNUM && (REGNUM) < FPC_REGNUM) \
ieee_extended_to_double (ext_format_68881, (FROM), (TO)); \
ieee_extended_to_double (&ext_format_68881, (FROM), (double *)(TO)); \
else \
bcopy ((FROM), (TO), 4); \
}
@ -168,7 +168,7 @@ extern struct ext_format ext_format_68881 [];
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
{ \
if ((REGNUM) >= FP0_REGNUM && (REGNUM) < FPC_REGNUM) \
double_to_ieee_extended (ext_format_68881, (FROM), (TO)); \
double_to_ieee_extended (&ext_format_68881, (double *)(FROM), (TO)); \
else \
bcopy ((FROM), (TO), 4); \
}

View file

@ -1,5 +1,5 @@
/* Parameters for execution on a Hewlett-Packard 9000/300, running bsd.
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
/* Parameters for target machine Hewlett-Packard 9000/300, running bsd.
Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.

View file

@ -175,10 +175,10 @@ extern CORE_ADDR saved_pc_after_call ();
#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,FROM,TO) \
{ \
extern struct ext_format ext_format_i960[]; \
extern struct ext_format ext_format_i960; \
\
if ((REGNUM) >= FP0_REGNUM) \
ieee_extended_to_double (ext_format_i960, (FROM), (TO)); \
ieee_extended_to_double (&ext_format_i960, (FROM), (double *)(TO)); \
else \
bcopy ((FROM), (TO), 4); \
}
@ -188,10 +188,10 @@ extern CORE_ADDR saved_pc_after_call ();
#define REGISTER_CONVERT_TO_RAW(REGNUM,FROM,TO) \
{ \
extern struct ext_format ext_format_i960[]; \
extern struct ext_format ext_format_i960; \
\
if ((REGNUM) >= FP0_REGNUM) \
double_to_ieee_extended (ext_format_i960, (FROM), (TO)); \
double_to_ieee_extended (&ext_format_i960, (double *)(FROM), (TO)); \
else \
bcopy ((FROM), (TO), 4); \
}

View file

@ -1,5 +1,5 @@
/* Parameters for execution on a Hewlett-Packard 9000/300, running bsd.
Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc.
/* Parameters for hosting on a Hewlett-Packard 9000/300, running bsd.
Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc.
This file is part of GDB.
@ -23,7 +23,12 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
* Problems to hpbsd-bugs@cs.utah.edu
*/
#include <machine/endian.h>
#define HOST_BYTE_ORDER BIG_ENDIAN
/* Avoid "INT_MIN redefined" warnings -- by defining it here, exactly
the same as in the system <machine/machtypes.h> file. */
#undef INT_MIN
#define INT_MIN 0x80000000
/* Get rid of any system-imposed stack limit if possible. */