This is the mail archive of the gcc-patches@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: [PATCH 1/5] Named address spaces: core middle-end support


On Thu, Aug 20, 2009 at 4:43 PM, Ulrich Weigand<uweigand@de.ibm.com> wrote:
> Richard Guenther wrote:
>
>> CONVERT_EXPR and NOP_EXPR are supposed to be merged and
>> no differences between them should be introduced.
>>
>> ?However, this is not true for address space conversions.
>>
>> How can a pointer be valid in two address spaces?
>
> TR 18037 allows for one address space to be a subset of
> another. ?This means that each address in the first space
> corresponds to an address in the second space -- but
> possibly represented with a different numerical value.
>
> For example, on Cell the local store address space of an
> SPU can be memory-mapped into the main PPU address space
> at some offset. ?Local store addresses can then be
> converted into PPU addresses by adding that offset.
>
> Similarly, one could imagine implementing a "far pointer"
> address space on a segmented i386 machine, where a generic
> pointer could be converted into a far pointed by prefixing
> it with the default segment selector.
>
> The question is how to represent this operation at the
> tree level ... ? If CONVERT_EXPR (or NOP_EXPR) are not
> suitable for this, do you have another suggestion?

EA_CONVERT_EXPR or EA_TRANSLATE_EXPR?  Overloading
an existing no-op one seems to be confusing.

Richard.

> Bye,
> Ulrich
>
> --
> ?Dr. Ulrich Weigand
> ?GNU Toolchain for Linux on System z and Cell BE
> ?Ulrich.Weigand@de.ibm.com
>


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