packing/unpacking 4-octet longs

Andrew Cagney ac131313@cygnus.com
Wed Dec 5 10:42:00 GMT 2001


> I'm not aware of this affecting the ARM (except in that FPA format doubles 
> and long doubles always have the word with the exponent at the lowest 
> address, but there's nothing in the IEEE FP specs that says this is 
> invalid).  In particular, storing a word, or multi-word, at an unaligned 
> address does not change the order of bytes in memory, so
> 	memcpy(unaligned_address, aligned_address, sizeof(some_word))
> does not require diddling with the internal order (or have I misunderstood 
> the problem?)

That was a useful manual :-)  See 5-21 where it explains that a 
misaligned 32bit access gets rotated before it is stored :-/

enjoy,
Andrew




More information about the Gdb mailing list