This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Generated insns far from being optimal
- From: Alan Lehotsky <apl at alum dot mit dot edu>
- To: Alexandre Courbot <Alexandre dot Courbot at lifl dot fr>
- Cc: GCC List <gcc at gcc dot gnu dot org>
- Date: Wed, 20 Mar 2002 09:57:26 -0500
- Subject: Re: Generated insns far from being optimal
- References: <1016634173.1697.9.camel@bruyere>
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.
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 :-)
Al Lehotsky
--
------------------------------------------------------------------------
Quality Software Management
http://home.earthlink.net/~qsmgmt
apl@alum.mit.edu
(978)287-0435 Voice
(978)808-6836 Cell
(978)287-0436 Fax
Software Process Improvement and Management Consulting
Language Design and Compiler Implementation