Re: SPARC assembly - a beginner's question...
From: Jeff Damens (jdamens_at_ebbets.poly.edu)
Date: 06/26/03
- Previous message: Hal Flynn: "Administrivia (X-Post)"
- In reply to: Steve Wilson: "SPARC assembly - a beginner's question..."
- Next in thread: Steve Wilson: "RE: SPARC assembly - a beginner's question..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 25 Jun 2003 19:18:16 -0400 (EDT) To: S.Wilson@eris.qinetiq.com
> Running my assembly code does not....
> or %g0, %g0, [%fp-12] ! clear %fp-12
...
> expanding "clr [%fp-12]" to "or %g0, %g0, [%fp-12]"
I think this is where the problem lies. I don't believe there is an
addressing mode which lets you or two registers into a memory
location. I think the 'clr' pseudo-op actually expands to
st %g0, [%fp-12]
(g0 is assumed to contain 0 always).
> If I load the binary into gdb and take a look, a lot of it seems to be
> missing:
Ahhh...
> set 0x2F736800, %o0 ! %o0=/sh\0
The \0 terminates the string literal being passed to __asm__ !!!
This may explain why it didn't complain about the or %g0, %g0, [%fp-12].
I hope this helps...
Regards,
Jeff
----------------------------------------------------------------
Jeff Damens Unix Systems Administrator
Polytechnic University jdamens@poly.edu
6 Metrotech (718) 260-3492
Brooklyn, New York 11201
- Previous message: Hal Flynn: "Administrivia (X-Post)"
- In reply to: Steve Wilson: "SPARC assembly - a beginner's question..."
- Next in thread: Steve Wilson: "RE: SPARC assembly - a beginner's question..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|