Re: New datatype addition to gcc

glen herrmannsfeldt <gah@ugcs.caltech.edu>
22 Dec 2004 01:04:55 -0500

          From comp.compilers

Related articles
New datatype addition to gcc sriharsha.v@redpinesignals.com (Sriharsha Vedurmudi) (2004-12-11)
Re: New datatype addition to gcc mrmnews@the-meissners.org (Michael Meissner) (2004-12-16)
Re: New datatype addition to gcc sriharsha.v@redpinesignals.com (Sriharsha) (2004-12-16)
Re: New datatype addition to gcc gneuner2@comcast.net (George Neuner) (2004-12-17)
Re: New datatype addition to gcc mrmnews@the-meissners.org (Michael Meissner) (2004-12-19)
Re: New datatype addition to gcc gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-12-22)
Re: New datatype addition to gcc mrmnews@the-meissners.org (Michael Meissner) (2004-12-23)
Re: New datatype addition to gcc henry@spsystems.net (2004-12-23)
Re: New datatype addition to gcc nathan.moore@sdc.cox.net (Nathan Moore) (2005-03-24)
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 22 Dec 2004 01:04:55 -0500
Organization: Comcast Online
References: 04-12-052 04-12-068 04-12-069 04-12-093
Keywords: GCC, architecture
Posted-Date: 22 Dec 2004 01:04:55 EST

Michael Meissner wrote:


> Sriharsha <sriharsha.v@redpinesignals.com> writes:


>>My h/w personnel says that there will be TWO RAMs in the processor,
>>one is 8-bit addressible while the other is 16-bit addressible. If
>>the compiler has to do 8-bit data load/store, it uses the 8-bit RAM
>>and if it has something to do with 16-bit, it uses that RAM. This
>>sounded bizzare to me but, thats what they say (or atleast I've
>>never come across such stuff).


(snip)


> My take is you can't expect an ISO standard C implementation on such a
> machine using two address spaces, one for byte accesses and one for
> word, since structures can contain both types, and structures are
> required to have all members adjacent.


Structures are allowed to have padding for alignment. The only
restriction that I remember is that a pointer to the structure is
equivalent to a pointer to the first member. Past that, I don't know
about such restrictions. Casting pointers to a different type and
dereferencing them is not guaranteed to work, either.


It would seem to me that it might just work.


-- glen


> I suspect the best you can do is use just one address space, and
> issue multiple instructions, possibly adding a sop with attributes
> to declare static variables in the other address space. Note, once
> a pointer has been taken, GCC historically has lost all of the
> attribute information.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.