[ARM, RFC] Support unaligned access for modern ARM processors

Jie Zhang jie@codesourcery.com
Thu Jan 27 08:10:00 GMT 2011


Just found my patch does not apply to the latest trunk any longer. This 
is an updated one.

Jie

On 01/27/2011 12:48 PM, Jie Zhang wrote:
> Hi Ramana,
>
> Thanks for your comments!
>
> On 01/27/2011 10:24 AM, Ramana Radhakrishnan wrote:
>>>
>>> Any comments are welcome.
>>
>> I can't approve or reject your patch and I haven't yet finished
>> reading your patch in its entirety but one of the comments I have
>> straight up is about the lack of testcases for this. One of the
>> reasons that I would like to see this added is because to a large
>> degree the patch is predicated on MEM_ALIGN information being up to
>> date. Thus it might be worth while adding testcases to make sure we
>> generate ldrd's when we know memory addresses are aligned and we keep
>> doing the right thing in the right places.
>>
> I don't know how to write a test case for which gcc will generate ldrd.
> I tried the following with the latest trunk and arm-eabi target:
>
> $ cat t.c
> long long ll;
> long long foo ()
> {
> return ll;
> }
>
> $ ./cc1 -O2 -mcpu=cortex-a8 t.c -quiet
> $ cat t.s
> ...
> foo:
> ...
> movw r3, #:lower16:ll
> movt r3, #:upper16:ll
> ldmia r3, {r0, r1}
> bx lr
> ...
>
> Maybe I should try Carrot's ldrd patch. But currently his patch is in
> bad format.
>
>> Another minor part of your patch that I'm not sure I totally like is
>> the part where you define output_asm_insn as a macro just across a
>> function. I'm not sure I like that style of coding especially because
>> it confuses a standard function name output_asm_insn with something
>> else.
>>
> Yeah. But this is the best way I have now to keep the changes minimal.
> such that the patch can be reviewed more easily. We can write another
> patch to change output_asm_insn to another name if we want.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-arm-support-unaligned-access-2.diff
Type: text/x-diff
Size: 40814 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110127/d2d4def4/attachment.bin>


More information about the Gcc-patches mailing list