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: [RL78] Questions about code-generation


> Ah, that certainly explains a lot.  How exactly would the fixing be 
> done?  Is there an example I could look at for one of the other processors?

No, RL78 is the first that uses this scheme.

> I calculated a week or two ago that we could make a code-saving of 
> around 8% by using near or relative branches and near calls instead of 
> always generating far calls.  I changed rl78-real.md to use near 
> addressing and got about 5%.  That's probably about right.  I tried to 
> generate relative branches too but I'm guessing that the 'length' 
> attribute needs to be set for all instructions to get that working properly.

Or the linker could be taught to optimize branches once it knows the
full displacement, but that can be even trickier to get right.


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