From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15669 invoked by alias); 2 Jul 2011 07:33:47 -0000 Received: (qmail 15660 invoked by uid 22791); 2 Jul 2011 07:33:46 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Jul 2011 07:33:24 +0000 Received: by wyg36 with SMTP id 36so3191491wyg.0 for ; Sat, 02 Jul 2011 00:33:22 -0700 (PDT) Received: by 10.227.32.84 with SMTP id b20mr3581528wbd.105.1309592002673; Sat, 02 Jul 2011 00:33:22 -0700 (PDT) Received: from localhost (rsandifo.gotadsl.co.uk [82.133.89.107]) by mx.google.com with ESMTPS id fi5sm2850831wbb.5.2011.07.02.00.33.20 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 02 Jul 2011 00:33:21 -0700 (PDT) From: Richard Sandiford To: "Maciej W. Rozycki" Mail-Followup-To: "Maciej W. Rozycki" ,binutils@sourceware.org, rdsandiford@googlemail.com Cc: binutils@sourceware.org Subject: Re: [PATCH] MIPS/GAS: Fix DWARF-2 with branch swapping for MIPS16 code References: <87boxg5nyo.fsf@firetop.home> Date: Sat, 02 Jul 2011 07:33:00 -0000 In-Reply-To: (Maciej W. Rozycki's message of "Sat, 2 Jul 2011 02:20:15 +0100 (BST)") Message-ID: <87boxdcf2b.fsf@firetop.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2011-07/txt/msg00027.txt.bz2 "Maciej W. Rozycki" writes: >> - this: >> >> > + Advance PC by 16 to 0x5c >> >> depends on the target alignment of .text; it passes for GNU/Linux >> targets but fails on ELF ones. I think we should stub out the >> exact numbers, since they're incidental to the test. > > Hmm, does it? I did verify it both on a GNU/Linux and an ELF target. It > still passes for me, except that: > > + Advance PC by 24 to 0x64 > > is required instead as with my intended-to-be-sent-originally change. > Likewise: > > + Advance PC by 23 to 0x40 > > for the MIPS16 dump. Which target is failing for you? Perhaps the cause > was merely the outdated version of the change, sigh... Ah, could be. It was mips64-elf. Maybe I'd got confused and the original didn't pass for GNU/Linux after all. Sorry about that. > I have regenerated and revalidated the change now and I'm ready to push > it, but I'd prefer the final DWARF-2 instructions to be matched exactly. > I made the effort to make the source alignment-agnostic and I'd prefer to > keep the final offsets to be verified literally so that any unexpected > discrepancies are caught. Agreed. > 2011-07-02 Maciej W. Rozycki > > gas/ > * config/tc-mips.c (append_insn): Make sure DWARF-2 location > information is properly adjusted for branches that get swapped. > > gas/testsuite/ > * gas/mips/loc-swap.d: New test case for DWARF-2 location with > branch swapping. > * gas/mips/loc-swap-dis.d: Likewise. > * gas/mips/mips16\@loc-swap.d: Likewise, MIPS16 version. > * gas/mips/mips16\@loc-swap-dis.d: Likewise. > * gas/mips/loc-swap.s: Source for the new tests. > * gas/mips/mips.exp: Run the new tests. OK. Richard