From: David Foulds <dfoulds@cosinecom.com>
To: binutils@sourceware.cygnus.com
Subject: As can assemble of mips gp-relative code?
Date: Wed, 20 Oct 1999 13:56:00 -0000 [thread overview]
Message-ID: <380E2C4B.5B010B29@cosinecom.com> (raw)
I'm trying to port to gas some mips assembly code
which looks like this
sw a0, %sdaoff(cpu_type)($gp)
I decided the equivalent in gas syntax
was
sw a0, cpu_type(gp)
(cpu_type is an integer that is allocated to the .sbss
section by ld).
However, the relocatable code that is emitted by gas (10/20
snapshot) is
addu at,gp,gp
sw a0,0(at)
with cpu_type R_MIPS_GPREL16.
The linker does correctly calculate the offset
of cpu_type from _gp but the value in at is not _gp!
Also, two instructions are used here when one would
do, and at is stepped on.
Any comments? How can I get gas to do what I want,
which is to emit
sw a0,0(gp) with cpu_type R_MIPS_GPREL16?
next reply other threads:[~1999-10-20 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-20 13:56 David Foulds [this message]
1999-10-20 14:01 ` Geoff Keating
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=380E2C4B.5B010B29@cosinecom.com \
--to=dfoulds@cosinecom.com \
--cc=binutils@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).