Removing REG_OK_STRICT
Kazu Hirata
kazu@cs.umass.edu
Wed Feb 4 22:28:00 GMT 2004
Hi,
I'm thinking about removing REG_OK_STRICT as it's one of the dirtiest
macro. (It controls "overloading" of target macros like
REG_OK_FOR_INDEX_P.)
Here is my plan:
1. For each port, make it look like i386.h. That is, do something
like
/* Define both nonstrict and strict versions. */
#define REG_OK_FOR_INDEX_NONSTRICT_P(X) blah
#define REG_OK_FOR_INDEX_STRICT_P(X) blah
/* All REG_OK_STRICT does is to choose one of the two. */
#ifndef REG_OK_STRICT#
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_INDEX_NONSTRICT_P (X)
#else
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_INDEX_STRICT_P (X)
#endif
Note that some ports like alpha, i386, avr, and h8300 do this.
2. Change each use of REG_OK_FOR_*_P to either the strict or the
nonstrict version.
3. Remove REG_OK_STRICT as well as all definitions of
REG_OK_FOR_INDEX_P and its friends that do not have "STRICT"
appearing in their names.
4. Finally ready for hookizing REG_OK_FOR_BASE_{STRICT,NONSTRICT}_P
and its friends.
Suggestions? OK as far as the basic idea?
Kazu Hirata
More information about the Gcc
mailing list