OSDN Git Service

* config/alpha/alpha.md (sibcall_osf_1): Load destination
[pf3gnuchains/gcc-fork.git] / gcc / config / alpha / elf.h
1 /* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF.
2    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
3    Free Software Foundation, Inc.
4    Contributed by Richard Henderson (rth@tamu.edu).
5
6 This file is part of GNU CC.
7
8 GNU CC 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 2, or (at your option)
11 any later version.
12
13 GNU CC 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 GNU CC; see the file COPYING.  If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.    */
22
23 #undef OBJECT_FORMAT_COFF
24 #undef EXTENDED_COFF
25 #define OBJECT_FORMAT_ELF
26
27 #define DBX_DEBUGGING_INFO
28 #define DWARF2_DEBUGGING_INFO
29
30 #undef  PREFERRED_DEBUGGING_TYPE
31 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
32
33 #undef ASM_FINAL_SPEC
34
35 #undef  CC1_SPEC
36 #define CC1_SPEC  "%{G*}"
37
38 #undef  ASM_SPEC
39 #define ASM_SPEC  "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}"
40
41 #undef  LINK_SPEC
42 #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax}          \
43   %{O*:-O3} %{!O*:-O1}                                          \
44   %{shared:-shared}                                             \
45   %{!shared:                                                    \
46     %{!static:                                                  \
47       %{rdynamic:-export-dynamic}                               \
48       %{!dynamic-linker:-dynamic-linker %(elf_dynamic_linker)}} \
49     %{static:-static}}"
50
51 /* Output at beginning of assembler file.  */
52 #undef  ASM_FILE_START
53 #define ASM_FILE_START(FILE)                                    \
54 do {                                                            \
55   if (write_symbols == DBX_DEBUG)                               \
56     {                                                           \
57       alpha_write_verstamp (FILE);                              \
58       output_file_directive (FILE, main_input_filename);        \
59     }                                                           \
60   fprintf (FILE, "\t.set noat\n");                              \
61   fprintf (FILE, "\t.set noreorder\n");                         \
62   if (TARGET_EXPLICIT_RELOCS)                                   \
63     fprintf (FILE, "\t.set nomacro\n");                         \
64   if (TARGET_BWX | TARGET_MAX | TARGET_FIX | TARGET_CIX)        \
65     {                                                           \
66       fprintf (FILE, "\t.arch %s\n",                            \
67                (TARGET_CPU_EV6 ? "ev6"                          \
68                 : TARGET_MAX ? "pca56" : "ev56"));              \
69     }                                                           \
70 } while (0)
71
72 #undef  IDENT_ASM_OP
73 #define IDENT_ASM_OP "\t.ident\t"
74
75 /* Allow #sccs in preprocessor.  */
76 #define SCCS_DIRECTIVE
77
78 /* Output #ident as a .ident.  */
79 #undef  ASM_OUTPUT_IDENT
80 #define ASM_OUTPUT_IDENT(FILE, NAME) \
81   fprintf (FILE, "%s\"%s\"\n", IDENT_ASM_OP, NAME);
82
83 /* This is how to allocate empty space in some section.  The .zero
84    pseudo-op is used for this on most svr4 assemblers.  */
85
86 #undef  SKIP_ASM_OP
87 #define SKIP_ASM_OP     "\t.zero\t"
88
89 #undef  ASM_OUTPUT_SKIP
90 #define ASM_OUTPUT_SKIP(FILE, SIZE) \
91   fprintf (FILE, "%s%u\n", SKIP_ASM_OP, (SIZE))
92
93 /* Output the label which precedes a jumptable.  Note that for all svr4
94    systems where we actually generate jumptables (which is to say every
95    svr4 target except i386, where we use casesi instead) we put the jump-
96    tables into the .rodata section and since other stuff could have been
97    put into the .rodata section prior to any given jumptable, we have to
98    make sure that the location counter for the .rodata section gets pro-
99    perly re-aligned prior to the actual beginning of the jump table.  */
100
101 #undef  ALIGN_ASM_OP
102 #define ALIGN_ASM_OP "\t.align\t"
103
104 #ifndef ASM_OUTPUT_BEFORE_CASE_LABEL
105 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \
106   ASM_OUTPUT_ALIGN ((FILE), 2);
107 #endif
108
109 #undef  ASM_OUTPUT_CASE_LABEL
110 #define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, JUMPTABLE)             \
111   do {                                                                  \
112     ASM_OUTPUT_BEFORE_CASE_LABEL (FILE, PREFIX, NUM, JUMPTABLE)         \
113     ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM);                      \
114   } while (0)
115
116 /* The standard SVR4 assembler seems to require that certain builtin
117    library routines (e.g. .udiv) be explicitly declared as .globl
118    in each assembly file where they are referenced.  */
119
120 #undef  ASM_OUTPUT_EXTERNAL_LIBCALL
121 #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)                          \
122   ASM_GLOBALIZE_LABEL (FILE, XSTR (FUN, 0))
123
124 /* This says how to output assembler code to declare an
125    uninitialized external linkage data object.  Under SVR4,
126    the linker seems to want the alignment of data objects
127    to depend on their types.  We do exactly that here.  */
128
129 #undef  COMMON_ASM_OP
130 #define COMMON_ASM_OP   "\t.comm\t"
131
132 #undef  ASM_OUTPUT_ALIGNED_COMMON
133 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)              \
134 do {                                                                    \
135   fprintf ((FILE), "%s", COMMON_ASM_OP);                                \
136   assemble_name ((FILE), (NAME));                                       \
137   fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);        \
138 } while (0)
139
140 /* This says how to output assembler code to declare an
141    uninitialized internal linkage data object.  Under SVR4,
142    the linker seems to want the alignment of data objects
143    to depend on their types.  We do exactly that here.  */
144
145 #undef  ASM_OUTPUT_ALIGNED_LOCAL
146 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)               \
147 do {                                                                    \
148   if ((SIZE) <= g_switch_value)                                         \
149     sbss_section();                                                     \
150   else                                                                  \
151     bss_section();                                                      \
152   fprintf (FILE, "%s", TYPE_ASM_OP);                                    \
153   assemble_name (FILE, NAME);                                           \
154   putc (',', FILE);                                                     \
155   fprintf (FILE, TYPE_OPERAND_FMT, "object");                           \
156   putc ('\n', FILE);                                                    \
157   if (!flag_inhibit_size_directive)                                     \
158     {                                                                   \
159       fprintf (FILE, "%s", SIZE_ASM_OP);                                \
160       assemble_name (FILE, NAME);                                       \
161       fprintf (FILE, ",%d\n", (SIZE));                                  \
162     }                                                                   \
163   ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT));       \
164   ASM_OUTPUT_LABEL(FILE, NAME);                                         \
165   ASM_OUTPUT_SKIP((FILE), (SIZE));                                      \
166 } while (0)
167
168 /* This is the pseudo-op used to generate a 64-bit word of data with a
169    specific value in some section.  */
170
171 #undef  INT_ASM_OP
172 #define INT_ASM_OP              "\t.quad\t"
173
174 /* Biggest alignment supported by the object file format of this
175    machine.  Use this macro to limit the alignment which can be
176    specified using the `__attribute__ ((aligned (N)))' construct.  If
177    not defined, the default value is `BIGGEST_ALIGNMENT'. 
178
179    This value is really 2^63.  Since gcc figures the alignment in bits,
180    we could only potentially get to 2^60 on suitible hosts.  Due to other
181    considerations in varasm, we must restrict this to what fits in an int.  */
182
183 #undef  MAX_OFILE_ALIGNMENT
184 #define MAX_OFILE_ALIGNMENT \
185   (1 << (HOST_BITS_PER_INT < 64 ? HOST_BITS_PER_INT - 2 : 62))
186
187 /* This is the pseudo-op used to generate a contiguous sequence of byte
188    values from a double-quoted string WITHOUT HAVING A TERMINATING NUL
189    AUTOMATICALLY APPENDED.  This is the same for most svr4 assemblers.  */
190
191 #undef  ASCII_DATA_ASM_OP
192 #define ASCII_DATA_ASM_OP       "\t.ascii\t"
193
194 /* Support const sections and the ctors and dtors sections for g++.
195    Note that there appears to be two different ways to support const
196    sections at the moment.  You can either #define the symbol
197    READONLY_DATA_SECTION (giving it some code which switches to the
198    readonly data section) or else you can #define the symbols
199    EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and
200    SELECT_RTX_SECTION.  We do both here just to be on the safe side.  */
201
202 #undef USE_CONST_SECTION
203 #define USE_CONST_SECTION       1
204
205 #undef  CONST_SECTION_ASM_OP
206 #define CONST_SECTION_ASM_OP    "\t.section\t.rodata"
207
208 #undef  BSS_SECTION_ASM_OP
209 #define BSS_SECTION_ASM_OP      "\t.section\t.bss"
210 #undef  SBSS_SECTION_ASM_OP
211 #define SBSS_SECTION_ASM_OP     "\t.section\t.sbss,\"aw\""
212 #undef  SDATA_SECTION_ASM_OP
213 #define SDATA_SECTION_ASM_OP    "\t.section\t.sdata,\"aw\""
214
215 /* On svr4, we *do* have support for the .init and .fini sections, and we
216    can put stuff in there to be executed before and after `main'.  We let
217    crtstuff.c and other files know this by defining the following symbols.
218    The definitions say how to change sections to the .init and .fini
219    sections.  This is the same for all known svr4 assemblers.  */
220
221 #undef  INIT_SECTION_ASM_OP
222 #define INIT_SECTION_ASM_OP     "\t.section\t.init"
223 #undef  FINI_SECTION_ASM_OP
224 #define FINI_SECTION_ASM_OP     "\t.section\t.fini"
225
226 #ifdef HAVE_GAS_SUBSECTION_ORDERING
227
228 #define ASM_SECTION_START_OP    "\t.subsection\t-1"
229
230 /* Output assembly directive to move to the beginning of current section.  */
231 #define ASM_OUTPUT_SECTION_START(FILE)  \
232   fprintf ((FILE), "%s\n", ASM_SECTION_START_OP)
233
234 #endif
235
236 /* A default list of other sections which we might be "in" at any given
237    time.  For targets that use additional sections (e.g. .tdesc) you
238    should override this definition in the target-specific file which
239    includes this file.  */
240
241 #undef  EXTRA_SECTIONS
242 #define EXTRA_SECTIONS in_const, in_sbss, in_sdata
243
244 /* A default list of extra section function definitions.  For targets
245    that use additional sections (e.g. .tdesc) you should override this
246    definition in the target-specific file which includes this file.  */
247
248 #undef  EXTRA_SECTION_FUNCTIONS
249 #define EXTRA_SECTION_FUNCTIONS                                         \
250   CONST_SECTION_FUNCTION                                                \
251   SECTION_FUNCTION_TEMPLATE(sbss_section, in_sbss, SBSS_SECTION_ASM_OP) \
252   SECTION_FUNCTION_TEMPLATE(sdata_section, in_sdata, SDATA_SECTION_ASM_OP)
253
254 extern void sbss_section                PARAMS ((void));
255 extern void sdata_section               PARAMS ((void));
256
257 #undef  READONLY_DATA_SECTION
258 #define READONLY_DATA_SECTION() const_section ()
259
260 #undef  CONST_SECTION_FUNCTION
261 #define CONST_SECTION_FUNCTION                                  \
262 void                                                            \
263 const_section ()                                                \
264 {                                                               \
265   if (!USE_CONST_SECTION)                                       \
266     text_section();                                             \
267   else if (in_section != in_const)                              \
268     {                                                           \
269       fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP);     \
270       in_section = in_const;                                    \
271     }                                                           \
272 }
273
274 #undef  SECTION_FUNCTION_TEMPLATE
275 #define SECTION_FUNCTION_TEMPLATE(FN, ENUM, OP) \
276 void FN ()                                      \
277 {                                               \
278   if (in_section != ENUM)                       \
279     {                                           \
280       fprintf (asm_out_file, "%s\n", OP);       \
281       in_section = ENUM;                        \
282     }                                           \
283 }
284
285 /* Switch into a generic section.  */
286 #define TARGET_ASM_NAMED_SECTION  default_elf_asm_named_section
287
288 /* A C statement or statements to switch to the appropriate
289    section for output of DECL.  DECL is either a `VAR_DECL' node
290    or a constant of some sort.  RELOC indicates whether forming
291    the initial value of DECL requires link-time relocations.
292
293    Set SECNUM to:
294         0       .text
295         1       .rodata
296         2       .data
297         3       .sdata
298         4       .bss
299         5       .sbss
300 */
301
302 #define DO_SELECT_SECTION(SECNUM, DECL, RELOC)                  \
303   do                                                            \
304      {                                                          \
305        HOST_WIDE_INT size;                                      \
306        SECNUM = 1;                                              \
307        if (TREE_CODE (DECL) == FUNCTION_DECL)                   \
308          {                                                      \
309            SECNUM = 0;                                          \
310            break;                                               \
311          }                                                      \
312        else if (TREE_CODE (DECL) == STRING_CST)                 \
313          {                                                      \
314            if (flag_writable_strings)                           \
315              SECNUM = 2;                                        \
316            else                                                 \
317              SECNUM = 0x101;                                    \
318            break;                                               \
319          }                                                      \
320        else if (TREE_CODE (DECL) == VAR_DECL)                   \
321          {                                                      \
322            if (DECL_INITIAL (DECL) == NULL                      \
323                || DECL_INITIAL (DECL) == error_mark_node)       \
324              SECNUM = 4;                                        \
325            else if ((flag_pic && RELOC)                         \
326                     || ! TREE_READONLY (DECL)                   \
327                     || TREE_SIDE_EFFECTS (DECL)                 \
328                     || ! TREE_CONSTANT (DECL_INITIAL (DECL)))   \
329              SECNUM = 2;                                        \
330           else if (flag_merge_constants >= 2)                   \
331             {                                                   \
332               /* C and C++ don't allow different variables to   \
333                  share the same location.  -fmerge-all-constants\
334                  allows even that (at the expense of not        \
335                  conforming).  */                               \
336               if (TREE_CODE (DECL_INITIAL (DECL)) == STRING_CST)\
337                 SECNUM = 0x201;                                 \
338               else                                              \
339                 SECNUM = 0x301;                                 \
340             }                                                   \
341          }                                                      \
342        else if (TREE_CODE (DECL) == CONSTRUCTOR)                \
343          {                                                      \
344            if ((flag_pic && RELOC)                              \
345                || ! TREE_READONLY (DECL)                        \
346                || TREE_SIDE_EFFECTS (DECL)                      \
347                || ! TREE_CONSTANT (DECL))                       \
348              SECNUM = 2;                                        \
349          }                                                      \
350                                                                 \
351        /* Select small data sections based on size.  */         \
352        size = int_size_in_bytes (TREE_TYPE (DECL));             \
353        if (size >= 0 && size <= g_switch_value)                 \
354          {                                                      \
355            if ((SECNUM & 0xff) >= 2)                            \
356              SECNUM += 1;                                       \
357            /* Move readonly data to .sdata only if -msmall-data.  */ \
358            /* ??? Consider .sdata.{lit4,lit8} as                \
359               SHF_MERGE|SHF_ALPHA_GPREL.  */                    \
360            else if (TARGET_SMALL_DATA)                          \
361              SECNUM = 3;                                        \
362          }                                                      \
363      }                                                          \
364    while (0)
365
366 #undef  SELECT_SECTION
367 #define SELECT_SECTION(DECL, RELOC, ALIGN)              \
368   do                                                    \
369     {                                                   \
370       typedef void (*sec_fn) PARAMS ((void));           \
371       static sec_fn const sec_functions[6] =            \
372       {                                                 \
373         text_section,                                   \
374         const_section,                                  \
375         data_section,                                   \
376         sdata_section,                                  \
377         bss_section,                                    \
378         sbss_section                                    \
379       };                                                \
380                                                         \
381       int sec;                                          \
382                                                         \
383       DO_SELECT_SECTION (sec, DECL, RELOC);             \
384                                                         \
385       switch (sec)                                      \
386         {                                               \
387         case 0x101:                                     \
388           mergeable_string_section (DECL, ALIGN, 0);    \
389           break;                                        \
390         case 0x201:                                     \
391           mergeable_string_section (DECL_INITIAL (DECL),\
392                                     ALIGN, 0);          \
393           break;                                        \
394         case 0x301:                                     \
395           mergeable_constant_section (DECL_MODE (DECL), \
396                                       ALIGN, 0);        \
397           break;                                        \
398         default:                                        \
399           (*sec_functions[sec]) ();                     \
400           break;                                        \
401         }                                               \
402     }                                                   \
403   while (0)
404
405 #define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
406
407 #undef  UNIQUE_SECTION
408 #define UNIQUE_SECTION(DECL, RELOC)                                     \
409   do                                                                    \
410     {                                                                   \
411       static const char * const prefixes[6][2] =                        \
412       {                                                                 \
413         { ".text.",   ".gnu.linkonce.t." },                             \
414         { ".rodata.", ".gnu.linkonce.r." },                             \
415         { ".data.",   ".gnu.linkonce.d." },                             \
416         { ".sdata.",  ".gnu.linkonce.s." },                             \
417         { ".bss.",    ".gnu.linkonce.b." },                             \
418         { ".sbss.",   ".gnu.linkonce.sb." }                             \
419       };                                                                \
420                                                                         \
421       int nlen, plen, sec;                                              \
422       const char *name, *prefix;                                        \
423       char *string;                                                     \
424                                                                         \
425       DO_SELECT_SECTION (sec, DECL, RELOC);                             \
426                                                                         \
427       name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL));           \
428       STRIP_NAME_ENCODING (name, name);                                 \
429       nlen = strlen (name);                                             \
430                                                                         \
431       prefix = prefixes[sec & 0xff][DECL_ONE_ONLY(DECL)];               \
432       plen = strlen (prefix);                                           \
433                                                                         \
434       string = alloca (nlen + plen + 1);                                \
435                                                                         \
436       memcpy (string, prefix, plen);                                    \
437       memcpy (string + plen, name, nlen + 1);                           \
438                                                                         \
439       DECL_SECTION_NAME (DECL) = build_string (nlen + plen, string);    \
440     }                                                                   \
441   while (0)
442
443 /* A C statement or statements to switch to the appropriate
444    section for output of RTX in mode MODE.  RTX is some kind
445    of constant in RTL.  The argument MODE is redundant except
446    in the case of a `const_int' rtx.  Currently, these always
447    go into the const section.  */
448
449 #undef  SELECT_RTX_SECTION
450 #define SELECT_RTX_SECTION(MODE, RTX, ALIGN)                            \
451 do {                                                                    \
452   if (TARGET_SMALL_DATA && GET_MODE_SIZE (MODE) <= g_switch_value)      \
453      /* ??? Consider .sdata.{lit4,lit8} as SHF_MERGE|SHF_ALPHA_GPREL.  */ \
454     sdata_section ();                                                   \
455   else                                                                  \
456     mergeable_constant_section((MODE), (ALIGN), 0);                     \
457 } while (0)
458
459 /* Define the strings used for the special svr4 .type and .size directives.
460    These strings generally do not vary from one system running svr4 to
461    another, but if a given system (e.g. m88k running svr) needs to use
462    different pseudo-op names for these, they may be overridden in the
463    file which includes this one.  */
464
465 #undef  TYPE_ASM_OP
466 #define TYPE_ASM_OP     "\t.type\t"
467 #undef  SIZE_ASM_OP
468 #define SIZE_ASM_OP     "\t.size\t"
469
470 /* This is how we tell the assembler that a symbol is weak.  */
471
472 #undef  ASM_WEAKEN_LABEL
473 #define ASM_WEAKEN_LABEL(FILE, NAME) \
474   do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
475        fputc ('\n', FILE); } while (0)
476
477 /* This is how we tell the assembler that two symbols have the same value.  */
478
479 #undef  ASM_OUTPUT_DEF
480 #define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \
481   do { assemble_name(FILE, NAME1);       \
482        fputs(" = ", FILE);               \
483        assemble_name(FILE, NAME2);       \
484        fputc('\n', FILE); } while (0)
485
486 /* The following macro defines the format used to output the second
487    operand of the .type assembler directive.  Different svr4 assemblers
488    expect various different forms for this operand.  The one given here
489    is just a default.  You may need to override it in your machine-
490    specific tm.h file (depending upon the particulars of your assembler).  */
491
492 #undef  TYPE_OPERAND_FMT
493 #define TYPE_OPERAND_FMT        "@%s"
494
495 /* Write the extra assembler code needed to declare a function's result.
496    Most svr4 assemblers don't require any special declaration of the
497    result value, but there are exceptions.  */
498
499 #ifndef ASM_DECLARE_RESULT
500 #define ASM_DECLARE_RESULT(FILE, RESULT)
501 #endif
502
503 /* These macros generate the special .type and .size directives which
504    are used to set the corresponding fields of the linker symbol table
505    entries in an ELF object file under SVR4.  These macros also output
506    the starting labels for the relevant functions/objects.  */
507
508 /* Write the extra assembler code needed to declare an object properly.  */
509
510 #undef  ASM_DECLARE_OBJECT_NAME
511 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL)               \
512   do {                                                          \
513     HOST_WIDE_INT size;                                         \
514     fprintf (FILE, "%s", TYPE_ASM_OP);                          \
515     assemble_name (FILE, NAME);                                 \
516     putc (',', FILE);                                           \
517     fprintf (FILE, TYPE_OPERAND_FMT, "object");                 \
518     putc ('\n', FILE);                                          \
519     size_directive_output = 0;                                  \
520     if (!flag_inhibit_size_directive                            \
521         && DECL_SIZE (DECL)                                     \
522         && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0)   \
523       {                                                         \
524         size_directive_output = 1;                              \
525         fprintf (FILE, "%s", SIZE_ASM_OP);                      \
526         assemble_name (FILE, NAME);                             \
527         fputc (',', FILE);                                      \
528         fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size);          \
529         fputc ('\n', FILE);                                     \
530       }                                                         \
531     ASM_OUTPUT_LABEL(FILE, NAME);                               \
532   } while (0)
533
534 /* Output the size directive for a decl in rest_of_decl_compilation
535    in the case where we did not do so before the initializer.
536    Once we find the error_mark_node, we know that the value of
537    size_directive_output was set
538    by ASM_DECLARE_OBJECT_NAME when it was run for the same decl.  */
539
540 #undef  ASM_FINISH_DECLARE_OBJECT
541 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END)        \
542   do {                                                                  \
543     const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0);             \
544     HOST_WIDE_INT size;                                                 \
545     if (!flag_inhibit_size_directive                                    \
546         && DECL_SIZE (DECL)                                             \
547         && ! AT_END && TOP_LEVEL                                        \
548         && DECL_INITIAL (DECL) == error_mark_node                       \
549         && !size_directive_output                                       \
550         && (size = int_size_in_bytes (TREE_TYPE (DECL))) > 0)           \
551       {                                                                 \
552         size_directive_output = 1;                                      \
553         fprintf (FILE, "%s", SIZE_ASM_OP);                              \
554         assemble_name (FILE, name);                                     \
555         fputc (',', FILE);                                              \
556         fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, size);                  \
557         fputc ('\n', FILE);                                             \
558       }                                                                 \
559   } while (0)
560
561 /* A table of bytes codes used by the ASM_OUTPUT_ASCII and
562    ASM_OUTPUT_LIMITED_STRING macros.  Each byte in the table
563    corresponds to a particular byte value [0..255].  For any
564    given byte value, if the value in the corresponding table
565    position is zero, the given character can be output directly.
566    If the table value is 1, the byte must be output as a \ooo
567    octal escape.  If the tables value is anything else, then the
568    byte value should be output as a \ followed by the value
569    in the table.  Note that we can use standard UN*X escape
570    sequences for many control characters, but we don't use
571    \a to represent BEL because some svr4 assemblers (e.g. on
572    the i386) don't know about that.  Also, we don't use \v
573    since some versions of gas, such as 2.2 did not accept it.  */
574
575 #undef  ESCAPES
576 #define ESCAPES \
577 "\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
578 \0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
579 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\
580 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\
581 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
582 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
583 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
584 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"
585
586 /* Some svr4 assemblers have a limit on the number of characters which
587    can appear in the operand of a .string directive.  If your assembler
588    has such a limitation, you should define STRING_LIMIT to reflect that
589    limit.  Note that at least some svr4 assemblers have a limit on the
590    actual number of bytes in the double-quoted string, and that they
591    count each character in an escape sequence as one byte.  Thus, an
592    escape sequence like \377 would count as four bytes.
593
594    If your target assembler doesn't support the .string directive, you
595    should define this to zero.  */
596
597 #undef  STRING_LIMIT
598 #define STRING_LIMIT    ((unsigned) 256)
599 #undef  STRING_ASM_OP
600 #define STRING_ASM_OP   "\t.string\t"
601
602 /* GAS is the only Alpha/ELF assembler.  */
603 #undef  TARGET_GAS
604 #define TARGET_GAS      (1)
605
606 /* Provide a STARTFILE_SPEC appropriate for ELF.  Here we add the
607    (even more) magical crtbegin.o file which provides part of the
608    support for getting C++ file-scope static object constructed
609    before entering `main'. 
610
611    Don't bother seeing crtstuff.c -- there is absolutely no hope
612    of getting that file to understand multiple GPs.  We provide a
613    hand-coded assembly version.  */
614    
615 #undef  STARTFILE_SPEC
616 #define STARTFILE_SPEC \
617   "%{!shared: \
618      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
619    crti.o%s %{shared:crtbeginS.o%s}%{!shared:crtbegin.o%s}"
620
621 /* Provide a ENDFILE_SPEC appropriate for ELF.  Here we tack on the
622    magical crtend.o file which provides part of the support for
623    getting C++ file-scope static object constructed before entering
624    `main', followed by a normal ELF "finalizer" file, `crtn.o'.  */
625
626 #undef  ENDFILE_SPEC
627 #define ENDFILE_SPEC \
628   "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
629    %{shared:crtendS.o%s}%{!shared:crtend.o%s} crtn.o%s"
630
631 /* We support #pragma.  */
632 #define HANDLE_SYSV_PRAGMA
633
634 /* Undo the auto-alignment stuff from alpha.h.  ELF has unaligned data
635    pseudos natively.  */
636 #undef UNALIGNED_SHORT_ASM_OP
637 #undef UNALIGNED_INT_ASM_OP
638 #undef UNALIGNED_DOUBLE_INT_ASM_OP
639
640 /* Select a format to encode pointers in exception handling data.  CODE
641    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
642    true if the symbol may be affected by dynamic relocations.
643
644    Since application size is already constrained to <2GB by the form of
645    the ldgp relocation, we can use a 32-bit pc-relative relocation to
646    static data.  Dynamic data is accessed indirectly to allow for read
647    only EH sections.  */
648 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL)       \
649   (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4)
650
651 /* If defined, a C statement to be executed just prior to the output of
652    assembler code for INSN.  */
653 #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)      \
654  (alpha_this_literal_sequence_number = 0,               \
655   alpha_this_gpdisp_sequence_number = 0)
656 extern int alpha_this_literal_sequence_number;
657 extern int alpha_this_gpdisp_sequence_number;