Re: Idea - big and little endian data areas using named address spaces

2011-04-06 Thread konica
igned, for targets > which cannot directly access non-aligned data. The loads and stores > would be done byte-wise for slower but correct functionality. > > > -- View this message in context: http://old.nabble.com/Idea---big-and-little-endian-data-areas-using-named-address-spaces-tp30179796p31330986.html Sent from the gcc - Dev mailing list archive at Nabble.com.

Re: Idea - big and little endian data areas using named address spaces

2010-11-11 Thread Michael Meissner
On Wed, Nov 10, 2010 at 01:00:49PM +0100, David Brown wrote: > Would it be possible to use the named address space syntax to > implement reverse-endian data? Conversion between little-endian and > big-endian data structures is something that turns up regularly in > embedded systems, where you migh

Re: Idea - big and little endian data areas using named address spaces

2010-11-10 Thread David Brown
On 10/11/10 18:05, Paul Koning wrote: C++ lets you define explicit-order integer types and hide all the conversions. I used that a couple of jobs ago, back around 1996 or so -- worked nicely, and should work even better now that C++ is more mature. Yes, a lot of such things can be done with C

Re: Idea - big and little endian data areas using named address spaces

2010-11-10 Thread David Brown
On 10/11/10 17:55, Chris Lattner wrote: On Nov 10, 2010, at 4:00 AM, David Brown wrote: Would it be possible to use the named address space syntax to implement reverse-endian data? Conversion between little-endian and big-endian data structures is something that turns up regularly in embedded

Re: Idea - big and little endian data areas using named address spaces

2010-11-10 Thread Paul Koning
C++ lets you define explicit-order integer types and hide all the conversions. I used that a couple of jobs ago, back around 1996 or so -- worked nicely, and should work even better now that C++ is more mature. paul On Nov 10, 2010, at 7:00 AM, David Brown wrote: > Would it be possibl

Re: Idea - big and little endian data areas using named address spaces

2010-11-10 Thread Chris Lattner
On Nov 10, 2010, at 4:00 AM, David Brown wrote: > Would it be possible to use the named address space syntax to implement > reverse-endian data? Conversion between little-endian and big-endian data > structures is something that turns up regularly in embedded systems, where > you might well b

Re: Idea - big and little endian data areas using named address spaces

2010-11-10 Thread Andreas Krebbel
David, for s390 we would also be interested in a solution like that. s390 is big endian and endianess conflicts often come in the way when porting an application from 'other' platforms. Linus Torvalds already in 2001 made a quite similiar suggestions using a type attribute: http://gcc.gnu.org

Idea - big and little endian data areas using named address spaces

2010-11-10 Thread David Brown
Would it be possible to use the named address space syntax to implement reverse-endian data? Conversion between little-endian and big-endian data structures is something that turns up regularly in embedded systems, where you might well be using two different architectures with different endian