Re: char alignment on ARM

2007-01-17 Thread Michael Eager
Inder wrote: Hi All I have similar question as for arm http://gcc.gnu.org/ml/gcc/2007-01/msg00691.html consider the following program. e.g.. - align.c - int main() { int bc; char a[6]; int ac; bc = 0x; /* fill with zeros. */ a[0] = 0x00; a[1] = 0x01; a[2

Re: char alignment on ARM

2007-01-17 Thread Mike Stump
On Jan 17, 2007, at 5:23 AM, Inder wrote: void make(char* a) { *(unsigned long*)a = 0x12345678; } stating address of the char array now starts from an unaligned address and is acessed by the instruction strbr3, [fp, #-26] which gives a very wrong result Is the compiler doing a righ