This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Different sized data and code pointers
- From: Paul Schlie <schlie at comcast dot net>
- To: Thomas Gill <thomas dot gill at csr dot com>,<gcc at gcc dot gnu dot org>
- Date: Thu, 03 Mar 2005 11:23:17 -0500
- Subject: Re: Different sized data and code pointers
>>>> Paul Schlie wrote:
>>>> If the program's address space pointer is more accurately implemented
>>>> as a 16-bit pointer combined with an 8-bit segment address; wonder if
>>>> it may be worth your while to take a look at how the old segmented x86
>>>> GCC targets treat segmented addresses?
>>>
>>> Thomas Gill wrote:
>>> Hmmm.. it's possible. Where can I find that?
>>
>> the target ports are in gcc/config/...
>
> Sure, I mean which target should I be looking at?
Was thinking x386, but it seems to use the same scheme for data or program
addresses; candidly, I believe building a jump table for function-pointer
calls just like interrupt vectors may be your best bet; as it will only add
a few cycles per call through a data pointer, and may even be eliminated if
the code never calls a function pointer (which most code never does).