This is the mail archive of the
mailing list for the GCC project.
Re: NOPs inserting problem in GCC 4.1.x
- From: Ian Lance Taylor <ian at airs dot com>
- To: "Ling-hua Tseng" <uranus at it dot muds dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: 20 Mar 2006 10:50:27 -0800
- Subject: Re: NOPs inserting problem in GCC 4.1.x
- References: <000301c64b9d$4289beb0$0201a8c0@uranus>
"Ling-hua Tseng" <firstname.lastname@example.org> writes:
> Because I need to use the feature of `length' attribute (i.e., use get_attr_length() in machine description),
> I have to insert NOPs explicitly before performing the pass 58
> (shorten) such that the shorten pass can calculate the length of insns
> Can I direct move the reorg pass to the under of shorten pass by modifying the passes.c?
One typical trick is to insert the nops in
TARGET_ASM_FUNCTION_PROLOGUE, and then call
shorten_branches (get_insns ());
to recompute everything.
Yes, it's ugly.