Re: Setting up alpha stack frames

anton@mips.complang.tuwien.ac.at (Anton Ertl)
14 May 2003 00:49:23 -0400

          From comp.compilers

Related articles
Setting up alpha stack frames tim.jones@mail.com (2003-05-06)
Re: Setting up alpha stack frames Len.Lattanzi@Migration.com (2003-05-14)
Re: Setting up alpha stack frames firefly@diku.dk (Peter \Firefly\Lund) (2003-05-14)
Re: Setting up alpha stack frames anton@mips.complang.tuwien.ac.at (2003-05-14)
| List of all articles for this month |
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.compilers,comp.arch
Date: 14 May 2003 00:49:23 -0400
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 03-05-046
Keywords: architecture
Posted-Date: 14 May 2003 00:49:23 EDT

tim.jones@mail.com (Timothy Jones) writes:
>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.
...
>hello:
> nop
> ldgp $gp,0($27)


If you insert anything before the ldgp, you have to adjust the ldgp
offset, IIRC like this:


                ldgp $gp,4($27)


(or maybe -4). The offset is the difference between the address in
$27 and the address of the ldgp pseudo-instruction.


Adding alignment after the nop is unnecessary.


- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/home.html


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.