Re: Different sized data and code pointers

2005-03-04 Thread Thomas Gill
Julian Brown wrote: FWIW, a port I did used indirection for all function pointers, albeit for a different reason, and I can report that it seems to work OK in practice with a little linker magic. It wasn't really production-quality code though, I admit. Perhaps the indirection table can safely hold

Re: Different sized data and code pointers

2005-03-03 Thread Julian Brown
On 2005-03-02, Thomas Gill <[EMAIL PROTECTED]> wrote: > Paul Schlie wrote: > >> With the arguable exception of function pointers (which need not be literal >> address) all pointers are presumed to point to data, not code; therefore >> may be simplest to define pointers as being 16-bits, and call fu

Re: Different sized data and code pointers

2005-03-03 Thread Paul Schlie
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? >>> >

Re: Different sized data and code pointers

2005-03-03 Thread Thomas Gill
Paul Schlie wrote: the target ports are in gcc/config/... Sure, I mean which target should I be looking at? Ned. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or

Re: Different sized data and code pointers

2005-03-02 Thread Thomas Gill
Paul Schlie wrote: With the arguable exception of function pointers (which need not be literal address) all pointers are presumed to point to data, not code; therefore may be simplest to define pointers as being 16-bits, and call functions indirectly through a lookup table constructed at link time

Re: Different sized data and code pointers

2005-03-01 Thread Paul Schlie
> Thomas Gill wrote: > I'm working on a GCC backend for a small embedded processor. We've got a > Harvard architecture with 16 bit data addresses and 24 bit code > addresses. How well does GCC support having different sized pointers for > this sort of thing? The macros POINTER_SIZE and Pmode seem t

Re: Different sized data and code pointers

2005-03-01 Thread E. Weddington
Thomas Gill wrote: Hi all. I'm working on a GCC backend for a small embedded processor. We've got a Harvard architecture with 16 bit data addresses and 24 bit code addresses. How well does GCC support having different sized pointers for this sort of thing? The macros POINTER_SIZE and Pmode seem to

Different sized data and code pointers

2005-03-01 Thread Thomas Gill
Hi all. I'm working on a GCC backend for a small embedded processor. We've got a Harvard architecture with 16 bit data addresses and 24 bit code addresses. How well does GCC support having different sized pointers for this sort of thing? The macros POINTER_SIZE and Pmode seem to suggest that ther