From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26066 invoked by alias); 18 Oct 2010 17:05:18 -0000 Received: (qmail 26053 invoked by uid 22791); 18 Oct 2010 17:05:17 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from eddie.linux-mips.org (HELO cvs.linux-mips.org) (78.24.191.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Oct 2010 17:05:12 +0000 Received: from localhost.localdomain ([127.0.0.1]:47734 "EHLO localhost.localdomain" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S1491865Ab0JRRFI (ORCPT ); Mon, 18 Oct 2010 19:05:08 +0200 Date: Mon, 18 Oct 2010 17:05:00 -0000 From: "Maciej W. Rozycki" To: Richard Sandiford cc: binutils@sourceware.org Subject: Re: [PATCH 1/2] MIPS/GAS: Fix o32 LD to the base register In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00288.txt.bz2 On Mon, 18 Oct 2010, Richard Sandiford wrote: > > 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? Because I've got a hole in my imagination here? :/ > Seems a shame to use $at when we don't need to. Indeed, although we're no better elsewhere, consider e.g.: $ cat ld-base-1.s .comm foo, 1024 ld $4, foo $ as -32 -o ld-base-1.o ld-base-1.s $ objdump -dr ld-base-1.o ld-base-1.o: file format elf32-tradbigmips Disassembly of section .text: 00000000 <.text>: 0: 3c010000 lui at,0x0 0: R_MIPS_HI16 foo 4: 8c240000 lw a0,0(at) 4: R_MIPS_LO16 foo 8: 8c250004 lw a1,4(at) 8: R_MIPS_LO16 foo c: 00000000 nop where $a1 could be used in place of $at, couldn't it? I'll cook up something, though I only have worms to offer it would seem. Maciej