[PATCH, all targets]: Move definition of "nop" to the top of insn definitions

David Daney ddaney@caviumnetworks.com
Tue Dec 8 19:10:00 GMT 2009


Uros Bizjak wrote:
> Hello!
> 
> Some parts of gcc (i.e. caller-save [1]) assume that recog_insn
> doesn't return zero for valid insn. As suggested by rth, the best fix
> for this would be to move "nop" pattern to the top of insn
> definitions, forcing it to the position 0 in the insn description
> array.
> 

Since you think it is important enough of an issue to generate this 
patch, do you think it might make sense to document it?

Perhaps a note in gccint.texi and some comments in the .md files you are 
touching are in order.

David Daney



> Attached mechanical patch implements this suggestion.
> 
> 2009-12-08  Uros Bizjak  <ubizjak@gmail.com>
> 
> 	* config/alpha/alpha.md (nop): Move to the top of insn definitions.
> 	* config/frv/frv.md (nop): Ditto.
> 	* config/s390/s390.md (nop): Ditto.
> 	* config/spu/spu.md (nop): Ditto.
> 	* config/sparc/sparc.md (nop): Ditto.
> 	* config/mep/mep.md (nop): Ditto.
> 	* config/m32r/m32r.md (nop): Ditto.
> 	* config/i386/i386.md (nop): Ditto.
> 	* config/rx/rx.md (nop): Ditto.
> 	* config/sh/sh.md (nop): Ditto.
> 	* config/pdp11/pdp11.md (nop): Ditto.
> 	* config/avr/avr.md (nop): Ditto.
> 	* config/crx/crx.md (nop): Ditto.
> 	* config/xtensa/xtensa.md (nop): Ditto.
> 	* config/stormy16/stormy16.md (nop): Ditto.
> 	* config/fr30/fr30.md (nop): Ditto.
> 	* config/lm32/lm32.md (nop): Ditto.
> 	* config/m68hc11/m68hc11.md (nop): Ditto.
> 	* config/cris/cris.md (nop): Ditto.
> 	* config/iq2000/iq2000.md (nop): Ditto.
> 	* config/mn10300/mn10300.md (nop): Ditto.
> 	* config/ia64/ia64.md (nop): Ditto.
> 	* config/m68k/m68k.md (nop): Ditto.
> 	* config/rs6000/rs6000.md (nop): Ditto.
> 	* config/picochip/picochip.md (nop): Ditto.
> 	* config/arc/arc.md (nop): Ditto.
> 	* config/mcore/mcore.md (nop): Ditto.
> 	* config/score/score.md (nop): Ditto.
> 	* config/arm/arm.md (nop): Ditto.
> 	* config/pa/pa.md (nop): Ditto.
> 	* config/mips/mips.md (nop): Ditto.
> 	* config/vax/vax.md (nop): Ditto.
> 	* config/v850/v850.md (nop): Ditto.
> 	* config/h8300/h8300.md (nop): Ditto.
> 	* config/mmix/mmix.md (nop): Ditto.
> 	* config/bfin/bfin.md (nop): Ditto.
> 
> If there are no other objections/comments from target maintainers, I
> plan to commit this patch to SVN mainline in 48h.
> 
> Uros.
> 



More information about the Gcc-patches mailing list