This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] run FINAL_SCAN_INSN for asm insns?

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  <>

	* 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;
+	    FINAL_PRESCAN_INSN (insn, ops, insn_noperands);
 	    /* Output the insn using them.  */
 	    if (string[0])
Alexandre Oliva   Enjoy Guarana', see
Red Hat GCC Developer                 aoliva@{,}
CS PhD student at IC-Unicamp        oliva@{,}
Free Software Evangelist                Professional serial bug killer

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]