This is the mail archive of the gcc@gcc.gnu.org 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]

Re: NOPs inserting problem in GCC 4.1.x


"Ling-hua Tseng" <uranus@it.muds.net> 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
> exactly.
> 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
  insn_insn_lengths ();
  shorten_branches (get_insns ());
to recompute everything.

Yes, it's ugly.

Ian


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