|Setting up alpha stack frames email@example.com (2003-05-06)|
|Re: Setting up alpha stack frames Len.Lattanzi@Migration.com (2003-05-14)|
|Re: Setting up alpha stack frames firstname.lastname@example.org (Peter \Firefly\Lund) (2003-05-14)|
|Re: Setting up alpha stack frames email@example.com (2003-05-14)|
|Date:||14 May 2003 00:43:45 -0400|
|Organization:||The Internet MainStreet, Inc.|
|Posted-Date:||14 May 2003 00:43:45 EDT|
On 6 May 2003 19:18:05 -0400, Timothy Jones <firstname.lastname@example.org> wrote:
>I'm having some trouble adding an instruction (even if it's a nop) to
>the start of a procedure before the stack frame is initialised. I want
>to put it here because I want it to go before any other instruction is
>executed in each basic block.
>The first problem I had was with alignment. I started with the
>following code, where hello is the name of a simple procedure which
>prints "Hello World!". I added the nop at the start and get this
> ldgp $gp,0($27)
$27 has the address of hello in it per Alpha calling convention.
ldgp loads $gp based on this address and some PC relative operation.
See what's going to happen? $gp will be off by 4. Two nops should
"hide" the alignment problem but still leave you with an invalid $gp
now off by 8. This is from memory so don't quote me. I suggest you
single step with and without the no-op to verify this.
Return to the
Search the comp.compilers archives again.