This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PR gas/13024: internal error with branch swapping and double .locs
- From: Richard Sandiford <rsandifo at linux dot vnet dot ibm dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 14 Jun 2013 14:32:28 +0100
- Subject: Re: PR gas/13024: internal error with branch swapping and double .locs
- References: <87zjuyj6vd dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <201306101759 dot r5AHxp0J032073 at d06av02 dot portsmouth dot uk dot ibm dot com>
"Ulrich Weigand" <uweigand@de.ibm.com> writes:
> Richard Sandiford wrote:
>
>> Here's an alternative way of fixing the original bug that shouldn't
>> have these problems. Does it look OK? I'll add a test for the
>> regression too.
>
> This does fix the problem for me, thanks!
Thanks for testing it. I waited a few days to see if anyone had any
comments about doing things this way. No-one did, so I went ahead and
applied it with the fixed comment. Here's the testsuite part.
Sorry for the breakage.
Richard
gas/testsuite/
* gas/mips/loc-swap-3.d, gas/mips/loc-swap-3.s: New test.
* gas/mips/mips.exp: Run it.
Index: gas/testsuite/gas/mips/loc-swap-3.d
===================================================================
--- /dev/null 2013-06-14 09:42:18.103472747 +0100
+++ gas/testsuite/gas/mips/loc-swap-3.d 2013-06-14 14:16:26.478232388 +0100
@@ -0,0 +1,16 @@
+#PROG: readelf
+#readelf: -wl
+#name: MIPS DWARF-2 location information with branch swapping (3)
+#...
+ Line Number Statements:
+.* Set prologue_end to true
+.* Extended opcode 2: set Address to 0x[01]
+.* Copy
+#------------------------------------------------------------------------
+# There used to be a bogus:
+# Set prologue_end to true
+# here
+#------------------------------------------------------------------------
+.* Special opcode 6: advance Address by 0 to 0x[01] and Line by 1 to 2
+.* Advance PC by .*
+.* Extended opcode 1: End of Sequence
Index: gas/testsuite/gas/mips/loc-swap-3.s
===================================================================
--- /dev/null 2013-06-14 09:42:18.103472747 +0100
+++ gas/testsuite/gas/mips/loc-swap-3.s 2013-06-14 14:00:53.827425832 +0100
@@ -0,0 +1,6 @@
+ .file 1 "test.cpp"
+
+ .text
+ .loc 1 1 0 prologue_end
+ .loc 1 2 0
+ nop
Index: gas/testsuite/gas/mips/mips.exp
===================================================================
--- gas/testsuite/gas/mips/mips.exp 2013-06-10 16:04:49.000000000 +0100
+++ gas/testsuite/gas/mips/mips.exp 2013-06-14 14:04:00.165397035 +0100
@@ -996,6 +996,7 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test_arches "loc-swap-dis" \
[mips_arch_list_all]
run_dump_test_arches "loc-swap-2" [mips_arch_list_all]
+ run_dump_test_arches "loc-swap-3" [mips_arch_list_all]
}
if $has_newabi {