00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef GCC_OUTPUT_H
00024 #define GCC_OUTPUT_H
00025
00026
00027 extern void init_final (const char *);
00028
00029
00030
00031 extern void app_enable (void);
00032
00033
00034
00035 extern void app_disable (void);
00036
00037
00038
00039
00040 extern int dbr_sequence_length (void);
00041
00042
00043 extern void init_insn_lengths (void);
00044
00045
00046
00047 extern int get_attr_length (rtx);
00048
00049
00050
00051 extern int get_attr_min_length (rtx);
00052
00053
00054
00055 extern void shorten_branches (rtx);
00056
00057
00058
00059
00060
00061
00062 extern void final_start_function (rtx, FILE *, int);
00063
00064
00065
00066
00067 extern void final_end_function (void);
00068
00069
00070 extern void final (rtx, FILE *, int);
00071
00072
00073
00074
00075 extern rtx final_scan_insn (rtx, FILE *, int, int, int *);
00076
00077
00078
00079 extern rtx alter_subreg (rtx *);
00080
00081
00082
00083 extern void output_operand_lossage (const char *, ...) ATTRIBUTE_PRINTF_1;
00084
00085
00086
00087 extern void output_asm_insn (const char *, rtx *);
00088
00089
00090
00091
00092 extern int insn_current_reference_address (rtx);
00093
00094
00095
00096 extern int label_to_alignment (rtx);
00097
00098
00099 extern void output_asm_label (rtx);
00100
00101
00102
00103 extern void output_address (rtx);
00104
00105
00106
00107
00108 extern void output_addr_const (FILE *, rtx);
00109
00110
00111
00112 #if GCC_VERSION >= 3004
00113 #define ATTRIBUTE_ASM_FPRINTF(m, n) __attribute__ ((__format__ (__asm_fprintf__, m, n))) ATTRIBUTE_NONNULL(m)
00114
00115
00116
00117 typedef HOST_WIDE_INT __gcc_host_wide_int__;
00118 #else
00119 #define ATTRIBUTE_ASM_FPRINTF(m, n) ATTRIBUTE_NONNULL(m)
00120 #endif
00121
00122 extern void asm_fprintf (FILE *file, const char *p, ...)
00123 ATTRIBUTE_ASM_FPRINTF(2, 3);
00124
00125
00126
00127 extern void split_double (rtx, rtx *, rtx *);
00128
00129
00130 extern int leaf_function_p (void);
00131
00132
00133
00134
00135 extern int final_forward_branch_p (rtx);
00136
00137
00138
00139 extern int only_leaf_regs_used (void);
00140
00141
00142
00143 extern void leaf_renumber_regs_insn (rtx);
00144
00145
00146 extern const char *get_insn_template (int, rtx);
00147
00148
00149 extern int regno_clobbered_at_setjmp (int);
00150
00151
00152
00153
00154 extern void declare_weak (tree);
00155
00156 extern void merge_weak (tree, tree);
00157
00158
00159 extern void weak_finish (void);
00160
00161
00162
00163
00164
00165
00166
00167
00168 extern int decode_reg_name (const char *);
00169
00170 extern void assemble_alias (tree, tree);
00171
00172 extern void default_assemble_visibility (tree, int);
00173
00174
00175
00176 extern void assemble_asm (tree);
00177
00178
00179
00180
00181
00182 extern void assemble_start_function (tree, const char *);
00183
00184
00185
00186 extern void assemble_end_function (tree, const char *);
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197 extern void assemble_variable (tree, int, int, int);
00198
00199
00200
00201 extern void align_variable (tree decl, bool dont_output_data);
00202
00203
00204
00205
00206 extern void assemble_external (tree);
00207
00208
00209 extern void assemble_zeros (unsigned HOST_WIDE_INT);
00210
00211
00212 extern void assemble_align (int);
00213
00214
00215 extern void assemble_string (const char *, int);
00216
00217
00218 extern void assemble_external_libcall (rtx);
00219
00220
00221 extern void assemble_label (const char *);
00222
00223
00224
00225
00226
00227 extern void assemble_name_raw (FILE *, const char *);
00228
00229
00230
00231
00232
00233 extern void assemble_name (FILE *, const char *);
00234
00235
00236
00237
00238
00239
00240
00241
00242 extern const char *integer_asm_op (int, int);
00243
00244
00245
00246 extern void assemble_integer_with_op (const char *, rtx);
00247
00248
00249 extern bool default_assemble_integer (rtx, unsigned int, int);
00250
00251
00252
00253
00254
00255 extern bool assemble_integer (rtx, unsigned, unsigned, int);
00256
00257
00258
00259
00260 #define assemble_aligned_integer(SIZE, VALUE) \
00261 assemble_integer (VALUE, SIZE, (SIZE) * BITS_PER_UNIT, 1)
00262
00263 #ifdef REAL_VALUE_TYPE_SIZE
00264
00265 extern void assemble_real (REAL_VALUE_TYPE, enum machine_mode, unsigned);
00266 #endif
00267
00268
00269 extern int get_pool_size (void);
00270
00271 #ifdef HAVE_peephole
00272 extern rtx peephole (rtx);
00273 #endif
00274
00275 extern void output_shared_constant_pool (void);
00276
00277 extern void output_object_blocks (void);
00278
00279
00280
00281
00282
00283
00284 extern bool constructor_static_from_elts_p (tree);
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295 extern tree initializer_constant_valid_p (tree, tree);
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305 extern void output_constant (tree, unsigned HOST_WIDE_INT, unsigned int);
00306
00307
00308
00309
00310
00311
00312
00313 extern rtx final_sequence;
00314
00315
00316
00317
00318 #ifdef SDB_DEBUGGING_INFO
00319 extern int sdb_begin_function_line;
00320 #endif
00321
00322
00323
00324 #ifdef BUFSIZ
00325 extern FILE *asm_out_file;
00326 #endif
00327
00328
00329 extern const char *first_global_object_name;
00330
00331
00332 extern const char *weak_global_object_name;
00333
00334
00335
00336
00337
00338
00339 extern int current_function_is_leaf;
00340
00341
00342
00343
00344
00345 extern int current_function_sp_is_unchanging;
00346
00347
00348
00349
00350
00351 extern int current_function_uses_only_leaf_regs;
00352
00353
00354
00355 #ifdef BUFSIZ
00356 extern FILE *dump_file;
00357 #endif
00358
00359
00360 extern rtx current_insn_predicate;
00361
00362
00363 extern rtx current_output_insn;
00364
00365
00366
00367
00368 extern rtx this_is_asm_operands;
00369
00370
00371
00372 extern int size_directive_output;
00373 extern tree last_assemble_variable_decl;
00374
00375 extern bool first_function_block_is_cold;
00376
00377
00378
00379 extern bool decl_readonly_section (tree, int);
00380
00381
00382
00383 extern int compute_reloc_for_constant (tree);
00384
00385
00386 extern const char *user_label_prefix;
00387
00388
00389 extern void default_function_pro_epilogue (FILE *, HOST_WIDE_INT);
00390
00391
00392 extern void no_asm_to_stream (FILE *);
00393
00394
00395 #define SECTION_ENTSIZE 0x000ff
00396 #define SECTION_CODE 0x00100
00397 #define SECTION_WRITE 0x00200
00398 #define SECTION_DEBUG 0x00400
00399 #define SECTION_LINKONCE 0x00800
00400 #define SECTION_SMALL 0x01000
00401 #define SECTION_BSS 0x02000
00402 #define SECTION_FORGET 0x04000
00403 #define SECTION_MERGE 0x08000
00404 #define SECTION_STRINGS 0x10000
00405
00406 #define SECTION_OVERRIDE 0x20000
00407 #define SECTION_TLS 0x40000
00408 #define SECTION_NOTYPE 0x80000
00409 #define SECTION_DECLARED 0x100000
00410 #define SECTION_STYLE_MASK 0x600000
00411 #define SECTION_COMMON 0x800000
00412 #define SECTION_MACH_DEP 0x1000000
00413
00414
00415
00416 #define SECTION_UNNAMED 0x000000
00417
00418
00419
00420 #define SECTION_NAMED 0x200000
00421
00422
00423
00424
00425 #define SECTION_NOSWITCH 0x400000
00426
00427
00428
00429
00430 enum section_category
00431 {
00432 SECCAT_TEXT,
00433
00434 SECCAT_RODATA,
00435 SECCAT_RODATA_MERGE_STR,
00436 SECCAT_RODATA_MERGE_STR_INIT,
00437 SECCAT_RODATA_MERGE_CONST,
00438 SECCAT_SRODATA,
00439
00440 SECCAT_DATA,
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451 SECCAT_DATA_REL,
00452 SECCAT_DATA_REL_LOCAL,
00453 SECCAT_DATA_REL_RO,
00454 SECCAT_DATA_REL_RO_LOCAL,
00455
00456 SECCAT_SDATA,
00457 SECCAT_TDATA,
00458
00459 SECCAT_BSS,
00460 SECCAT_SBSS,
00461 SECCAT_TBSS
00462 };
00463
00464
00465 struct section_common GTY(()) {
00466
00467 unsigned int flags;
00468 };
00469
00470
00471 struct named_section GTY(()) {
00472 struct section_common common;
00473
00474
00475 const char *name;
00476
00477
00478
00479 tree decl;
00480 };
00481
00482
00483
00484 typedef void (*unnamed_section_callback) (const void *);
00485
00486
00487 struct unnamed_section GTY(()) {
00488 struct section_common common;
00489
00490
00491
00492 unnamed_section_callback GTY ((skip)) callback;
00493 const void *GTY ((skip)) data;
00494
00495
00496 section *next;
00497 };
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508 typedef bool (*noswitch_section_callback) (tree decl, const char *name,
00509 unsigned HOST_WIDE_INT size,
00510 unsigned HOST_WIDE_INT rounded);
00511
00512
00513 struct noswitch_section GTY(()) {
00514 struct section_common common;
00515
00516
00517 noswitch_section_callback GTY ((skip)) callback;
00518 };
00519
00520
00521 union section GTY ((desc ("SECTION_STYLE (&(%h))")))
00522 {
00523 struct section_common GTY ((skip)) common;
00524 struct named_section GTY ((tag ("SECTION_NAMED"))) named;
00525 struct unnamed_section GTY ((tag ("SECTION_UNNAMED"))) unnamed;
00526 struct noswitch_section GTY ((tag ("SECTION_NOSWITCH"))) noswitch;
00527 };
00528
00529 /* Return the style of section SECT. */
00530 #define SECTION_STYLE(SECT) ((SECT)->common.flags & SECTION_STYLE_MASK)
00531
00532 struct object_block;
00533
00534 /* Special well-known sections. */
00535 extern GTY(()) section *text_section;
00536 extern GTY(()) section *data_section;
00537 extern GTY(()) section *readonly_data_section;
00538 extern GTY(()) section *sdata_section;
00539 extern GTY(()) section *ctors_section;
00540 extern GTY(()) section *dtors_section;
00541 extern GTY(()) section *bss_section;
00542 extern GTY(()) section *sbss_section;
00543 extern GTY(()) section *exception_section;
00544 extern GTY(()) section *eh_frame_section;
00545 extern GTY(()) section *tls_comm_section;
00546 extern GTY(()) section *comm_section;
00547 extern GTY(()) section *lcomm_section;
00548 extern GTY(()) section *bss_noswitch_section;
00549
00550 extern GTY(()) section *in_section;
00551 extern GTY(()) bool in_cold_section_p;
00552
00553 extern section *get_unnamed_section (unsigned int, void (*) (const void *),
00554 const void *);
00555 extern section *get_section (const char *, unsigned int, tree);
00556 extern section *get_named_section (tree, const char *, int);
00557 extern void place_block_symbol (rtx);
00558 extern rtx get_section_anchor (struct object_block *, HOST_WIDE_INT,
00559 enum tls_model);
00560 extern section *mergeable_constant_section (enum machine_mode,
00561 unsigned HOST_WIDE_INT,
00562 unsigned int);
00563 extern section *function_section (tree);
00564 extern section *unlikely_text_section (void);
00565 extern section *current_function_section (void);
00566
00567 extern bool unlikely_text_section_p (section *);
00568 extern void switch_to_section (section *);
00569 extern void output_section_asm_op (const void *);
00570
00571 extern unsigned int default_section_type_flags (tree, const char *, int);
00572
00573 extern bool have_global_bss_p (void);
00574 extern void default_no_named_section (const char *, unsigned int, tree);
00575 extern void default_elf_asm_named_section (const char *, unsigned int, tree);
00576 extern enum section_category categorize_decl_for_section (tree, int);
00577 extern void default_coff_asm_named_section (const char *, unsigned int, tree);
00578 extern void default_pe_asm_named_section (const char *, unsigned int, tree);
00579
00580 extern void default_stabs_asm_out_destructor (rtx, int);
00581 extern void default_named_section_asm_out_destructor (rtx, int);
00582 extern void default_dtor_section_asm_out_destructor (rtx, int);
00583 extern void default_stabs_asm_out_constructor (rtx, int);
00584 extern void default_named_section_asm_out_constructor (rtx, int);
00585 extern void default_ctor_section_asm_out_constructor (rtx, int);
00586
00587 extern section *default_select_section (tree, int, unsigned HOST_WIDE_INT);
00588 extern section *default_elf_select_section (tree, int, unsigned HOST_WIDE_INT);
00589 extern void default_unique_section (tree, int);
00590 extern section *default_function_rodata_section (tree);
00591 extern section *default_no_function_rodata_section (tree);
00592 extern section *default_select_rtx_section (enum machine_mode, rtx,
00593 unsigned HOST_WIDE_INT);
00594 extern section *default_elf_select_rtx_section (enum machine_mode, rtx,
00595 unsigned HOST_WIDE_INT);
00596 extern void default_encode_section_info (tree, rtx, int);
00597 extern const char *default_strip_name_encoding (const char *);
00598 extern void default_asm_output_anchor (rtx);
00599 extern bool default_use_anchors_for_symbol_p (rtx);
00600 extern bool default_binds_local_p (tree);
00601 extern bool default_binds_local_p_1 (tree, int);
00602 extern void default_globalize_label (FILE *, const char *);
00603 extern void default_emit_unwind_label (FILE *, tree, int, int);
00604 extern void default_emit_except_table_label (FILE *);
00605 extern void default_internal_label (FILE *, const char *, unsigned long);
00606 extern void default_file_start (void);
00607 extern void file_end_indicate_exec_stack (void);
00608 extern bool default_valid_pointer_mode (enum machine_mode);
00609
00610 extern int default_address_cost (rtx);
00611
00612 /* dbxout helper functions */
00613 #if defined DBX_DEBUGGING_INFO || defined XCOFF_DEBUGGING_INFO
00614
00615 extern void dbxout_int (int);
00616 extern void dbxout_stabd (int, int);
00617 extern void dbxout_begin_stabn (int);
00618 extern void dbxout_begin_stabn_sline (int);
00619 extern void dbxout_begin_empty_stabs (int);
00620 extern void dbxout_begin_simple_stabs (const char *, int);
00621 extern void dbxout_begin_simple_stabs_desc (const char *, int, int);
00622
00623 extern void dbxout_stab_value_zero (void);
00624 extern void dbxout_stab_value_label (const char *);
00625 extern void dbxout_stab_value_label_diff (const char *, const char *);
00626 extern void dbxout_stab_value_internal_label (const char *, int *);
00627 extern void dbxout_stab_value_internal_label_diff (const char *, int *,
00628 const char *);
00629
00630 #endif
00631
00632 #endif /* ! GCC_OUTPUT_H */