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: 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.


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