OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [sparc/] [sysv4.h] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
/* Target definitions for GNU compiler for SPARC running System V.4
2
   Copyright (C) 1991, 1992, 1995, 1996, 1997, 1998, 2000, 2002, 2007, 2009,
3
   2010, 2011
4
   Free Software Foundation, Inc.
5
   Contributed by Ron Guilmette (rfg@monkeys.com).
6
 
7
This file is part of GCC.
8
 
9
GCC is free software; you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation; either version 3, or (at your option)
12
any later version.
13
 
14
GCC is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
GNU General Public License for more details.
18
 
19
You should have received a copy of the GNU General Public License
20
along with GCC; see the file COPYING3.  If not see
21
<http://www.gnu.org/licenses/>.  */
22
 
23
#undef SIZE_TYPE
24
#define SIZE_TYPE (TARGET_ARCH64 ? "long unsigned int" : "unsigned int")
25
 
26
#undef PTRDIFF_TYPE
27
#define PTRDIFF_TYPE (TARGET_ARCH64 ? "long int" : "int")
28
 
29
/* Undefined some symbols which are appropriate only for typical svr4
30
   systems, but not for the specific case of svr4 running on a
31
   SPARC.  */
32
 
33
#undef INIT_SECTION_ASM_OP
34
#undef FINI_SECTION_ASM_OP
35
#undef READONLY_DATA_SECTION_ASM_OP
36
#undef TYPE_OPERAND_FMT
37
#undef STRING_ASM_OP
38
#undef COMMON_ASM_OP
39
#undef SKIP_ASM_OP
40
#undef SET_ASM_OP       /* Has no equivalent.  See ASM_OUTPUT_DEF below.  */
41
 
42
/* Pass -K to the assembler when PIC.  */
43
#undef ASM_SPEC
44
#define ASM_SPEC \
45
  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{Ym,*} \
46
   %{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)"
47
 
48
/* Define the names of various pseudo-op used by the SPARC/svr4 assembler.
49
   Note that many of these are different from the typical pseudo-ops used
50
   by most svr4 assemblers.  That is probably due to a (misguided?) attempt
51
   to keep the SPARC/svr4 assembler somewhat compatible with the SPARC/SunOS
52
   assembler.  */
53
 
54
#define STRING_ASM_OP           "\t.asciz\t"
55
#define COMMON_ASM_OP           "\t.common\t"
56
#define SKIP_ASM_OP             "\t.skip\t"
57
 
58
/* This is the format used to print the second operand of a .type pseudo-op
59
   for the SPARC/svr4 assembler.  */
60
 
61
#define TYPE_OPERAND_FMT      "#%s"
62
 
63
#undef ASM_OUTPUT_CASE_LABEL
64
#define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE)             \
65
do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3);                \
66
     (*targetm.asm_out.internal_label) ((FILE), PREFIX, NUM);           \
67
   } while (0)
68
 
69
/* This is how to equate one symbol to another symbol.  The syntax used is
70
   `SYM1=SYM2'.  Note that this is different from the way equates are done
71
   with most svr4 assemblers, where the syntax is `.set SYM1,SYM2'.  */
72
 
73
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                              \
74
 do {   fprintf ((FILE), "\t");                                         \
75
        assemble_name (FILE, LABEL1);                                   \
76
        fprintf (FILE, " = ");                                          \
77
        assemble_name (FILE, LABEL2);                                   \
78
        fprintf (FILE, "\n");                                           \
79
  } while (0)
80
 
81
/* A set of symbol definitions for assembly pseudo-ops which will
82
   get us switched to various sections of interest.  These are used
83
   in all places where we simply want to switch to a section, and
84
   *not* to push the previous section name onto the assembler's
85
   section names stack (as we do often in dwarfout.c).  */
86
 
87
#define TEXT_SECTION_ASM_OP     "\t.section\t\".text\""
88
#define DATA_SECTION_ASM_OP     "\t.section\t\".data\""
89
#define BSS_SECTION_ASM_OP      "\t.section\t\".bss\""
90
#define READONLY_DATA_SECTION_ASM_OP "\t.section\t\".rodata\""
91
#define INIT_SECTION_ASM_OP     "\t.section\t\".init\""
92
#define FINI_SECTION_ASM_OP     "\t.section\t\".fini\""
93
 
94
/* Define the pseudo-ops used to switch to the .ctors and .dtors sections.
95
 
96
   Note that we want to give these sections the SHF_WRITE attribute
97
   because these sections will actually contain data (i.e. tables of
98
   addresses of functions in the current root executable or shared library
99
   file) and, in the case of a shared library, the relocatable addresses
100
   will have to be properly resolved/relocated (and then written into) by
101
   the dynamic linker when it actually attaches the given shared library
102
   to the executing process.  (Note that on SVR4, you may wish to use the
103
   `-z text' option to the ELF linker, when building a shared library, as
104
   an additional check that you are doing everything right.  But if you do
105
   use the `-z text' option when building a shared library, you will get
106
   errors unless the .ctors and .dtors sections are marked as writable
107
   via the SHF_WRITE attribute.)  */
108
 
109
#undef CTORS_SECTION_ASM_OP
110
#define CTORS_SECTION_ASM_OP    "\t.section\t\".ctors\",#alloc,#write"
111
#undef DTORS_SECTION_ASM_OP
112
#define DTORS_SECTION_ASM_OP    "\t.section\t\".dtors\",#alloc,#write"
113
 
114
#undef ASM_OUTPUT_ALIGNED_BSS
115
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
116
  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
117
 
118
/* Override the name of the mcount profiling function.  */
119
 
120
#undef MCOUNT_FUNCTION
121
#define MCOUNT_FUNCTION "*_mcount"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.