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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [svr3.h] - Blame information for rev 292

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

Line No. Rev Author Line
1 282 jeremybenn
/* Operating system specific defines to be used when targeting GCC for
2
   generic System V Release 3 system.
3
   Copyright (C) 1991, 1996, 2000, 2002, 2004, 2007 Free Software Foundation, Inc.
4
   Contributed by Ron Guilmette (rfg@monkeys.com).
5
 
6
This file is part of GCC.
7
 
8
GCC is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3, or (at your option)
11
any later version.
12
 
13
GCC is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with GCC; see the file COPYING3.  If not see
20
<http://www.gnu.org/licenses/>. */
21
 
22
/* Define a symbol indicating that we are using svr3.h.  */
23
#define USING_SVR3_H
24
 
25
/* Define a symbol so that libgcc* can know what sort of operating
26
   environment and assembler syntax we are targeting for.  */
27
#define SVR3_target
28
 
29
/* Assembler, linker, library, and startfile spec's.  */
30
 
31
/* The .file command should always begin the output.  */
32
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true
33
 
34
/* This says how to output an assembler line
35
   to define a global common symbol.  */
36
/* We don't use ROUNDED because the standard compiler doesn't,
37
   and the linker gives error messages if a common symbol
38
   has more than one length value.  */
39
 
40
#undef ASM_OUTPUT_COMMON
41
#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
42
( fputs (".comm ", (FILE)),                     \
43
  assemble_name ((FILE), (NAME)),               \
44
  fprintf ((FILE), ",%lu\n", (unsigned long)(SIZE)))
45
 
46
/* This says how to output an assembler line
47
   to define a local common symbol.  */
48
 
49
/* Note that using bss_section here caused errors
50
   in building shared libraries on system V.3.  */
51
#undef ASM_OUTPUT_LOCAL
52
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)     \
53
  do {                                                  \
54
    int align = exact_log2 (ROUNDED);                   \
55
    if (align > 2) align = 2;                           \
56
    switch_to_section (data_section);                   \
57
    ASM_OUTPUT_ALIGN ((FILE), align == -1 ? 2 : align); \
58
    ASM_OUTPUT_LABEL ((FILE), (NAME));                  \
59
    fprintf ((FILE), "\t.set .,.+%u\n", (int)(ROUNDED));        \
60
  } while (0)
61
 
62
/* Output #ident as a .ident.  */
63
 
64
#undef  ASM_OUTPUT_IDENT
65
#define ASM_OUTPUT_IDENT(FILE, NAME) \
66
  fprintf (FILE, "\t.ident \"%s\"\n", NAME);
67
 
68
/* Use periods rather than dollar signs in special g++ assembler names.  */
69
 
70
#define NO_DOLLAR_IN_LABEL
71
 
72
/* System V Release 3 uses COFF debugging info.  */
73
 
74
#define SDB_DEBUGGING_INFO 1
75
 
76
/* We don't want to output DBX debugging information.  */
77
 
78
#undef DBX_DEBUGGING_INFO
79
 
80
/* Define the actual types of some ANSI-mandated types.  These
81
   definitions should work for most SVR3 systems.  */
82
 
83
#undef SIZE_TYPE
84
#define SIZE_TYPE "unsigned int"
85
 
86
#undef PTRDIFF_TYPE
87
#define PTRDIFF_TYPE "int"
88
 
89
#undef WCHAR_TYPE
90
#define WCHAR_TYPE "long int"
91
 
92
#undef WCHAR_TYPE_SIZE
93
#define WCHAR_TYPE_SIZE BITS_PER_WORD
94
 
95
/* The prefix to add to user-visible assembler symbols.
96
 
97
   For System V Release 3 the convention is to prepend a leading
98
   underscore onto user-level symbol names.  */
99
 
100
#undef USER_LABEL_PREFIX
101
#define USER_LABEL_PREFIX "_"
102
 
103
/* This is how to store into the string LABEL
104
   the symbol_ref name of an internal numbered label where
105
   PREFIX is the class of label and NUM is the number within the class.
106
   This is suitable for output with `assemble_name'.
107
 
108
   For most svr3 systems, the convention is that any symbol which begins
109
   with a period is not put into the linker symbol table by the assembler.  */
110
 
111
#undef ASM_GENERATE_INTERNAL_LABEL
112
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)   \
113
  sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM))
114
 
115
/* We want local labels to start with period if made with asm_fprintf.  */
116
#undef LOCAL_LABEL_PREFIX
117
#define LOCAL_LABEL_PREFIX "."
118
 
119
/* Support const sections and the ctors and dtors sections for g++.  */
120
 
121
/* Define a few machine-specific details of the implementation of
122
   constructors.
123
 
124
   The __CTORS_LIST__ goes in the .init section.  Define CTOR_LIST_BEGIN
125
   and CTOR_LIST_END to contribute to the .init section an instruction to
126
   push a word containing 0 (or some equivalent of that).
127
 
128
   Define TARGET_ASM_CONSTRUCTOR to push the address of the constructor.  */
129
 
130
#define INIT_SECTION_ASM_OP     "\t.section\t.init"
131
#define FINI_SECTION_ASM_OP     "\t.section .fini,\"x\""
132
#define DTORS_SECTION_ASM_OP    FINI_SECTION_ASM_OP
133
 
134
/* CTOR_LIST_BEGIN and CTOR_LIST_END are machine-dependent
135
   because they push on the stack.  */
136
 
137
#ifndef STACK_GROWS_DOWNWARD
138
 
139
/* Constructor list on stack is in reverse order.  Go to the end of the
140
   list and go backwards to call constructors in the right order.  */
141
#define DO_GLOBAL_CTORS_BODY                                    \
142
do {                                                            \
143
  func_ptr *p, *beg = alloca (0);                                \
144
  for (p = beg; *p; p++)                                        \
145
    ;                                                           \
146
  while (p != beg)                                              \
147
    (*--p) ();                                                  \
148
} while (0)
149
 
150
#else
151
 
152
/* Constructor list on stack is in correct order.  Just call them.  */
153
#define DO_GLOBAL_CTORS_BODY                                    \
154
do {                                                            \
155
  func_ptr *p, *beg = alloca (0);                                \
156
  for (p = beg; *p; )                                           \
157
    (*p++) ();                                                  \
158
} while (0)
159
 
160
#endif /* STACK_GROWS_DOWNWARD */

powered by: WebSVN 2.1.0

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