This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
segmented code generation...
- To: egcs at egcs dot cygnus dot com
- Subject: segmented code generation...
- From: k dot schupke at ic dot ac dot uk
- Date: Mon, 21 Dec 98 17:39:57 GMT
I am interested in getting egcs to generate code for a segmented addressing
model, ie where code/data and stack are in completely separate protected
address spaces. For a limited subset of C++ I have been able to use the linux
configuration, but I am starting to encounter problems...
i) (egcs1.0.3) put jump tables in the code segment, egcs1.1.1 appears to
put them in the rodata segement which works... so this problem appears to have
dissapeared...
ii) This is more pervasive, the compiler will reference a temporary off the stack
using an LEA into a data register, then attempts to reference the temporary
directly from the pointer in the data register (thus using the data rather than
stack segment)...
So really i'm looking for suggestions, presuming that restricting memory accesses
to a given segment is not a desired general behaviour, I should really write a
new machine target definition. This target however is very close to existing
targets (being i386)...
I have little knowledge of the internals of gcc and was therefore wondering if
anyone could point me at the right parts to modify in order to implement
the following...
i) All function pointers, constant and global data in data segment.
ii) All accesses to temporarys using stack_segment_override, or %esp relative.
(Infact any suggestions as to how I might proceed/any problems I might
encounter would be greatly appreciated).
Thanks,
Keean Schupke
(if you could CC any replies to me at k.schupke@ic.ac.uk that would be great!)