Hi Bernd,

You may send a patch too.Your idea will be more clear.
--
Regards
lin zuojian

On Sun, Mar 02, 2014 at 10:24:52AM +0800, lin zuojian wrote:
> Hi Bernd,
> 
> set_mem_align is not working like magic.
> 
> set_mem_align just set the alignment of a memory rtx.And You must aware
> that you do so because you are sure this rtx IS aligned like this.
> For arm machines, the base the virtual registers are aligned to 8
> bytes.You can't just set_mem_align to get_best_mode(),because this is
> not the fact.If you do so,the unalign accessing is still there.My
> realignment code make sure the base of virtual registers is aligned to
> SImode,and so I can use that fact to set_mem_align.
> 
> In a word,set_mem_align does not generate realignment code for
> STRICT_ALIGNMENT machines.
> 
> As you say that's not the best mode on all machines.But let's fix one
> bug at a time.You are focusing too much in that mode.
>  
> > So, that is what I mean: this patch makes the stack grow by
> > 32 bytes, just because the emit_stack_protection uses SImode,
> > with unaligned addresses which is not possible for ARM, and
> > not optimal for X86_64.
> It's because of the realignment,as my comment said.I have to make room
> for virtual registers's realignment,or they(or the spilled registers) will 
> get damaged by the other subroutine.  
> 
>     
> --
> Regards
> lin zuojian 

Reply via email to