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: GCC and memory segments


Bernd Jendrissek wrote:
I believe DJ Delorie has done some work on realmode x86 code generation.

This is off the link I gave. To be a little more precise http://www.delorie.com/djgpp/16bit

So how do I work with segments?

I would suggest making Pmode be PSImode. This will let you distinguish pointers from integers. You can then write PSImode patterns that know how to load the upper part of an address into a segment register. This effectively makes every pointer a far pointer. After you get this working, you can worry about optimizing it to avoid redundant segment register loads.


Or you could make pointers HImode, then every pointer is a near pointer.

Gcc only supports one size of pointer, so you either have to make all pointers near pointers or all pointers far pointers. If you need both, you are out of luck.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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