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]

Re: Segment registers support for i386


Remy Saissy wrote:
>I don't really understand how to access the attribute set up in the
>tree in the rtx struct.

You won't be able to.  You're going to need to write your own code that,
during the conversion of the tree to RTL, creates RTL expressions which
indicate that the memory references use segment registers.  This probably
won't be easy since there are a lot of contexts where your "far" pointer
can be used.  I suspect this is where you're going to give up on your
project, but if you do then RTL expressions you'll need to create should
probably look like:

	(mem:SI (plus:SI (unspec:SI [(reg:HI fs)] SEGREF) (reg:SI var)))

After getting GCC to generate expressions like these, then it's a
realtively simple case of modifying ix86_decompose_address() to handle
the unspec.  You might also need to change other backend code for
handling addresses. 

					Ross Ridge


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