This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
i386 REG_CLASS_CONTENTS / REGNO_REG_CLASS inconsistencies
- To: egcs at cygnus dot com
- Subject: i386 REG_CLASS_CONTENTS / REGNO_REG_CLASS inconsistencies
- From: John Wehle <john at feith dot com>
- Date: Sat, 19 Dec 1998 17:12:23 -0500 (EST)
i386.h defines ARG_POINTER_REGNUM as 16 and contains:
#define REG_CLASS_CONTENTS \
{ {0}, \
{0x1}, {0x2}, {0x4}, {0x8}, /* AREG, DREG, CREG, BREG */ \
{0x3}, /* AD_REGS */ \
{0xf}, /* Q_REGS */ \
{0x10}, {0x20}, /* SIREG, DIREG */ \
{0x7f}, /* INDEX_REGS */ \
{0x100ff}, /* GENERAL_REGS */ \
{0x0100}, {0x0200}, /* FP_TOP_REG, FP_SECOND_REG */ \
{0xff00}, /* FLOAT_REGS */ \
{0x1ffff}}
#define REGNO_REG_CLASS(REGNO) (regclass_map[REGNO])
i386.c contains:
enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
{
/* ax, dx, cx, bx */
AREG, DREG, CREG, BREG,
/* si, di, bp, sp */
SIREG, DIREG, INDEX_REGS, GENERAL_REGS,
/* FP registers */
FP_TOP_REG, FP_SECOND_REG, FLOAT_REGS, FLOAT_REGS,
FLOAT_REGS, FLOAT_REGS, FLOAT_REGS, FLOAT_REGS,
/* arg pointer */
INDEX_REGS
};
Leaving me a bit confused as to whether ARG_POINTER is a GENERAL
register or an INDEX register. Shouldn't REG_CLASS_CONTENTS
and REGNO_REG_CLASS be consistent, or am I just missing something?
What's the right answer for ARG_POINTER?
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------