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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [sparc/] [sol2.h] - Blame information for rev 820

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

Line No. Rev Author Line
1 38 julius
/* Definitions of target machine for GCC, for SPARC running Solaris 2
2
   Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005,
3
   2006, 2007 Free Software Foundation, Inc.
4
   Contributed by Ron Guilmette (rfg@netcom.com).
5
   Additional changes by David V. Henkel-Wallace (gumby@cygnus.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
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
24
 
25
/* This is here rather than in sparc.h because it's not known what
26
   other assemblers will accept.  */
27
 
28
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9
29
#undef ASM_CPU_DEFAULT_SPEC
30
#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plus"
31
#endif
32
 
33
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
34
#undef ASM_CPU_DEFAULT_SPEC
35
#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusa"
36
#endif
37
 
38
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc3
39
#undef ASM_CPU_DEFAULT_SPEC
40
#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusb"
41
#endif
42
 
43
#if TARGET_CPU_DEFAULT == TARGET_CPU_niagara
44
#undef ASM_CPU_DEFAULT_SPEC
45
#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusb"
46
#endif
47
 
48
#undef ASM_CPU_SPEC
49
#define ASM_CPU_SPEC "\
50
%{mcpu=v9:-xarch=v8plus} \
51
%{mcpu=ultrasparc:-xarch=v8plusa} \
52
%{mcpu=ultrasparc3:-xarch=v8plusb} \
53
%{mcpu=niagara:-xarch=v8plusb} \
54
%{!mcpu*:%(asm_cpu_default)} \
55
"
56
 
57
#undef SUBTARGET_EXTRA_SPECS
58
#define SUBTARGET_EXTRA_SPECS \
59
  { "startfile_arch",   STARTFILE_ARCH_SPEC },  \
60
  { "link_arch",        LINK_ARCH_SPEC }
61
 
62
/* However it appears that Solaris 2.0 uses the same reg numbering as
63
   the old BSD-style system did.  */
64
 
65
/* The Solaris 2 assembler uses .skip, not .zero, so put this back.  */
66
#undef ASM_OUTPUT_SKIP
67
#define ASM_OUTPUT_SKIP(FILE,SIZE)  \
68
  fprintf (FILE, "\t.skip %u\n", (int)(SIZE))
69
 
70
#undef  LOCAL_LABEL_PREFIX
71
#define LOCAL_LABEL_PREFIX  "."
72
 
73
/* This is how to store into the string LABEL
74
   the symbol_ref name of an internal numbered label where
75
   PREFIX is the class of label and NUM is the number within the class.
76
   This is suitable for output with `assemble_name'.  */
77
 
78
#undef  ASM_GENERATE_INTERNAL_LABEL
79
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)   \
80
  sprintf ((LABEL), "*.L%s%lu", (PREFIX), (unsigned long)(NUM))
81
 
82
/* The native TLS-enabled assembler requires the directive #tls_object
83
   to be put on objects in TLS sections (as of v7.1).  This is not
84
   required by the GNU assembler but supported on SPARC.  */
85
#undef  ASM_DECLARE_OBJECT_NAME
86
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)               \
87
  do                                                            \
88
    {                                                           \
89
      HOST_WIDE_INT size;                                       \
90
                                                                \
91
      if (DECL_THREAD_LOCAL_P (DECL))                           \
92
        ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "tls_object");   \
93
      else                                                      \
94
        ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "object");       \
95
                                                                \
96
      size_directive_output = 0;                                \
97
      if (!flag_inhibit_size_directive                          \
98
          && (DECL) && DECL_SIZE (DECL))                        \
99
        {                                                       \
100
          size_directive_output = 1;                            \
101
          size = int_size_in_bytes (TREE_TYPE (DECL));          \
102
          ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, size);         \
103
        }                                                       \
104
                                                                \
105
      ASM_OUTPUT_LABEL (FILE, NAME);                            \
106
    }                                                           \
107
  while (0)
108
 
109
/* The Solaris assembler cannot grok .stabd directives.  */
110
#undef NO_DBX_BNSYM_ENSYM
111
#define NO_DBX_BNSYM_ENSYM 1
112
 
113
 
114
#undef  ENDFILE_SPEC
115
#define ENDFILE_SPEC \
116
  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
117
   crtend.o%s crtn.o%s"
118
 
119
/* Select a format to encode pointers in exception handling data.  CODE
120
   is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
121
   true if the symbol may be affected by dynamic relocations.
122
 
123
   Some Solaris dynamic linkers don't handle unaligned section relative
124
   relocs properly, so force them to be aligned.  */
125
#ifndef HAVE_AS_SPARC_UA_PCREL
126
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)               \
127
  ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr)
128
#endif
129
 
130
 
131
/* Define for support of TFmode long double.
132
   SPARC ABI says that long double is 4 words.  */
133
#define LONG_DOUBLE_TYPE_SIZE 128
134
 
135
/* But indicate that it isn't supported by the hardware.  */
136
#define WIDEST_HARDWARE_FP_SIZE 64
137
 
138
/* Solaris's _Qp_* library routine implementation clobbers the output
139
   memory before the inputs are fully consumed.  */
140
 
141
#undef TARGET_BUGGY_QP_LIB
142
#define TARGET_BUGGY_QP_LIB     1
143
 
144
#undef SUN_CONVERSION_LIBFUNCS
145
#define SUN_CONVERSION_LIBFUNCS 1
146
 
147
#undef DITF_CONVERSION_LIBFUNCS
148
#define DITF_CONVERSION_LIBFUNCS 1
149
 
150
#undef SUN_INTEGER_MULTIPLY_64
151
#define SUN_INTEGER_MULTIPLY_64 1
152
 
153
/* Solaris allows 64 bit out and global registers in 32 bit mode.
154
   sparc_override_options will disable V8+ if not generating V9 code.  */
155
#undef TARGET_DEFAULT
156
#define TARGET_DEFAULT (MASK_V8PLUS + MASK_APP_REGS + MASK_FPU \
157
                        + MASK_LONG_DOUBLE_128)
158
 
159
/* Solaris-specific #pragmas are implemented on top of attributes.  Hook in
160
   the bits from config/sol2.c.  */
161
#define SUBTARGET_INSERT_ATTRIBUTES solaris_insert_attributes
162
#define SUBTARGET_ATTRIBUTE_TABLE SOLARIS_ATTRIBUTE_TABLE
163
 
164
/* Output a simple call for .init/.fini.  */
165
#define ASM_OUTPUT_CALL(FILE, FN)                               \
166
  do                                                            \
167
    {                                                           \
168
      fprintf (FILE, "\tcall\t");                               \
169
      print_operand (FILE, XEXP (DECL_RTL (FN), 0), 0); \
170
      fprintf (FILE, "\n\tnop\n");                              \
171
    }                                                           \
172
  while (0)

powered by: WebSVN 2.1.0

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