* i386 REG_CLASS_CONTENTS / REGNO_REG_CLASS inconsistencies
@ 1998-12-19 14:12 John Wehle
1998-12-22 23:46 ` Jeffrey A Law
0 siblings, 1 reply; 3+ messages in thread
From: John Wehle @ 1998-12-19 14:12 UTC (permalink / raw)
To: egcs
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 | |
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: i386 REG_CLASS_CONTENTS / REGNO_REG_CLASS inconsistencies
1998-12-19 14:12 i386 REG_CLASS_CONTENTS / REGNO_REG_CLASS inconsistencies John Wehle
@ 1998-12-22 23:46 ` Jeffrey A Law
1998-12-23 13:30 ` Richard Henderson
0 siblings, 1 reply; 3+ messages in thread
From: Jeffrey A Law @ 1998-12-22 23:46 UTC (permalink / raw)
To: John Wehle; +Cc: egcs
In message < 199812192212.RAA03998@jwlab.FEITH.COM >you write:
> 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?
Weird. I would have expected the arg pointer & frame pointer to be
treated in the same manner. The same usually holds for the stack pointer
too.
So adding the arg pointer to INDEX_REGS is probably the right thing to do.
It may (or may not) make sense to change the handling of sp so that it
appears in index_regs and maps to INDEX_REGs.
jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: i386 REG_CLASS_CONTENTS / REGNO_REG_CLASS inconsistencies
1998-12-22 23:46 ` Jeffrey A Law
@ 1998-12-23 13:30 ` Richard Henderson
0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 1998-12-23 13:30 UTC (permalink / raw)
To: law, John Wehle; +Cc: egcs
On Wed, Dec 23, 1998 at 12:44:37AM -0700, Jeffrey A Law wrote:
> It may (or may not) make sense to change the handling of sp so that it
> appears in index_regs and maps to INDEX_REGs.
%esp cannot be an index reg.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-12-23 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-19 14:12 i386 REG_CLASS_CONTENTS / REGNO_REG_CLASS inconsistencies John Wehle
1998-12-22 23:46 ` Jeffrey A Law
1998-12-23 13:30 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).