lns-big-delta gas test
Alan Modra
amodra@gmail.com
Thu May 24 15:36:00 GMT 2012
gas/lns/lns-big-delta has been failing on xtensa (the only target to
run this test) since Richard's 2011-09-05 change to gas/dwarf2dbg.c.
I reckon the test itself is somewhat suspect, since .loc specifies
line number info for instructions, and the test has no instructions
(unless you count .space as an instruction). So, let's fix the test.
I'm not hugely concerned, but the old test does illustrate some
problems with queuing line info: We don't emit queued line info if
.loc is not followed by an insn or label (no line info at all for the
old test), and perhaps the queue should be flushed on pseudos like
.space that bump pc? gcc asm can do all sorts of weird tricks. eg.
int foo (void)
{
__asm__ (".p2align 8");
return 0;
}
results in
.loc 1 3 0
#APP
# 3 "/src/tmp/asmloc.c" 1
.p2align 8
# 0 "" 2
.loc 1 4 0
#NO_APP
movl $0, %eax
so with queuing, the ".p2align" loses its line number info to the
"movl". Thoughts?
* gas/lns/lns-big-delta.s: Add nops.
* gas/lns/lns-big-delta.d: Update.
Index: gas/testsuite/gas/lns/lns-big-delta.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/lns/lns-big-delta.s,v
retrieving revision 1.1
diff -u -p -r1.1 lns-big-delta.s
--- gas/testsuite/gas/lns/lns-big-delta.s 9 Jan 2008 17:30:59 -0000 1.1
+++ gas/testsuite/gas/lns/lns-big-delta.s 24 May 2012 14:39:47 -0000
@@ -1,5 +1,9 @@
.file 1 "foo.c"
.loc 1 1 0
.loc 1 2 0
+ nop
+ nop
.space 75000
.loc 1 3 0
+ nop
+ nop
Index: gas/testsuite/gas/lns/lns-big-delta.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/lns/lns-big-delta.d,v
retrieving revision 1.2
diff -u -p -r1.2 lns-big-delta.d
--- gas/testsuite/gas/lns/lns-big-delta.d 11 Apr 2008 17:51:15 -0000 1.2
+++ gas/testsuite/gas/lns/lns-big-delta.d 24 May 2012 14:39:47 -0000
@@ -4,11 +4,14 @@
Raw dump of debug contents of section \.debug_line:
#...
Line Number Statements:
- Extended opcode 2: set Address to .*
+ Extended opcode 2: set Address to 0x0
Copy
Advance Line by 1 to 2
- Extended opcode 2: set Address to .*
+ Advance PC by fixed size amount 0 to 0x0
Copy
- Advance PC by fixed size amount 0 to .*
+ Advance Line by 1 to 3
+ Extended opcode 2: set Address to 0x124fc
+ Copy
+ Advance PC by fixed size amount 4 to 0x12500
Extended opcode 1: End of Sequence
#pass
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list