OSDN Git Service

* configure.in: Allow enable_threads_flag value of "aix". Define
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / aix.h
1 /* Definitions of target machine for GNU compiler,
2    for IBM RS/6000 POWER running AIX.
3    Copyright (C) 2000 Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 /* Yes!  We are AIX!  */
23 #define DEFAULT_ABI ABI_AIX
24 #define TARGET_OBJECT_FORMAT OBJECT_XCOFF
25
26 /* The RS/6000 uses the XCOFF format.  */
27
28 #define XCOFF_DEBUGGING_INFO
29
30 /* Define if the object format being used is COFF or a superset.  */
31 #define OBJECT_FORMAT_COFF
32
33 /* Define the magic numbers that we recognize as COFF.
34  
35     AIX 4.3 adds U803XTOCMAGIC (0757) for 64-bit objects, but collect2.c
36     does not include files in the correct order to conditionally define
37     the symbolic name in this macro.
38  
39     The AIX linker accepts import/export files as object files,
40     so accept "#!" (0x2321) magic number.  */
41 #define MY_ISCOFF(magic) \
42   ((magic) == U802WRMAGIC || (magic) == U802ROMAGIC \
43    || (magic) == U802TOCMAGIC || (magic) == 0757 || (magic) == 0x2321)
44
45 /* This is the only version of nm that collect2 can work with.  */
46 #define REAL_NM_FILE_NAME "/usr/ucb/nm"
47
48 /* We don't have GAS for the RS/6000 yet, so don't write out special
49     .stabs in cc1plus.  */
50
51 #define FASCIST_ASSEMBLER
52
53 /* AIX does not have any init/fini or ctor/dtor sections, so create
54     static constructors and destructors as normal functions.  */
55 /* #define ASM_OUTPUT_CONSTRUCTOR(file, name) */
56 /* #define ASM_OUTPUT_DESTRUCTOR(file, name) */
57
58 /* The prefix to add to user-visible assembler symbols. */
59 #define USER_LABEL_PREFIX "."
60
61 /* Don't turn -B into -L if the argument specifies a relative file name.  */
62 #define RELATIVE_PREFIX_NOT_LINKDIR
63
64 /* Names to predefine in the preprocessor for this target machine.  */
65
66 #define CPP_PREDEFINES "-D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_LONG_LONG \
67 -Asystem(unix) -Asystem(aix) -Acpu(rs6000) -Amachine(rs6000)"
68
69 /* Define appropriate architecture macros for preprocessor depending on
70    target switches.  */
71
72 #define CPP_SPEC "%{posix: -D_POSIX_SOURCE}\
73    %{ansi: -D_ANSI_C_SOURCE}\
74    %(cpp_cpu)"
75
76 /* Tell the assembler to assume that all undefined names are external.
77
78    Don't do this until the fixed IBM assembler is more generally available.
79    When this becomes permanently defined, the ASM_OUTPUT_EXTERNAL,
80    ASM_OUTPUT_EXTERNAL_LIBCALL, and RS6000_OUTPUT_BASENAME macros will no
81    longer be needed.  Also, the extern declaration of mcount in ASM_FILE_START
82    will no longer be needed.  */
83
84 /* #define ASM_SPEC "-u %(asm_cpu)" */
85
86 /* Default location of syscalls.exp under AIX */
87 #ifndef CROSS_COMPILE
88 #define LINK_SYSCALLS_SPEC "-bI:/lib/syscalls.exp"
89 #else
90 #define LINK_SYSCALLS_SPEC ""
91 #endif
92
93 /* Default location of libg.exp under AIX */
94 #ifndef CROSS_COMPILE
95 #define LINK_LIBG_SPEC "-bexport:/usr/lib/libg.exp"
96 #else
97 #define LINK_LIBG_SPEC ""
98 #endif
99
100 /* Define the options for the binder: Start text at 512, align all segments
101    to 512 bytes, and warn if there is text relocation.
102
103    The -bhalt:4 option supposedly changes the level at which ld will abort,
104    but it also suppresses warnings about multiply defined symbols and is
105    used by the AIX cc command.  So we use it here.
106
107    -bnodelcsect undoes a poor choice of default relating to multiply-defined
108    csects.  See AIX documentation for more information about this.
109
110    -bM:SRE tells the linker that the output file is Shared REusable.  Note
111    that to actually build a shared library you will also need to specify an
112    export list with the -Wl,-bE option.  */
113
114 #define LINK_SPEC "-T512 -H512 %{!r:-btextro} -bhalt:4 -bnodelcsect\
115 %{static:-bnso %(link_syscalls) } \
116 %{!shared:%{g*: %(link_libg) }} %{shared:-bM:SRE}"
117
118 /* Profiled library versions are used by linking with special directories.  */
119 #define LIB_SPEC "%{pg:-L/lib/profiled -L/usr/lib/profiled}\
120 %{p:-L/lib/profiled -L/usr/lib/profiled} %{!shared:%{g*:-lg}} -lc"
121
122 /* Define the extra sections we need.  We define three: one is the read-only
123    data section which is used for constants.  This is a csect whose name is
124    derived from the name of the input file.  The second is for initialized
125    global variables.  This is a csect whose name is that of the variable.
126    The third is the TOC.  */
127
128 #define EXTRA_SECTIONS \
129    read_only_data, private_data, read_only_private_data, toc, bss
130
131 /* Define the routines to implement these extra sections.
132    BIGGEST_ALIGNMENT is 64, so align the sections that much.  */
133
134 #define EXTRA_SECTION_FUNCTIONS                         \
135                                                         \
136 void                                                    \
137 read_only_data_section ()                               \
138 {                                                       \
139   if (in_section != read_only_data)                     \
140     {                                                   \
141       fprintf (asm_out_file, "\t.csect %s[RO],3\n",     \
142                xcoff_read_only_section_name);           \
143       in_section = read_only_data;                      \
144     }                                                   \
145 }                                                       \
146                                                         \
147 void                                                    \
148 private_data_section ()                                 \
149 {                                                       \
150   if (in_section != private_data)                       \
151     {                                                   \
152       fprintf (asm_out_file, "\t.csect %s[RW],3\n",     \
153                xcoff_private_data_section_name);        \
154       in_section = private_data;                        \
155     }                                                   \
156 }                                                       \
157                                                         \
158 void                                                    \
159 read_only_private_data_section ()                       \
160 {                                                       \
161   if (in_section != read_only_private_data)             \
162     {                                                   \
163       fprintf (asm_out_file, "\t.csect %s[RO],3\n",     \
164                xcoff_private_data_section_name);        \
165       in_section = read_only_private_data;              \
166     }                                                   \
167 }                                                       \
168                                                         \
169 void                                                    \
170 toc_section ()                                          \
171 {                                                       \
172   if (TARGET_MINIMAL_TOC)                               \
173     {                                                   \
174       /* toc_section is always called at least once from ASM_FILE_START, \
175          so this is guaranteed to always be defined once and only once   \
176          in each file.  */                                               \
177       if (! toc_initialized)                            \
178         {                                               \
179           fputs ("\t.toc\nLCTOC..1:\n", asm_out_file);  \
180           fputs ("\t.tc toc_table[TC],toc_table[RW]\n", asm_out_file); \
181           toc_initialized = 1;                          \
182         }                                               \
183                                                         \
184       if (in_section != toc)                            \
185         fprintf (asm_out_file, "\t.csect toc_table[RW]%s\n",    \
186                  (TARGET_32BIT ? "" : ",3"));           \
187     }                                                   \
188   else                                                  \
189     {                                                   \
190       if (in_section != toc)                            \
191         fputs ("\t.toc\n", asm_out_file);               \
192     }                                                   \
193   in_section = toc;                                     \
194 }
195
196 /* Define the name of our readonly data section.  */
197
198 #define READONLY_DATA_SECTION read_only_data_section
199
200 /* Select the section for an initialized data object.
201
202    On the RS/6000, we have a special section for all variables except those
203    that are static.  */
204
205 #define SELECT_SECTION(EXP,RELOC)                       \
206 {                                                       \
207   if ((TREE_CODE (EXP) == STRING_CST                    \
208        && ! flag_writable_strings)                      \
209       || (TREE_CODE_CLASS (TREE_CODE (EXP)) == 'd'      \
210           && TREE_READONLY (EXP) && ! TREE_THIS_VOLATILE (EXP) \
211           && DECL_INITIAL (EXP)                         \
212           && (DECL_INITIAL (EXP) == error_mark_node     \
213               || TREE_CONSTANT (DECL_INITIAL (EXP)))    \
214           && ! (RELOC)))                                \
215     {                                                   \
216       if (TREE_PUBLIC (EXP))                            \
217         read_only_data_section ();                      \
218       else                                              \
219         read_only_private_data_section ();              \
220     }                                                   \
221   else                                                  \
222     {                                                   \
223       if (TREE_PUBLIC (EXP))                            \
224         data_section ();                                \
225       else                                              \
226         private_data_section ();                        \
227     }                                                   \
228 }
229
230 /* Select section for constant in constant pool.
231
232    On RS/6000, all constants are in the private read-only data area.
233    However, if this is being placed in the TOC it must be output as a
234    toc entry.  */
235
236 #define SELECT_RTX_SECTION(MODE, X)                     \
237 { if (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (X, MODE))        \
238     toc_section ();                                     \
239   else                                                  \
240     read_only_private_data_section ();                  \
241 }
242
243 /* Indicate that jump tables go in the text section.  */
244
245 #define JUMP_TABLES_IN_TEXT_SECTION 1
246
247 /* Enable AIX XL compiler calling convention breakage compatibility.  */
248 #undef TARGET_XL_CALL
249 #define MASK_XL_CALL            0x40000000
250 #define TARGET_XL_CALL          (target_flags & MASK_XL_CALL)
251 #undef  SUBTARGET_SWITCHES
252 #define SUBTARGET_SWITCHES              \
253   {"xl-call",           MASK_XL_CALL,                                   \
254    N_("Always pass floating-point arguments in memory") },              \
255   {"no-xl-call",        - MASK_XL_CALL,                                 \
256    N_("Don't always pass floating-point arguments in memory") },        \
257   SUBSUBTARGET_SWITCHES
258 #define SUBSUBTARGET_SWITCHES 
259
260 /* Define any extra SPECS that the compiler needs to generate.  */
261 #undef  SUBTARGET_EXTRA_SPECS
262 #define SUBTARGET_EXTRA_SPECS                                           \
263   { "link_syscalls",            LINK_SYSCALLS_SPEC },                   \
264   { "link_libg",                LINK_LIBG_SPEC }
265
266 /* FP save and restore routines.  */
267 #define SAVE_FP_PREFIX "._savef"
268 #define SAVE_FP_SUFFIX ""
269 #define RESTORE_FP_PREFIX "._restf"
270 #define RESTORE_FP_SUFFIX ""
271
272 /* Define cutoff for using external functions to save floating point.  */
273 #define FP_SAVE_INLINE(FIRST_REG) ((FIRST_REG) == 62 || (FIRST_REG) == 63)
274
275 /* Function name to call to do profiling.  */
276 #define RS6000_MCOUNT ".__mcount"
277
278 /* Function names to call to do floating point truncation.  */
279
280 #define RS6000_ITRUNC "__itrunc"
281 #define RS6000_UITRUNC "__uitrunc"
282
283 /* Optabs entries for the int->float routines, using the standard
284    AIX names.  */
285 #define INIT_TARGET_OPTABS                                              \
286   do {                                                                  \
287     if (! TARGET_POWER2 && ! TARGET_POWERPC && TARGET_HARD_FLOAT)       \
288       {                                                                 \
289         fixdfsi_libfunc = init_one_libfunc (RS6000_ITRUNC);             \
290         fixunsdfsi_libfunc = init_one_libfunc (RS6000_UITRUNC);         \
291       }                                                                 \
292   } while (0)
293
294 /* AIX always has a TOC.  */
295 #define TARGET_NO_TOC           0
296 #define TARGET_TOC              1
297
298 /* AIX allows r13 to be used.  */
299 #define FIXED_R13 0
300
301 /* This outputs NAME to FILE up to the first null or '['.  */
302
303 #define RS6000_OUTPUT_BASENAME(FILE, NAME)      \
304   {                                             \
305     const char *_p;                             \
306                                                 \
307     STRIP_NAME_ENCODING (_p, (NAME));           \
308     assemble_name ((FILE), _p);                 \
309   }
310
311 /* This is how to output the definition of a user-level label named NAME,
312    such as the label on a static function or variable NAME.  */
313
314 #define ASM_OUTPUT_LABEL(FILE,NAME)     \
315   do { RS6000_OUTPUT_BASENAME (FILE, NAME); fputs (":\n", FILE); } while (0)
316
317 /* This is how to output a command to make the user-level label named NAME
318    defined for reference from other files.  */
319
320 #define ASM_GLOBALIZE_LABEL(FILE,NAME)  \
321   do { fputs ("\t.globl ", FILE);       \
322        RS6000_OUTPUT_BASENAME (FILE, NAME); putc ('\n', FILE);} while (0)
323
324 /* Remove any trailing [DS] or the like from the symbol name.  */
325
326 #define STRIP_NAME_ENCODING(VAR,NAME)                   \
327   do                                                    \
328     {                                                   \
329       const char *_name = (NAME);                       \
330       size_t _len;                                      \
331       if (*_name == '*')                                \
332         _name++;                                        \
333       _len = strlen (_name);                            \
334       if (_name[_len - 1] != ']')                       \
335         (VAR) = _name;                                  \
336       else                                              \
337         {                                               \
338           char *_new_name = (char *) alloca (_len + 1); \
339           strcpy (_new_name, _name);                    \
340           _new_name[_len - 4] = '\0';                   \
341           (VAR) = _new_name;                            \
342         }                                               \
343     }                                                   \
344   while (0)
345
346 /* Output at beginning of assembler file.
347
348    Initialize the section names for the RS/6000 at this point.
349
350    Specify filename, including full path, to assembler.
351
352    We want to go into the TOC section so at least one .toc will be emitted.
353    Also, in order to output proper .bs/.es pairs, we need at least one static
354    [RW] section emitted.
355
356    We then switch back to text to force the gcc2_compiled. label and the space
357    allocated after it (when profiling) into the text section.
358
359    Finally, declare mcount when profiling to make the assembler happy.  */
360
361 #define ASM_FILE_START(FILE)                                    \
362 {                                                               \
363   rs6000_gen_section_name (&xcoff_bss_section_name,             \
364                            main_input_filename, ".bss_");       \
365   rs6000_gen_section_name (&xcoff_private_data_section_name,    \
366                            main_input_filename, ".rw_");        \
367   rs6000_gen_section_name (&xcoff_read_only_section_name,       \
368                            main_input_filename, ".ro_");        \
369                                                                 \
370   fprintf (FILE, "\t.file\t\"%s\"\n", main_input_filename);     \
371   if (TARGET_64BIT)                                             \
372     fputs ("\t.machine\t\"ppc64\"\n", FILE);                    \
373   toc_section ();                                               \
374   if (write_symbols != NO_DEBUG)                                \
375     private_data_section ();                                    \
376   text_section ();                                              \
377   if (profile_flag)                                             \
378     fprintf (FILE, "\t.extern %s\n", RS6000_MCOUNT);            \
379   rs6000_file_start (FILE, TARGET_CPU_DEFAULT);                 \
380 }
381
382 /* Output at end of assembler file.
383
384    On the RS/6000, referencing data should automatically pull in text.  */
385
386 #define ASM_FILE_END(FILE)                                      \
387 {                                                               \
388   text_section ();                                              \
389   fputs ("_section_.text:\n", FILE);                            \
390   data_section ();                                              \
391   fputs (TARGET_32BIT                                           \
392          ? "\t.long _section_.text\n" : "\t.llong _section_.text\n", FILE); \
393 }
394
395 /* This macro produces the initial definition of a function name.
396    On the RS/6000, we need to place an extra '.' in the function name and
397    output the function descriptor.
398
399    The csect for the function will have already been created by the
400    `text_section' call previously done.  We do have to go back to that
401    csect, however.
402
403    The third and fourth parameters to the .function pseudo-op (16 and 044)
404    are placeholders which no longer have any use.  */
405
406 #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL)               \
407 { if (TREE_PUBLIC (DECL))                                       \
408     {                                                           \
409       fputs ("\t.globl .", FILE);                               \
410       RS6000_OUTPUT_BASENAME (FILE, NAME);                      \
411       putc ('\n', FILE);                                        \
412     }                                                           \
413   else                                                          \
414     {                                                           \
415       fputs ("\t.lglobl .", FILE);                              \
416       RS6000_OUTPUT_BASENAME (FILE, NAME);                      \
417       putc ('\n', FILE);                                        \
418     }                                                           \
419   fputs ("\t.csect ", FILE);                                    \
420   RS6000_OUTPUT_BASENAME (FILE, NAME);                          \
421   fputs (TARGET_32BIT ? "[DS]\n" : "[DS],3\n", FILE);           \
422   RS6000_OUTPUT_BASENAME (FILE, NAME);                          \
423   fputs (":\n", FILE);                                          \
424   fputs (TARGET_32BIT ? "\t.long ." : "\t.llong .", FILE);      \
425   RS6000_OUTPUT_BASENAME (FILE, NAME);                          \
426   fputs (", TOC[tc0], 0\n", FILE);                              \
427   in_section = no_section;                                      \
428   function_section(DECL);                                       \
429   putc ('.', FILE);                                             \
430   RS6000_OUTPUT_BASENAME (FILE, NAME);                          \
431   fputs (":\n", FILE);                                          \
432   if (write_symbols == XCOFF_DEBUG)                             \
433     xcoffout_declare_function (FILE, DECL, NAME);               \
434 }
435
436 /* This is how to output a reference to a user-level label named NAME.
437    `assemble_name' uses this.  */
438
439 #define ASM_OUTPUT_LABELREF(FILE,NAME)  \
440   fputs (NAME, FILE)
441
442 /* This says how to output an external.  */
443
444 #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME)   \
445 { rtx _symref = XEXP (DECL_RTL (DECL), 0);      \
446   if ((TREE_CODE (DECL) == VAR_DECL             \
447        || TREE_CODE (DECL) == FUNCTION_DECL)    \
448       && (NAME)[strlen (NAME) - 1] != ']')      \
449     {                                           \
450       char *_name = (char *) permalloc (strlen (XSTR (_symref, 0)) + 5); \
451       strcpy (_name, XSTR (_symref, 0));        \
452       strcat (_name, TREE_CODE (DECL) == FUNCTION_DECL ? "[DS]" : "[RW]"); \
453       XSTR (_symref, 0) = _name;                \
454     }                                           \
455 }
456
457 /* This is how to output an internal numbered label where
458    PREFIX is the class of label and NUM is the number within the class.  */
459
460 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)      \
461   fprintf (FILE, "%s..%d:\n", PREFIX, NUM)
462
463 /* This is how to output an internal label prefix.  rs6000.c uses this
464    when generating traceback tables.  */
465
466 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX)   \
467   fprintf (FILE, "%s..", PREFIX)
468
469 /* This is how to output a label for a jump table.  Arguments are the same as
470    for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is
471    passed. */
472
473 #define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN)        \
474 { ASM_OUTPUT_ALIGN (FILE, 2); ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); }
475
476 /* This is how to store into the string LABEL
477    the symbol_ref name of an internal numbered label where
478    PREFIX is the class of label and NUM is the number within the class.
479    This is suitable for output with `assemble_name'.  */
480
481 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)   \
482   sprintf (LABEL, "*%s..%ld", (PREFIX), (long)(NUM))
483
484 /* This is how to output an assembler line to define N characters starting
485    at P to FILE.  */
486
487 #define ASM_OUTPUT_ASCII(FILE, P, N)  output_ascii ((FILE), (P), (N))
488
489 /* This is how to advance the location counter by SIZE bytes.  */
490
491 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
492   fprintf (FILE, "\t.space %d\n", (SIZE))
493
494 /* This says how to output an assembler line
495    to define a global common symbol.  */
496
497 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGNMENT)  \
498   do { fputs (".comm ", (FILE));                        \
499        RS6000_OUTPUT_BASENAME ((FILE), (NAME));         \
500        if ( (SIZE) > 4)                                 \
501          fprintf ((FILE), ",%d,3\n", (SIZE));           \
502        else                                             \
503          fprintf( (FILE), ",%d\n", (SIZE));             \
504   } while (0)
505
506 /* These are various definitions for DWARF output.  They could just
507    use '.long' or '.word', but that aligns to a 4-byte boundary which
508    is not what is required.  So we define a million macros...  */
509
510 #define ASM_OUTPUT_DWARF_ADDR_VAR(FILE, LABEL, LENGTH)  \
511  do {   fprintf ((FILE), "\t.vbyte\t%d,", LENGTH);      \
512         assemble_name (FILE, LABEL);                    \
513   } while (0)
514
515 #define ASM_OUTPUT_DWARF_DELTA_VAR(FILE, LABEL1, LABEL2, LENGTH)        \
516  do {   fprintf ((FILE), "\t.vbyte\t%d,", LENGTH);                      \
517         assemble_name (FILE, LABEL1);                                   \
518         fprintf (FILE, "-");                                            \
519         assemble_name (FILE, LABEL2);                                   \
520   } while (0)
521
522 #define ASM_OUTPUT_DWARF_DELTA2(FILE, LABEL1, LABEL2)   \
523  ASM_OUTPUT_DWARF_DELTA_VAR (FILE, LABEL1, LABEL2, 2)
524
525 #define ASM_OUTPUT_DWARF_DELTA4(FILE, LABEL1, LABEL2)   \
526  ASM_OUTPUT_DWARF_DELTA_VAR (FILE, LABEL1, LABEL2, 4)
527
528 #define ASM_OUTPUT_DWARF_DELTA(FILE, LABEL1, LABEL2)                    \
529  ASM_OUTPUT_DWARF_DELTA_VAR (FILE, LABEL1, LABEL2, DWARF_OFFSET_SIZE)
530
531 #define ASM_OUTPUT_DWARF_ADDR_DELTA(FILE, LABEL1, LABEL2)       \
532  ASM_OUTPUT_DWARF_DELTA_VAR (FILE, LABEL1, LABEL2,              \
533                              POINTER_SIZE / BITS_PER_UNIT)
534
535 #define ASM_OUTPUT_DWARF_ADDR(FILE, LABEL)                              \
536  ASM_OUTPUT_DWARF_ADDR_VAR (FILE, LABEL, POINTER_SIZE / BITS_PER_UNIT)
537
538 #define ASM_OUTPUT_DWARF_DATA4(FILE, VALUE)                     \
539   fprintf ((FILE), "\t.vbyte\t4,0x%x", (unsigned) (VALUE))
540
541 #define ASM_OUTPUT_DWARF_DATA2(FILE, VALUE)                     \
542   fprintf ((FILE), "\t.vbyte\t2,0x%x", (unsigned) (VALUE))
543
544 #define ASM_OUTPUT_DWARF_OFFSET4(FILE, LABEL)   \
545   ASM_OUTPUT_DWARF_ADDR_VAR (FILE, LABEL, 4)
546
547 #define ASM_OUTPUT_DWARF_OFFSET(FILE, LABEL)                    \
548   ASM_OUTPUT_DWARF_ADDR_VAR (FILE, LABEL, DWARF_OFFSET_SIZE)
549
550 /* dwarf2out keys off this, but we don't have to have a real definition.  */
551 #define UNALIGNED_INT_ASM_OP bite_me
552
553 /* Output before instructions.  */
554 #define TEXT_SECTION_ASM_OP "\t.csect .text[PR]"
555
556 /* Output before writable data.
557    Align entire section to BIGGEST_ALIGNMENT.  */
558 #define DATA_SECTION_ASM_OP "\t.csect .data[RW],3"
559
560 /* Define unique section name -- functions only.  */
561 #define UNIQUE_SECTION(DECL,RELOC)                      \
562   do {                                                  \
563     int len;                                            \
564     const char *name;                                   \
565     char *string;                                       \
566                                                         \
567     if (TREE_CODE (DECL) == FUNCTION_DECL) {            \
568       name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
569       len = strlen (name) + 5;                          \
570       string = alloca (len) + 1;                        \
571       sprintf (string, ".%s[PR]", name);                \
572       DECL_SECTION_NAME (DECL) = build_string (len, string); \
573     }                                                   \
574   } while (0)
575
576 #define ASM_OUTPUT_SECTION_NAME(ASM_OUT_FILE,DECL,NAME,RELOC)   \
577   do { fputs ("\t.csect ", ASM_OUT_FILE);                       \
578        fputs (TREE_STRING_POINTER (DECL_SECTION_NAME (DECL)), ASM_OUT_FILE); \
579        putc ('\n', ASM_OUT_FILE);                               \
580   } while (0)
581
582 /* __throw will restore its own return address to be the same as the
583    return address of the function that the throw is being made to.
584    This is unfortunate, because we want to check the original
585    return address to see if we need to restore the TOC.
586    So we have to squirrel it away with this.  */
587 #define SETUP_FRAME_ADDRESSES() rs6000_aix_emit_builtin_unwind_init ()
588