diff options
author | Frank Ch. Eigler <fche@redhat.com> | 1998-04-28 20:48:30 +0000 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 1998-04-28 20:48:30 +0000 |
commit | 4b9180d9168a9596933628af54ecf945b23366d6 (patch) | |
tree | b5016ceea31c9bdd4253abafc4276a85084824d7 /gas/testsuite | |
parent | 508fa296e198f06c608d4ee1e3381ab5fa5a5ccb (diff) | |
download | gdb-4b9180d9168a9596933628af54ecf945b23366d6.zip gdb-4b9180d9168a9596933628af54ecf945b23366d6.tar.gz gdb-4b9180d9168a9596933628af54ecf945b23366d6.tar.bz2 |
* Fixes for gdb/15371 part 1: assembly source line numbering.
[ChangeLog]
Tue Apr 28 11:35:56 1998 Frank Ch. Eigler <fche@cygnus.com>
* ecoff.c (ecoff_build_lineno): Do not use dummy first_lineno
for line numbers for assembly source.
[testsuite/ChangeLog]
Tue Apr 28 16:38:34 1998 Frank Ch. Eigler <fche@cygnus.com>
* gas/mips/lineno.[sd]: Assembly source line number test.
* gas/mips/mips.exp: Added lineno test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/mips/lineno.d | 97 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/lineno.s | 60 |
2 files changed, 157 insertions, 0 deletions
diff --git a/gas/testsuite/gas/mips/lineno.d b/gas/testsuite/gas/mips/lineno.d new file mode 100644 index 0000000..d2a40f7 --- /dev/null +++ b/gas/testsuite/gas/mips/lineno.d @@ -0,0 +1,97 @@ +#objdump: -d -l -mmips:4000 +#name: assembly line numbers +#as: -g -mcpu=r4000 + + +.*: +file format .*mips.* + +Disassembly of section \.text: +0+0000 <main-0x10>: +.*[0-9a-f]+:.*deadbeef.* +.*[0-9a-f]+:.*deadbeef.* +.*[0-9a-f]+:.*deadbeef.* +.*[0-9a-f]+:.*deadbeef.* + +0+0010 <main>: +main\(\): +.*lineno.s:16 +.*10:.*addiu.* +.*lineno.s:17 +.*14:.*sd.* +.*lineno.s:18 +.*18:.*sd.* +.*lineno.s:19 +.*1c:.*move.* +.*lineno.s:20 +.*20:.*jal.* +.*24:.*nop +.*lineno.s:21 +.*28:.*li.* +.*lineno.s:22 +.*2c:.*sw.* +.*lineno.s:23 +.*30:.*lw.* +.*lineno.s:24 +.*34:.*move.* +.*lineno.s:25 +.*38:.*sll.* +.*lineno.s:26 +.*3c:.*addu.* +.*lineno.s:27 +.*40:.*sw.* +.*lineno.s:28 +.*44:.*lw.* +.*lineno.s:29 +.*48:.*jal.* +.*4c:.*nop +.*lineno.s:30 +.*50:.*lw.* +.*lineno.s:31 +.*54:.*move.* +.*lineno.s:32 +.*58:.*b.* +.*5c:.*nop + +0000000000000060 <\$L1>: +.*lineno.s:34 +.*60:.*move.* +.*lineno.s:35 +.*64:.*ld.* +.*lineno.s:36 +.*68:.*ld.* +.*lineno.s:37 +.*6c:.*addiu.* +.*lineno.s:38 +.*70:.*jr.* +.*74:.*nop + +0000000000000078 <g>: +g\(\): +.*lineno.s:47 +.*78:.*addiu.* +.*lineno.s:48 +.*7c:.*sd.* +.*lineno.s:49 +.*80:.*move.* +.*lineno.s:50 +.*84:.*sw.* +.*lineno.s:51 +.*88:.*lw.* +.*lineno.s:52 +.*8c:.*addiu.* +.*lineno.s:53 +.*90:.*move.* +.*lineno.s:54 +.*94:.*b.* +.*98:.*nop + +000000000000009c <\$L2>: +.*lineno.s:56 +.*9c:.*move.* +.*lineno.s:57 +.*a0:.*ld.* +.*lineno.s:58 +.*a4:.*addiu.* +.*lineno.s:59 +.*a8:.*jr.* +.*ac:.*nop diff --git a/gas/testsuite/gas/mips/lineno.s b/gas/testsuite/gas/mips/lineno.s new file mode 100644 index 0000000..531f331 --- /dev/null +++ b/gas/testsuite/gas/mips/lineno.s @@ -0,0 +1,60 @@ + .text + +# some data + .word 0xdeadbeef + .word 0xdeadbeef + .word 0xdeadbeef + .word 0xdeadbeef + +# some real code, compiled from a toy C program + .globl main + .ent main +main: + .frame $fp,32,$31 # vars= 16, regs= 2/0, args= 0, extra= 0 + .mask 0xc0000000,-8 + .fmask 0x00000000,0 + subu $sp,$sp,32 + sd $31,24($sp) + sd $fp,16($sp) + move $fp,$sp + jal __main + li $2,2 # 0x2 + sw $2,0($fp) + lw $2,0($fp) + move $3,$2 + sll $4,$3,1 + addu $2,$4,$2 + sw $2,4($fp) + lw $4,4($fp) + jal g + lw $3,0($fp) + move $2,$3 + b $L1 +$L1: + move $sp,$fp + ld $31,24($sp) + ld $fp,16($sp) + addu $sp,$sp,32 + j $31 + .end main + .align 2 + .globl g + .ent g +g: + .frame $fp,32,$31 # vars= 16, regs= 1/0, args= 0, extra= 0 + .mask 0x40000000,-16 + .fmask 0x00000000,0 + subu $sp,$sp,32 + sd $fp,16($sp) + move $fp,$sp + sw $4,0($fp) + lw $2,0($fp) + addu $3,$2,1 + move $2,$3 + b $L2 +$L2: + move $sp,$fp + ld $fp,16($sp) + addu $sp,$sp,32 + j $31 + .end g |