From: Richard Sandiford <rdsandiford@googlemail.com>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: binutils@sourceware.org
Subject: Re: [PATCH 1/2] MIPS/GAS: Fix o32 LD to the base register
Date: Mon, 18 Oct 2010 07:48:00 -0000 [thread overview]
Message-ID: <g48w1w2b8a.fsf@richards-desktop.stglab.manchester.uk.ibm.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1010130023180.15889@eddie.linux-mips.org> (Maciej W. Rozycki's message of "Sun\, 17 Oct 2010 17\:22\:31 +0100 \(BST\)")
"Maciej W. Rozycki" <macro@linux-mips.org> writes:
> Here's another one:
>
> $ cat ld-base.s
> ld $4, ($4)
> $ mips-linux-as -o ld-base.o ld-base.s
> $ mips-linux-objdump -d ld-base.o
>
> ld-base.o: file format elf32-tradbigmips
>
>
> Disassembly of section .text:
>
> 00000000 <.text>:
> 0: 8c840000 lw a0,0(a0)
> 4: 00000000 nop
> 8: 8c850004 lw a1,4(a0)
>
> Ouch!
>
> Fixed thus and regression tested for mips-linux, mips64-linux,
> mipstx39-elf, mipsisa64-elf and mips-ecoff targets and their little-endian
> counterparts. The new code produced looks like this:
>
> $ mips-linux-objdump -d ld-base.o
>
> ld-base.o: file format elf32-tradbigmips
>
>
> Disassembly of section .text:
>
> 00000000 <.text>:
> 0: 00800821 move at,a0
> 4: 8c240000 lw a0,0(at)
> 8: 8c250004 lw a1,4(at)
Why are you doing it this way, rather than reversing the loads?
Seems a shame to use $at when we don't need to.
Richard
next prev parent reply other threads:[~2010-10-18 7:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-17 16:22 Maciej W. Rozycki
2010-10-18 7:48 ` Richard Sandiford [this message]
2010-10-18 17:05 ` Maciej W. Rozycki
2010-10-31 22:46 ` [PATCH 1/5] " Maciej W. Rozycki
2010-11-01 21:28 ` Richard Sandiford
2010-11-01 21:34 ` Richard Sandiford
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=g48w1w2b8a.fsf@richards-desktop.stglab.manchester.uk.ibm.com \
--to=rdsandiford@googlemail.com \
--cc=binutils@sourceware.org \
--cc=macro@linux-mips.org \
/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).