aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorChao-ying Fu <fu@mips.com>2009-04-10 18:20:22 +0000
committerChao-ying Fu <chaoyingfu@gcc.gnu.org>2009-04-10 18:20:22 +0000
commit1afc5373043f7cc388ceed855be6f7d0f5dc24d1 (patch)
tree6e37fe7e1f86ddb16c584d6ceb5493f7b05e1620 /gcc/final.c
parentaa070a60c3bdc70201b0fdc44da357cab854a50f (diff)
downloadgcc-1afc5373043f7cc388ceed855be6f7d0f5dc24d1.zip
gcc-1afc5373043f7cc388ceed855be6f7d0f5dc24d1.tar.gz
gcc-1afc5373043f7cc388ceed855be6f7d0f5dc24d1.tar.bz2
tm.texi (Instruction Output): Document TARGET_ASM_FINAL_POSTSCAN_INSN.
2009-04-10 Chao-ying Fu <fu@mips.com> * doc/tm.texi (Instruction Output): Document TARGET_ASM_FINAL_POSTSCAN_INSN. * target.h (final_postscan_insn): New field in asm_out. * target-def.h (TARGET_ASM_FINAL_POSTSCAN_INSN): New define. (TARGET_ASM_OUT): Add TARGET_ASM_FINAL_POSTSCAN_INSN. * final.c (final_scan_insn): Call targetm.asm_out.final_postscan_insn after outputting an asm macro and a normal instruction. * config/mips/mips.h (FINAL_PRESCAN_INSN): New define. * config/mips/mips-protos.h (mips_final_prescan_insn): Declare. * config/mips/mips.c (mips_at_reg_p): New for_each_rtx callback. (mips_final_prescan_insn, mips_final_postscan_insn): New functions. (TARGET_ASM_FINAL_POSTSCAN_INSN): New define. From-SVN: r145934
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 1735a73..32d6b74 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2235,6 +2235,10 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
#endif
}
+ if (targetm.asm_out.final_postscan_insn)
+ targetm.asm_out.final_postscan_insn (file, insn, ops,
+ insn_noperands);
+
this_is_asm_operands = 0;
break;
}
@@ -2637,6 +2641,12 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
/* Output assembler code from the template. */
output_asm_insn (templ, recog_data.operand);
+ /* Some target machines need to postscan each insn after
+ it is output. */
+ if (targetm.asm_out.final_postscan_insn)
+ targetm.asm_out.final_postscan_insn (file, insn, recog_data.operand,
+ recog_data.n_operands);
+
/* If necessary, report the effect that the instruction has on
the unwind info. We've already done this for delay slots
and call instructions. */