This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Generated insns far from being optimal
> Your GO_IF_LEGITIMATE_ADDRESS only permits a register as an address, not a
> constant or SYMBOL_REF. Typically, you want to define the CONSTANT_ADDRESS_P
> macro to recognize the constant addresses that are legal and use that inside GO_IF_LEGITIMATE_ADDRESS.
Exactly. Simply extending GO_IF_LEGITIMATE_ADDRESS as Peter suggested
did the trick.
> Suggestion: If address forms are ANYTHING but trivial, make
> GO_IF_LEGITIMATE_ADDRESS call a function
> in your camille.c file. This will be useful to set breakpoints on and
> to see why addresses are rejected
> while debugging. AND, you won't have to recompile the WHOLE compiler
> every time you change the algorithm
> (as you are probably painfully aware, camille.h is a dependency of
> pretty much EVERY compiler file :-)
Right! This is a wise advice! :)
Sorry, this was quite a trivial issue - anyway many thanks Alan, Peter
and Dmitri! :) It's also very impressive to see how gcc is well done and
easily adapts to your target's needs.
Alex.
--
http://www.gnurou.org