This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: about named address space
- From: Ian Lance Taylor <iant at google dot com>
- To: Rony Paul <ronypaul77 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 04 May 2011 10:35:20 -0700
- Subject: Re: about named address space
- References: <BANLkTinKZYCvTij1-7-X8+-_Zo_e77Y=8Q@mail.gmail.com> <mcr7ha63553.fsf@coign.corp.google.com> <BANLkTimyTK1-wEfNtRVzDiwHDd96g2UUiw@mail.gmail.com>
Rony Paul <ronypaul77@gmail.com> writes:
> On Wed, May 4, 2011 at 4:35 PM, Ian Lance Taylor <iant@google.com> wrote:
>> Rony Paul <ronypaul77@gmail.com> writes:
>>
>>> Thank you for your reply. I am new in this development. so I am askig
>>> you Âvery basic question. I dont have enough knowledge on "backend",
>>> what did you man with this term?
>>>
>>> my task is to use one memory space as big endian, other as little
>>> endian, and to use Âcopying of pointer from 1 memory space to another.
>>> Just tell me what should be my beggining step? which files I should modify?
>>
>> Please reply to the mailing list, not just to me. ÂAlso, please don't
>> top-post. ÂThanks.
>>
>> Re: backend: See http://en.wikipedia.org/wiki/Compilers . ÂIn gcc the
>> backend is the CPU-specific code in config/CPU.
>>
>> You haven't said anything about your target. ÂIs your memory different
>> at the hardware level? ÂIf not, named address spaces are probably not
>> the right approach.
>>
>> Ian
>>
>>
>>> Rony Paul <ronypaul77@gmail.com> writes:
>>>
>>>> I want to use named address space support to allow mixed endian
>>>> applications. Specifying the endianness of address spaces.
>>>> Can you suggest me what should I do in this purpose? and which files I
>>>> need to modify ?
>>>
>>> In general named address space is described here:
>>>
>>> http://gcc.gnu.org/onlinedocs/gccint/Named-Address-Spaces.html
>>>
>>> You didn't mention which backend you are using and you didn't mention
>>> how you mean to handle pointers to an address space of different
>>> endianness. ÂNamed address spaces seem appropriate if some of your
>>> memory is big-endian and some is little-endian. ÂI don't know whether
>>> they are appropriate if you want to have both big-endian and
>>> little-endian pointers to the same area of memory.
>>>
>>> Ian
>>
> Thank you for the reply.
>
> Yes I have separate memory at the hardware level. And as far I learnt
> that named address space is already implemented for SPU processor. SPU
> port uses the __ea address space to refer to memory in the host
> processor, rather than memory local to the SPU processor.
> I am now just in the learning phase. SO , if I want to modify that
> code (just to learn) and want to add one more address space keyword
> like "__ea"............what should I do?
Start by reading the link I mentioned above:
http://gcc.gnu.org/onlinedocs/gccint/Named-Address-Spaces.html
That explains what you do to add more address spaces. It requires
modifying the gcc source code and rebuilding gcc.
Ian