From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4019 invoked by alias); 18 Aug 2006 22:09:33 -0000 Received: (qmail 4011 invoked by uid 22791); 18 Aug 2006 22:09:32 -0000 X-Spam-Check-By: sourceware.org Received: from potter.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 18 Aug 2006 22:09:29 +0000 Received: (qmail 18122 invoked from network); 18 Aug 2006 22:09:27 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Aug 2006 22:09:27 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.52) id 1GECWs-0005Ca-LC for binutils@sourceware.org; Fri, 18 Aug 2006 22:09:26 +0000 Date: Sat, 19 Aug 2006 15:10:00 -0000 From: "Joseph S. Myers" To: binutils@sourceware.org Subject: Fix iWMMXt unwind information Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00209.txt.bz2 The generation of iWMMXt unwind information uses || instead of && when checking if it is possible to merge a save with a previous save, so leading to saves being wrongly merged when they aren't in the correct order to merge. This patch fixes the problem case and adds a testcase for it. OK to commit? gas: 2006-08-18 Joseph Myers * config/tc-arm.c (s_arm_unwind_save_mmxwr): Correct condition for merging with previous long opcode. gas/testsuite: 2006-08-18 Joseph Myers * gas/arm/unwind.s: Test not merging iWMMXt register save with previous long opcode. * gas/arm/unwind.d, gas/arm/unwind_vxworks.d: Update. Index: config/tc-arm.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-arm.c,v retrieving revision 1.286 diff -u -r1.286 tc-arm.c --- config/tc-arm.c 16 Aug 2006 10:33:50 -0000 1.286 +++ config/tc-arm.c 18 Aug 2006 22:05:54 -0000 @@ -3448,7 +3448,7 @@ op = 0xffff << (reg - 1); if (reg > 0 - || ((mask & op) == (1u << (reg - 1)))) + && ((mask & op) == (1u << (reg - 1)))) { op = (1 << (reg + i + 1)) - 1; op &= ~((1 << reg) - 1); Index: testsuite/gas/arm/unwind.d =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/arm/unwind.d,v retrieving revision 1.9 diff -u -r1.9 unwind.d --- testsuite/gas/arm/unwind.d 15 Nov 2005 14:29:58 -0000 1.9 +++ testsuite/gas/arm/unwind.d 18 Aug 2006 22:05:54 -0000 @@ -32,8 +32,8 @@ 0010 (04200520|20052004) .* Contents of section .ARM.extab: 0000 (449b0181 b0b08086|81019b44 8680b0b0) 00000000 00000000 .* - 0010 (8402b101 b0b0b005 2a000000 00c60181|01b10284 05b0b0b0 0000002a 8101c600) .* - 0020 (b0b0c1c1|c1c1b0b0) 00000000 .* + 0010 (8402b101 b0b0b005 2a000000 00c60281|01b10284 05b0b0b0 0000002a 8102c600) .* + 0020 (d0c6c1c1 b0b0c0c6|c1c1c6d0 c6c0b0b0) 00000000 .* Contents of section .ARM.exidx: 0000 00000000 (b0b0a880 04000000|80a8b0b0 00000004) 00000000 .* 0010 (08000000 0c000000 0c000000 1c000000|00000008 0000000c 0000000c 0000001c) .* Index: testsuite/gas/arm/unwind.s =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/arm/unwind.s,v retrieving revision 1.2 diff -u -r1.2 unwind.s --- testsuite/gas/arm/unwind.s 15 Nov 2005 14:29:58 -0000 1.2 +++ testsuite/gas/arm/unwind.s 18 Aug 2006 22:05:54 -0000 @@ -27,6 +27,8 @@ .fnend foo3: @ Saving iwmmxt registers .fnstart + .save {wr12} + .save {wr13} .save {wr11} .save {wr10} .save {wr10, wr11} Index: testsuite/gas/arm/unwind_vxworks.d =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/arm/unwind_vxworks.d,v retrieving revision 1.3 diff -u -r1.3 unwind_vxworks.d --- testsuite/gas/arm/unwind_vxworks.d 7 Mar 2006 08:39:21 -0000 1.3 +++ testsuite/gas/arm/unwind_vxworks.d 18 Aug 2006 22:05:54 -0000 @@ -31,8 +31,8 @@ 0010 (04200520|20052004) .* Contents of section .ARM.extab: 0000 (449b0181 b0b08086|81019b44 8680b0b0) 00000000 00000000 .* - 0010 (8402b101 b0b0b005 2a000000 00c60181|01b10284 05b0b0b0 0000002a 8101c600) .* - 0020 (b0b0c1c1|c1c1b0b0) 00000000 .* + 0010 (8402b101 b0b0b005 2a000000 00c60281|01b10284 05b0b0b0 0000002a 8102c600) .* + 0020 (d0c6c1c1 b0b0c0c6|c1c1c6d0 c6c0b0b0) 00000000 .* Contents of section .ARM.exidx: 0000 00000000 (b0b0a880|80a8b0b0) 00000000 00000000 .* 0010 00000000 00000000 00000000 00000000 .* -- Joseph S. Myers joseph@codesourcery.com