[PATCH] Cleanup the final_scan_insn function
Anatoly Sokolov
aesok@post.ru
Thu Aug 7 16:58:00 GMT 2008
Hello.
This patch change the code:
if (! app_on)
{
fputs (ASM_APP_ON, file);
app_on = 1;
}
on call the app_enable() function and the code:
if (app_on)
{
fputs (ASM_APP_OFF, file);
app_on = 0;
}
on call the app_disable() function, which do the same.
Patch was bootstrapped and regression tested on x86_64-unknown-linux-gnu.
Ok to commit?
2008-08-07 Anatoly Sokolov <aesok@post.ru>
* gcc/final.c (final_scan_insn): Use app_enable/app_disable functions.
Index: gcc/final.c
===================================================================
--- gcc/final.c (revision 138816)
+++ gcc/final.c (working copy)
@@ -2007,11 +2007,7 @@
if (LABEL_NAME (insn))
(*debug_hooks->label) (insn);
- if (app_on)
- {
- fputs (ASM_APP_OFF, file);
- app_on = 0;
- }
+ app_disable ();
next = next_nonnote_insn (insn);
if (next != 0 && JUMP_P (next))
@@ -2111,11 +2107,7 @@
else
switch_to_section (current_function_section ());
- if (app_on)
- {
- fputs (ASM_APP_OFF, file);
- app_on = 0;
- }
+ app_disable ();
#if defined(ASM_OUTPUT_ADDR_VEC) || defined(ASM_OUTPUT_ADDR_DIFF_VEC)
if (GET_CODE (body) == ADDR_VEC)
@@ -2189,11 +2181,7 @@
{
expanded_location loc;
- if (! app_on)
- {
- fputs (ASM_APP_ON, file);
- app_on = 1;
- }
+ app_enable ();
loc = expand_location (ASM_INPUT_SOURCE_LOCATION (body));
if (*loc.file && loc.line)
fprintf (asm_out_file, "%s %i \"%s\" 1\n",
@@ -2233,11 +2221,7 @@
/* Output the insn using them. */
if (string[0])
{
- if (! app_on)
- {
- fputs (ASM_APP_ON, file);
- app_on = 1;
- }
+ app_enable ();
if (expanded.file && expanded.line)
fprintf (asm_out_file, "%s %i \"%s\" 1\n",
ASM_COMMENT_START, expanded.line, expanded.file);
@@ -2252,11 +2236,7 @@
break;
}
- if (app_on)
- {
- fputs (ASM_APP_OFF, file);
- app_on = 0;
- }
+ app_disable ();
if (GET_CODE (body) == SEQUENCE)
{
Anatoliy.
More information about the Gcc-patches
mailing list