arm-elf bad code generation

Richard Earnshaw rearnsha@arm.com
Wed Aug 23 08:22:00 GMT 2000


> In message < 200008221508.QAA11498@cam-mail2.cambridge.arm.com >, Richard Earnsha
> w writes:
> >Hmm, arm_expand_prologue inserts the following CLOBBER which is supposed 
> >to prevent moves across this point.  The question is, why doesn't it?  
> >Maybe it's an alias set problem, but I don't know the details of how that 
> >works.
> 
> Well, the CLOBBER certainly does get generated.  In the .21.ce2 dump I see:
> 
> (insn/f 440 438 441 (set (reg:SI 13 sp)
>         (plus:SI (reg:SI 13 sp)
>             (const_int -32 [0xffffffe0]))) -1 (nil)
>     (nil))
> 
> (insn 441 440 442 (clobber (mem:BLK (reg:SI 13 sp) 0)) -1 (nil)
>     (nil))

It seems that the alias analysis code thinks that it isn't possible for 
the stack and frame to be aliased, so it blithely ignores the current 
clobber instruction.  I've rewritten the code to make it more explicit 
that the clobber is relevant to both the stack adjustment insn and 
frame-pointer stores.  Your code now looks to be compiling correctly.

2000-08-23  Richard Earnshaw  (rearnsha@arm.com)

	* arm.c (arm_expand_prologue): Ensure that the stack-adjustment
	barrier can't be ignored by the alias analysis code.





More information about the Gcc-bugs mailing list