This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR middle-end/60281
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: lin zuojian <manjian2006 at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 20 Feb 2014 11:05:00 +0000
- Subject: Re: [PATCH] PR middle-end/60281
- Authentication-results: sourceware.org; auth=none
- References: <5305BA80 dot 5080306 at gmail dot com> <20140220085049 dot GD22862 at tucnak dot redhat dot com> <5305C740 dot 6000105 at gmail dot com>
- Reply-to: ramrad01 at arm dot com
>> Or, if ARM supports unaligned loads/stores using special instructions,
>> perhaps you should also benchmark the alternative of not realigning, but
>> instead making sure those unaligned instructions are used for the shadow
>> memory loads/stores in the asan prologue/epilogue.
> I have tried to use -fno-peephole2 to shutdown instructions
> combinations,but that makes me feel uncomfortable.
That should not be required. I suspect what you need is a
movmisalignsi expander generating unaligned_store/loadsi patterns.
Notice that these put out ldr / str instructions but with UNSPECs
which means that the peepholers for ldrd / ldm will not catch them.
As Jakub says later in this thread ARM is a STRICT_ALIGNMENT target.
If the compiler is peepholing unaligned ldr's and str's, that would be
a bug and the compiler needs to be fixed to avoid this.
regards
Ramana
>>
>> Please next time post the patch from a sane MUA that doesn't eat tabs or
>> at least as an attachment. Comments should start with a capital letter, and
>> with a full stop followed by two spaces, in the ChangeLog also all entries
>> should end with a full stop.
> Sorry about that...
> BTW,I didn't modify the ChangeLog because this patch should be discussed
> carefully.
>>
>> Jakub
>
>