This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix iWMMXt unwind information
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Fri, 18 Aug 2006 22:09:26 +0000 (UTC)
- Subject: Fix iWMMXt unwind information
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 <joseph@codesourcery.com>
* config/tc-arm.c (s_arm_unwind_save_mmxwr): Correct condition for
merging with previous long opcode.
gas/testsuite:
2006-08-18 Joseph Myers <joseph@codesourcery.com>
* 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