From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24321 invoked by alias); 11 Oct 2002 10:23:59 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 24233 invoked from network); 11 Oct 2002 10:23:58 -0000 Received: from unknown (HELO mta04bw.bigpond.com) (139.134.6.87) by sources.redhat.com with SMTP; 11 Oct 2002 10:23:58 -0000 Received: from bubble.local ([144.135.24.69]) by mta04bw.bigpond.com (Netscape Messaging Server 4.15 mta04bw Jul 16 2002 22:47:55) with SMTP id H3TBJW00.B69 for ; Fri, 11 Oct 2002 20:23:56 +1000 Received: from CPE-144-136-184-138.sa.bigpond.net.au ([144.136.184.138]) by bwmam01.mailsvc.email.bigpond.com(MailRouter V3.0n 8/2161395); 11 Oct 2002 20:23:56 Received: (qmail 5317 invoked by uid 179); 11 Oct 2002 10:23:55 -0000 Date: Fri, 11 Oct 2002 03:23:00 -0000 From: Alan Modra To: Etienne Lorrain Cc: binutils@sources.redhat.com Subject: Re: ld-2.12.1, PowerPC Message-ID: <20021011195355.O979@bubble.sa.bigpond.net.au> Mail-Followup-To: Etienne Lorrain , binutils@sources.redhat.com References: <20021011095031.80426.qmail@web11802.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20021011095031.80426.qmail@web11802.mail.yahoo.com>; from etienne_lorrain@yahoo.fr on Fri, Oct 11, 2002 at 11:50:30AM +0200 X-SW-Source: 2002-10/txt/msg00237.txt.bz2 On Fri, Oct 11, 2002 at 11:50:30AM +0200, Etienne Lorrain wrote: > $ local/bin/xas -m603 -al -o a.o > li %r0,0 > a_label: > subi %r3,%r3,a_label@l [snip] > Disassembly of section .text: > > 01800074 : > 1800074: 38 00 00 00 li r0,0 > > 01800078 : > 1800078: 38 63 00 78 addi r3,r3,120 > ---------------------- > > Everything is right, but why the subi has been changed by xld to addi ? Well, there isn't a powerpc subi instruction at the machine level. subi is really a macro, with "subi Rx,Ry,value" equivalent to "addi Rx,Ry,-value". > It could have been "addi r3,r3,0xFF88", but it is not (-120 = 0xFF88). gas should have rejected your source, as it's not possible in general to use the negative of a (non-absolute) label. -- Alan Modra IBM OzLabs - Linux Technology Centre