Renaming -mshort-load-bytes

Richard Earnshaw rearnsha@arm.com
Tue Nov 30 23:59:00 GMT 1999


> Hi Richard,
> 
>   I have decided that it is time I got around to fixing the
>   -mshort-load-bytes and -mshort-load-words switches for the ARM
>   toolchain.  I have just been tripped up by them in another customer
>   PR and I am fed up with it.  So here is what I propose:
> 
>   Replace both switches with just one switch:
> 
>     -mno-unaligned-word-loads
> 
>   Obviously the old switches would still be recognised, but they would
>   no longer be documented.
> 
>   Internally the macro TARGET_SHORT_BY_BYTES would also be replaced by
>   TARGET_ALLOW_UNALIGNED_WORD_LOADS (which would be the inverse of the
>   switch above).
> 
>   What do you think ?  Is this the way to go ?
> 
> Cheers
> 	Nick


YES YES YES!!!! :-)

My only quibble would be the name of the option.  I've been pondering this 
for a while, which is why I haven't done anything about it.  However, the 
best I've come up with is

	-malignment-traps -- MMU faults unaligned accesses

The full documentation can be more precise in saying how this affects the 
code (in particular saying that this does not allow int's to be placed at 
odd offsets).

R.



More information about the Gcc-patches mailing list