summaryrefslogtreecommitdiffstats
path: root/gcc/config/sh/coff.h
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-28 22:26:43 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-28 22:26:43 +0000
commit87ab0a3d713e40a9ee70b9b5a4a6b9855fdd4c6e (patch)
tree95441ed67a475ab09040e20e78a2917ba238f8fa /gcc/config/sh/coff.h
parentcb0e348a93c341f5d4542a7005e2847388b1f788 (diff)
downloadppe42-gcc-87ab0a3d713e40a9ee70b9b5a4a6b9855fdd4c6e.tar.gz
ppe42-gcc-87ab0a3d713e40a9ee70b9b5a4a6b9855fdd4c6e.zip
config/sh reorganization to factor out endianness and coff:
* config/sh/little.h: New file. * config/sh/sh.h (TARGET_ENDIAN_DEFAULT): If not already defined, define to 0 to select big-endian. (SUBTARGET_ASM_ENDIAN_SPEC): Define according to TARGET_ENDIAN_DEFAULT. (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. * config/sh/sh64.h (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. * config/sh/t-be: New file. * config/sh/t-le: New file. * sh.h (SDB_DEBUGGING_INFO, #include "dbxcoff.h"): Moved to sh/coff.h. (SDB_DELIM, MAX_OFILE_ALIGNMENT, IDENT_ASM_OP): Likewise. (TARGET_ASM_NAMED_SECTION, ASM_OUTPUT_SKIP): Likewise. (USER_LABEL_PREFIX, LOCAL_LABEL_PREFIX): Likewise. (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL): Likewise. (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise. (ASM_FILE_END, ASM_DECLARE_FUNCTION_NAME): Deleted. (CPP_SPEC, SUBTARGET_CPP_ENDIAN_SPEC): Likewise. (SUBTARGET_CPP_SPEC, CPP_DEFAULT_CPU_SPEC, CPP_PREDEFINES): Likewise. (EXTRA_SPECS): Remove SUBTARGET_CPP_ENDIAN_SPEC and CPP_DEFAULT_CPU_SPEC. Add LINK_EMUL_PREFIX, LINK_DEFAULT_CPU_EMUL, SUBTARGET_LINK_EMUL_SUFFIX and SUBTARGET_LINK_SPEC. (LINK_SPEC): Define to SH_LINK_SPEC. (TARGET_CPU_CPP_BUILTINS, SH_LINK_SPEC): Define. (LINK_EMUL_PREFIX, LINK_DEFAULT_CPU_EMUL): Likewise. (SUBTARGET_LINK_EMUL_SUFFIX, SUBTARGET_LINK_SPEC): Likewise. (CPP_SPEC): Reduce to %(subtarget_cpp_spec). (TARGET_ENDIAN_DEFAULT): Define if not already defined. * config/sh/coff.h: New file. (TARGET_ASM_NAMED_SECTION): Now default_coff_asm_named_section (TARGET_OBJFMT_CPP_BUILTINS): Define. * config/sh/elf.h (IDENT_ASM_OP): No need to #undef at the start. (ASM_FILE_END, ASM_OUTPUT_SOURCE_LINE): Likewise. (DBX_OUTPUT_MAIN_SOURCE_FILE_END, TARGET_ASM_NAMED_SECTION): Likewise. (ASM_DECLARE_FUNCTION_NAME, MAX_OFILE_ALIGNMENT, SIZE_TYPE): Likewise. (PTRDIFF_TYPE): Likewise. ("dbxelf.h", "elfos.h", "svr4.h"): Don't #include. (CPP_PREDEFINES): Don't define. (TARGET_OBJFMT_CPP_BUILTINS): Define. (LINK_SPEC): Define to SH_LINK_SPEC. (LINK_EMUL_PREFIX): Redefine. * config/sh/linux.h: (SUBTARGET_CPP_SPEC): Remove -fpic / -fPIC cases. (SUBTARGET_CPP_ENDIAN_SPEC, CPP_DEFAULT_CPU_SPEC): Remove redefinition. (CPP_PREDEFINES, SUBTARGET_ASM_ENDIAN_SPEC): Likewise. (CC1_SPEC, CC1PLUS_SPEC, LINK_SPEC): Likewise. (TARGET_OS_CPP_BUILTINS): Define. (TARGET_DEFAULT): Redefine. (SUBTARGET_LINK_EMUL_SUFFIX, SUBTARGET_LINK_SPEC): Likewise. * config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Remove. (LINK_SPEC): Don't redefine. (LINK_DEFAULT_CPU_EMUL): Redefine. (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT. * sh.c (sh_asm_named_section): Don't declare / define. * t-linux (MULTILIB_OPTIONS): Rely on pre-set endianness option. * config.gcc (sh-*-elf* tm_file): Add dbxelf.h elfos.h svr4.h. (sh64-*-elf* tm_file): Likewise. (sh-*-rtemself* tm_file): Likewise. (sh-*-linux* tm_file): Likewise. Add sh/little.h. (sh-*-linux* tmake_file): Add sh/t-le. (sh-*-rtems* tm_file): Add sh/coff.h (sh-*-* tm_file): Likewise. * sh.h (LEGITIMATE_PIC_OPERAND_P): Check for SYMBOL_REF before using CONSTANT_POOL_ADDRESS_P. * coff.h (HAS_INIT_SECTION, INVOKE__MAIN): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53974 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sh/coff.h')
-rw-r--r--gcc/config/sh/coff.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/gcc/config/sh/coff.h b/gcc/config/sh/coff.h
new file mode 100644
index 00000000000..67826b11350
--- /dev/null
+++ b/gcc/config/sh/coff.h
@@ -0,0 +1,88 @@
+/* Definitions of target machine for gcc for Hitachi / SuperH SH using ELF.
+ Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+ Contributed by Jörn Rennecke <joern.rennecke@superh.com>.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+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. */
+
+/* Generate SDB debugging information. */
+
+#define SDB_DEBUGGING_INFO
+
+/* Output DBX (stabs) debugging information if doing -gstabs. */
+
+#include "dbxcoff.h"
+
+#define SDB_DELIM ";"
+
+#ifndef MAX_OFILE_ALIGNMENT
+#define MAX_OFILE_ALIGNMENT 128
+#endif
+
+#define IDENT_ASM_OP "\t.ident\t"
+
+/* Switch into a generic section. */
+#define TARGET_ASM_NAMED_SECTION default_coff_asm_named_section
+
+/* The prefix to add to user-visible assembler symbols. */
+
+#define USER_LABEL_PREFIX "_"
+
+/* The prefix to add to an internally generated label. */
+
+#define LOCAL_LABEL_PREFIX ""
+
+/* Make an internal label into a string. */
+#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
+ sprintf ((STRING), "*%s%s%ld", LOCAL_LABEL_PREFIX, (PREFIX), (long)(NUM))
+
+/* Output an internal label definition. */
+#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
+ asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
+
+/* This is how to output an assembler line
+ that says to advance the location counter by SIZE bytes. */
+
+#define ASM_OUTPUT_SKIP(FILE,SIZE) \
+ fprintf ((FILE), "\t.space %d\n", (SIZE))
+
+/* This says how to output an assembler line
+ to define a global common symbol. */
+
+#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
+( fputs ("\t.comm ", (FILE)), \
+ assemble_name ((FILE), (NAME)), \
+ fprintf ((FILE), ",%d\n", (SIZE)))
+
+/* This says how to output an assembler line
+ to define a local common symbol. */
+
+#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
+( fputs ("\t.lcomm ", (FILE)), \
+ assemble_name ((FILE), (NAME)), \
+ fprintf ((FILE), ",%d\n", (SIZE)))
+
+#define TARGET_OBJFMT_CPP_BUILTINS()
+
+/* ??? The so-called ASM_OUTPUT_SECTION_NAME cleanup from August 3rd 2001
+ broke sh-coff, and was still neither reversed not fixed eight month after
+ this has been pointed out. */
+/* Tell the braindead logic in defaults.h / libgcc2.c not to
+ refer to __EH_FRAME_BEGIN__, since we don't use crtstuff.c */
+#define HAS_INIT_SECTION
+/* And tell function.c that we don't actually have an init section. */
+#define INVOKE__MAIN
OpenPOWER on IntegriCloud