Home » U++ Library support » U++ Core » serialize and endians on non-x86 machines [BUG]
serialize and endians on non-x86 machines [BUG] [message #1228] |
Fri, 24 February 2006 08:26 |
iplayfast
Messages: 47 Registered: February 2006
|
Member |
|
|
I was tracing through the serialize example (wow this stuff is impressive).
One thing I noticed is that you are not taking endian into account. (Which is important for some processors.)
Something else which might be important to you when porting to different processors is some processors insist on even boundaries for integer values. That is structures like
pack(1)
struct S
{
char A;
int B;
};
Will cause an exception (and possible crash) when B is selected.
I've run into it when reading data from disk into a structure and then trying to access the data.
EDIT: new topic name by fudadmin
[Updated on: Wed, 03 May 2006 19:49] by Moderator Report message to a moderator
|
|
|
Re: serialize and endians [message #1233 is a reply to message #1228] |
Fri, 24 February 2006 10:55 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
iplayfast wrote on Fri, 24 February 2006 02:26 | I was tracing through the serialize example (wow this stuff is impressive).
One thing I noticed is that you are not taking endian into account. (Which is important for some processors.)
Something else which might be important to you when porting to different processors is some processors insist on even boundaries for integer values. That is structures like
pack(1)
struct S
{
char A;
int B;
};
Will cause an exception (and possible crash) when B is selected.
I've run into it when reading data from disk into a structure and then trying to access the data.
EDIT: new topic name by fudadmin
|
Yes, correct. We are well aware about the issue (Stream.cpp, line 558:
//#must be changed for nonIA32....
Stream& Stream::operator%(bool& d)
....
).
non-x86 archichitetures are one of themes for this year. However, I believe that it cannot be done correctly before we start testing on real HW... (which is to happen soon with ARM/WinCE).
BTW, "//#" comment is used thoughout the code to signal CPU dependent stuff.
Mirek
[Updated on: Fri, 24 February 2006 10:56] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 28 18:42:01 CEST 2024
Total time taken to generate the page: 0.02768 seconds
|