Related articles |
---|
Alpha assembly language - ldah/lda after jsr tim.jones@mail.com (2003-10-08) |
Re: Alpha assembly language - ldah/lda after jsr gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-10-12) |
Re: Alpha assembly language - ldah/lda after jsr jvorbrueggen@mediasec.de (Jan C.=?iso-8859-1?Q?Vorbr=FCggen?=) (2003-10-12) |
Re: Alpha assembly language - ldah/lda after jsr firefly@diku.dk (Peter \Firefly\Lund) (2003-10-12) |
Re: Alpha assembly language - ldah/lda after jsr gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-10-13) |
Re: Alpha assembly language - ldah/lda after jsr gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-10-13) |
From: | "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> |
Newsgroups: | comp.compilers |
Date: | 13 Oct 2003 00:19:47 -0400 |
Organization: | Comcast Online |
References: | 03-10-040 |
Keywords: | architecture, assembler |
Posted-Date: | 13 Oct 2003 00:19:47 EDT |
"Timothy Jones" <tim.jones@mail.com> wrote in message
news:03-10-040@comp.compilers...
> I have a problem with some alpha assembly code. Specifically with the
> ldah/lda pair of instructions to load the $gp after a function call.
> Initially the alpha compiler produces this:
>
> jsr $26, ($27), spec_getc!lituse_jsr!468
> ldl $1, ($12)
> ldah $gp, ($26)!gpdisp!469
> cmpeq $10, $0, $2
> cmplt $11, 255, $3
> lda $gp, 4($gp)!gpdisp!469
> ...
(snip)
LDAH Ra.wq,disp.ab(Rb.ab)
The virtual address is computed by adding register Rb to 65536 times the
sign extended 16 bit displacement. The 64 bit result is written to Ra.
With no displacement, it would seem to copy Rb into Ra.
When you add a nop you did make sure that all addresses are still addressing
the right place. (I don't know if you are modifying the object program or
assembly source.)
-- glen
Return to the
comp.compilers page.
Search the
comp.compilers archives again.