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]

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


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