------- Comment #68 from dave at hiauly1 dot hia dot nrc dot ca  2008-02-07 
15:33 -------
Subject: Re:  wo_prof_two_strs.c:56: internal compiler error: in
find_new_var_of_type, at ipa-struct-reorg.c:605

> I looked into assembly you send and see the following difference:
> for original malloc there is additional instruction 
> 
> stwm %r4,64(%r30)
> 
> before malloc call, while for first artificial malloc (field a, I suppose)
> there is similar instruction
> 
> stw %r3,-60(%r30)
> 
> but for the second artificial malloc there isn't. ("Copy" instructions are to
> carry results of the malloc).
> 
> As I am not familiar with hp assembler, can you please explain what is the
> meaning of this instruction? Probably my suspicion is wrong.

The above two instructions are part of the prologue for main.  Both
instructions are stores.  In non leaf functions, the prologue always
creates a frame.  In the 32-bit runtime, this is always a multiple of
64 bytes.  Depending on the details of the prologue, the creation
of a new frame may be combined with a register store.  The above stwm
instruction saves register r4 at the stack pointer address contained
in r30 (conventionally the stack pointer register) and then 64 is
added to r30.  The stw insn saves r3 at the stack pointer address
minus 60.  r3 and r4 are both caller saves registers, so they have
to be saved in the frame when used and restored in the epilogue.

Prologue and epilogue handling occurs in every function with a frame,
so it is extremely well tested.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34483

Reply via email to