This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Renaming -mshort-load-bytes


Nick Clifton wrote:
> 
>   I have decided that it is time I got around to fixing the
>   -mshort-load-bytes and -mshort-load-words switches for the ARM

I agree, these switches are confusing to say the least.

>   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.

After looking in the manual, most options beginning with -mno- have an
equivalent positive form.  If you don't want to specify a positive form
for this why not have -munaligned-word-loads turn on the ability to do
the unaligned load hack, and leave it off by default.
I'd also like to see this have no effect in armv4; there we should use
the halfword instructions.

I really don't care if the old switches are recognized.  I'd also like
to see the documentation explicitly mention the behaviour to be expected
of code compiled with this option in the presence/absence of a fault
handler.  The NetWinder typically runs a Linux kernel with an alignment
fault handler.

>   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 ?

I think this is a good idea.  The name makes the intent much clearer I
believe.

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]