diff options
author | Zack Weinberg <zack@codesourcery.com> | 2002-07-19 23:11:19 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2002-07-19 23:11:19 +0000 |
commit | 0dc36574afc7846defc8751c3e19e4c994e0de4a (patch) | |
tree | 4677dbe754062a2b5c3b9130edc8bd83740a6f96 /gcc/final.c | |
parent | 59267987dbc7bc330557f4fdfdb574fc797f6c84 (diff) | |
download | gcc-0dc36574afc7846defc8751c3e19e4c994e0de4a.zip gcc-0dc36574afc7846defc8751c3e19e4c994e0de4a.tar.gz gcc-0dc36574afc7846defc8751c3e19e4c994e0de4a.tar.bz2 |
rtl.def (CODE_LABEL): Remove slot 8.
* rtl.def (CODE_LABEL): Remove slot 8.
* rtl.h (struct rtx_def): Document new uses of jump and call fields.
(LABEL_ALTERNATE_NAME): Delete.
(LABEL_KIND, SET_LABEL_KIND, LABEL_ALT_ENTRY_P): New.
* defaults.h: Remove default for ASM_OUTPUT_ALTERNATE_LABEL_NAME.
* final.c (output_alternate_entry_point): New.
(final_scan_insn): Use it instead of
ASM_OUTPUT_ALTERNATE_LABEL_NAME. Do not consider possibility
of a case label being an alternate entry point.
* cfgbuild.c (make_edges, find_bb_boundaries): Use LABEL_ALT_ENTRY_P.
* emit-rtl.c (gen_label_rtx): Adjust call to gen_rtx_CODE_LABEL.
Do not clear LABEL_NUSES (unnecessary) or LABEL_ALTERNATE_NAME
(field deleted).
* print-rtl.c, ra-debug.c: Update code to output CODE_LABELs.
* doc/rtl.texi: Document LABEL_KIND, SET_LABEL_KIND, and
LABEL_ALT_ENTRY_P; not LABEL_ALTERNATE_NAME.
* doc/tm.texi: Delete documentation of
ASM_OUTPUT_ALTERNATE_LABEL_NAME.
From-SVN: r55597
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/gcc/final.c b/gcc/final.c index 3b3dfcd..e0b3860 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -222,6 +222,7 @@ static void profile_after_prologue PARAMS ((FILE *)); static void notice_source_line PARAMS ((rtx)); static rtx walk_alter_subreg PARAMS ((rtx *)); static void output_asm_name PARAMS ((void)); +static void output_alternate_entry_point PARAMS ((FILE *, rtx)); static tree get_mem_expr_from_op PARAMS ((rtx, int *)); static void output_asm_operand_names PARAMS ((rtx *, int *, int)); static void output_operand PARAMS ((rtx, int)); @@ -1952,6 +1953,37 @@ get_insn_template (code, insn) } } +/* Emit the appropriate declaration for an alternate-entry-point + symbol represented by INSN, to FILE. INSN is a CODE_LABEL with + LABEL_KIND != LABEL_NORMAL. + + The case fall-through in this function is intentional. */ +static void +output_alternate_entry_point (file, insn) + FILE *file; + rtx insn; +{ + const char *name = LABEL_NAME (insn); + + switch (LABEL_KIND (insn)) + { + case LABEL_WEAK_ENTRY: +#ifdef ASM_WEAKEN_LABEL + ASM_WEAKEN_LABEL (file, name); +#endif + case LABEL_GLOBAL_ENTRY: + ASM_GLOBALIZE_LABEL (file, name); + case LABEL_STATIC_ENTRY: + /* FIXME output a .type directive here if appropriate. */ + ASM_OUTPUT_LABEL (file, name); + break; + + case LABEL_NORMAL: + default: + abort (); + } +} + /* The final scan for one insn, INSN. Args are same as in `final', except that INSN is the insn being scanned. @@ -2242,17 +2274,14 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) ASM_OUTPUT_CASE_LABEL (file, "L", CODE_LABEL_NUMBER (insn), NEXT_INSN (insn)); #else - if (LABEL_ALTERNATE_NAME (insn)) - ASM_OUTPUT_ALTERNATE_LABEL_NAME (file, insn); - else - ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (insn)); + ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (insn)); #endif #endif break; } } - if (LABEL_ALTERNATE_NAME (insn)) - ASM_OUTPUT_ALTERNATE_LABEL_NAME (file, insn); + if (LABEL_ALT_ENTRY_P (insn)) + output_alternate_entry_point (file, insn); else ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (insn)); break; |