This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Removing REG_OK_STRICT
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc at gcc dot gnu dot org
- Cc: zack at codesourcery dot com
- Date: Wed, 04 Feb 2004 17:28:03 -0500 (EST)
- Subject: Removing REG_OK_STRICT
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