On Thu, Mar 31, 2011 at 01:32:24PM +0100, Paulo J. Matos wrote:
> On 30/03/11 08:57, Claudiu Zissulescu wrote:
> >Hi,
> >
> >I would try using the named address space for your issue (see
> >TARGET_ADDR_SPACE_POINTER_MODE). Please check the SPU target for an
> >implementation example.
> >
> 
> Hummm, I haven't noticed this hook before. Could this be used to
> implement cases where function pointers have a different size than
> data pointers (as in harvard archs). It looks like it but can
> someone confirm?

The SPU uses named address space to deal with local memory that the processor
deals with normally, and global memory that the host powerpc can see, and it is
moved in/out of the local memory.  In -mea64 mode, the external memory is
64-bits, so it has two different sizes of pointer.  The backend controls
whether one named address is a subset of another, and whether you can convert
between the named address spaces.  The technical report (N1169) of the ISO C
committee that the address space support is based on does not allow for
function pointers to be different sizes, just the data pointers.

The 2009 GCC summit proceedings has my paper describing adding the named
address space support to the compiler.  Note I have moved groups within IBM,
and no longer work on the SPU compiler, so I haven't touched the named address
space support since the early part of 2009.
http://gcc.gnu.org/wiki/HomePage?action=AttachFile&do=view&target=2009-GCC-Summit-Proceedings.pdf

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meiss...@linux.vnet.ibm.com     fax +1 (978) 399-6899

Reply via email to