This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A Case to maintain target i370-*-mvs as a live target
- From: Joern Rennecke <joern dot rennecke at superh dot com>
- To: ivan at vmfacility dot fr (Ivan Warren)
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 3 Feb 2004 13:34:43 +0000 (GMT)
- Subject: Re: A Case to maintain target i370-*-mvs as a live target
> > - It doesn't use define_constant
...
> I cannot comment on the above. My gcc internals knowledge is yet too
With literal constants speard all over the machine description, it is
nearly impossible to change any register numbers or UNSPECs /
UNSPEC_VOLATILEs, the code is hard to understand in places unless you have
memorized all the relevant numbers, and you also risk re-using numbers
accidentally.
define_constant uses can be retrofitted, this is in fact the way most ports
aquired them. It tends to be a lot of work, about linear with the size
of the sources of the port, bit it is mostly mechanical, i.e. scrutinizing
every literal constant in the code and decide if this should be using
a define_constant name instead.
There might be a few special cases, e.g. a loop index that is used as a
register number. To get an idea what is involved, you can look using
cvs how define_constants were retrofitted into existing ports.