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