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: Jakub Jelinek <jakub at redhat dot com>
- To: lin zuojian <manjian2006 at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Feb 2014 11:50:27 +0100
- 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> <20140220092112 dot GF22862 at tucnak dot redhat dot com> <5305DCFD dot 2050802 at gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Feb 20, 2014 at 06:46:21PM +0800, lin zuojian wrote:
> Oh, you may think my patch have not violated STRICT_ALIGNMENT.My patch
> doesn't realign stack_pointer,but virtual_stack_vars,although they may
> share the same position mostly.
> As you can see,the code emitted just make the stack 8 bytes aligned.
>
> > You mean that for the prologues right now on ARM we emit unaligned
> > store insns during expansion and that they are later peepholed into
> > aligned stores?
> Yes.Because SImode is aligned to 4 bytes ,and str is considered aligned
> to 4 bytes on all ARM machine,so gcc doesn't consider itself emitting
> the unaligned str instructions in the first place.Of course aligned str
> can be peepholed into aligned str multiple.
ARM is a STRICT_ALIGNMENT target, I was suggesting that you do the changes
you want to do only for STRICT_ALIGNMENT targets. They are not desirable
for !STRICT_ALIGNMENT targets like i?86/x86_64 (or say ppc/ppc64 unless
strict alignment is requested by compielr option).
Jakub