From 337e2b6923fac20657d6ede9881439da3308c236 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 18 Dec 1997 18:45:57 +0000 Subject: [PATCH] mips.h (INIT_SUBTARGET_OPTABS): Define if not defined. * mips/mips.h (INIT_SUBTARGET_OPTABS): Define if not defined. (INIT_TARGET_OPTABS): Define. * mips/ecoff.h: Include gofast.h before mips.h. (INIT_SUBTARGET_OPTABS): Define instead of INIT_TARGET_OPTABS. * mips/elf64.h: Likewise. * mips/elf.h (ASM_OUTPUT_SECTION_NAME): Define. From-SVN: r17137 --- gcc/ChangeLog | 9 +++++++++ gcc/config/mips/ecoff.h | 10 +++++----- gcc/config/mips/elf.h | 20 +++++++++++++++++++- gcc/config/mips/elf64.h | 10 +++++----- gcc/config/mips/mips.h | 11 +++++++++++ 5 files changed, 49 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9333c233756..e299f31c691 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Thu Dec 18 19:19:57 1997 Ian Lance Taylor + + * mips/mips.h (INIT_SUBTARGET_OPTABS): Define if not defined. + (INIT_TARGET_OPTABS): Define. + * mips/ecoff.h: Include gofast.h before mips.h. + (INIT_SUBTARGET_OPTABS): Define instead of INIT_TARGET_OPTABS. + * mips/elf64.h: Likewise. + * mips/elf.h (ASM_OUTPUT_SECTION_NAME): Define. + Thu Dec 18 14:51:12 1997 Jason Merrill * except.c: Remove register_exception_table{,_p}. diff --git a/gcc/config/mips/ecoff.h b/gcc/config/mips/ecoff.h index 29bf0380c1f..813f148009e 100644 --- a/gcc/config/mips/ecoff.h +++ b/gcc/config/mips/ecoff.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. MIPS version with GOFAST floating point library. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -19,6 +19,10 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* US Software GOFAST library support. */ +#include "gofast.h" +#define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS + #include "mips/mips.h" #undef CPP_PREDEFINES @@ -27,10 +31,6 @@ Boston, MA 02111-1307, USA. */ /* Use memcpy, et. al., rather than bcopy. */ #define TARGET_MEM_FUNCTIONS -/* US Software GOFAST library support. */ -#include "gofast.h" -#define INIT_TARGET_OPTABS INIT_GOFAST_OPTABS - /* Don't assume anything about startfiles. The linker script will load the appropriate startfiles. */ #define STARTFILE_SPEC "" diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h index 8f5e32be396..334484169ae 100644 --- a/gcc/config/mips/elf.h +++ b/gcc/config/mips/elf.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. MIPS R3000 version with GOFAST floating point library. - Copyright (C) 1994 Free Software Foundation, Inc. + Copyright (C) 1994, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -24,7 +24,9 @@ Boston, MA 02111-1307, USA. */ /* Until we figure out what MIPS ELF targets normally use, just do stabs in ELF. */ +#ifndef PREFERRED_DEBUGGING_TYPE #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG +#endif /* Mostly like ECOFF. */ #include "mips/ecoff.h" @@ -51,3 +53,19 @@ do { \ not defined, the default value is `BIGGEST_ALIGNMENT'. */ #define MAX_OFILE_ALIGNMENT (32768*8) + +/* A C statement to output something to the assembler file to switch to section + NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or + NULL_TREE. Some target formats do not support arbitrary sections. Do not + define this macro in such cases. */ + +#define ASM_OUTPUT_SECTION_NAME(F, DECL, NAME, RELOC) \ +do { \ + extern FILE *asm_out_text_file; \ + if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \ + fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \ + else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \ + fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \ + else \ + fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \ +} while (0) diff --git a/gcc/config/mips/elf64.h b/gcc/config/mips/elf64.h index d38dcb34e53..1841150ef3f 100644 --- a/gcc/config/mips/elf64.h +++ b/gcc/config/mips/elf64.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. MIPS R4000 version with GOFAST floating point library. - Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of GNU CC. @@ -39,6 +39,10 @@ Boston, MA 02111-1307, USA. */ #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG #endif +/* US Software GOFAST library support. */ +#include "gofast.h" +#define INIT_SUBTARGET_OPTABS INIT_GOFAST_OPTABS + #include "mips/mips.h" #undef CPP_PREDEFINES @@ -53,10 +57,6 @@ Boston, MA 02111-1307, USA. */ /* Use memcpy, et. al., rather than bcopy. */ #define TARGET_MEM_FUNCTIONS -/* US Software GOFAST library support. */ -#include "gofast.h" -#define INIT_TARGET_OPTABS INIT_GOFAST_OPTABS - /* Biggest alignment supported by the object file format of this machine. Use this macro to limit the alignment which can be specified using the `__attribute__ ((aligned (N)))' construct. If diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 44ac3b943d6..645f79ec2d5 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -4053,3 +4053,14 @@ while (0) true. */ #define DONT_ACCESS_GBLS_AFTER_EPILOGUE (TARGET_ABICALLS && mips_abi != ABI_32) + +#ifndef INIT_SUBTARGET_OPTABS +#define INIT_SUBTARGET_OPTABS +#endif + +#define INIT_TARGET_OPTABS \ +do \ + { \ + INIT_SUBTARGET_OPTABS; \ + } \ +while (0) -- 2.30.2