This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] run FINAL_SCAN_INSN for asm insns?
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 17 Oct 2003 14:52:30 -0300
- Subject: [PATCH] run FINAL_SCAN_INSN for asm insns?
- Organization: GCC Team, Red Hat
I found that the absence of a call to FINAL_SCAN_INSN for asm
statements causes GCC for frv-elf to generate incorrect expansions for
%I in asm statements, because ASM_OUTPUT_OPCODE references the
operands stored by frv_final_prescan_insn(). It seems to me that this
change might also unknown problems in sh and h8300, and wouldn't have
any negative effect on alpha, arc, arm, avr or iq2000. I haven't
found any other users of FINAL_PRESCAN_INSN. Ok to install?
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* final.c (final_scan_insn): Run FINAL_PRESCAN_INSNS on asm insns
as well.
Index: gcc/final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.292
diff -u -p -r1.292 final.c
--- gcc/final.c 11 Oct 2003 19:00:49 -0000 1.292
+++ gcc/final.c 17 Oct 2003 17:43:06 -0000
@@ -2054,6 +2054,10 @@ final_scan_insn (rtx insn, FILE *file, i
insn_noperands = noperands;
this_is_asm_operands = insn;
+#ifdef FINAL_PRESCAN_INSN
+ FINAL_PRESCAN_INSN (insn, ops, insn_noperands);
+#endif
+
/* Output the insn using them. */
if (string[0])
{
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer