adding a new register type to i386.h, and add spill/fill support

2005-10-23 Thread Tyler Anderson
Hello all,

This is my first post! I'm already familiar with
adding new intrinsics, and am familiar with several
files:
rtl.def - added new rtl types for new instructions
simplify-rtx.c - return 0 in the simplify binary
 and simplify ternary operations for
 instructions with new rtl types
i386.c - define new built-ins, expand new built-ins
i386.h - added a new reg-class, defined new
 IX86_BUILTIN_* global defines
i386.md - The lisp-type code that adds the new
  intrinsic

I'm using GCC 3.3.4, but I doubt this will have
consequence for what we're trying to accomplish.

What I need to do now is define a new register type,
and take it through the whole prcess, just like an xmm
register would (spilling, reload.c, recog.c, etc., the
unchartered territory).

I've already added the new type to i386.h, however, I
think I'm missing something in the #define
REG_CLASS_CONTENTS section. Could anyone point me to
more documentation about what each bit means? We need
to add a new register type, and extend the # of
existing registers. Extending the # of a register
seems easy, but it's unclear to me if it has been done
right since I don't know what each bit set in the
REG_CLASS_CONTENTS define is.

>From then the next steps would be adding full support
to incorporate using the new type in intrinsics, etc.

Any help would be appreciated tons!
Tyler




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


Re: adding a new register type to i386.h, and add spill/fill support

2005-10-24 Thread Tyler Anderson
I've gotten much further. I've added the new register
type to just about everywhere I can think of.

Then I was getting a cannot find a spill register
error.

Any thoughts?
Tyler


--- Ian Lance Taylor  wrote:

> Tyler Anderson <[EMAIL PROTECTED]> writes:
> 
> > I've already added the new type to i386.h,
> however, I
> > think I'm missing something in the #define
> > REG_CLASS_CONTENTS section. Could anyone point me
> to
> > more documentation about what each bit means? We
> need
> > to add a new register type, and extend the # of
> > existing registers. Extending the # of a register
> > seems easy, but it's unclear to me if it has been
> done
> > right since I don't know what each bit set in the
> > REG_CLASS_CONTENTS define is.
> 
> Well, there is documentation in the internals
> manual, of course.
> 
> Each bit in each entry in REG_CLASS_CONTENTS
> corresponds to a
> particular register.  Which register it means is
> target specific, but
> you can figure it out based on, e.g.,
> REGISTER_NAMES.  For example,
> for the i386, bit 0 is ax, bit 1 is dx, etc.
> 
> Ian
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com