diff options
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/lns/lns-common-1.d | 29 | ||||
-rw-r--r-- | gas/testsuite/gas/lns/lns-common-1.s | 16 | ||||
-rw-r--r-- | gas/testsuite/gas/lns/lns-diag-1.l | 11 | ||||
-rw-r--r-- | gas/testsuite/gas/lns/lns-diag-1.s | 26 | ||||
-rw-r--r-- | gas/testsuite/gas/lns/lns.exp | 26 |
6 files changed, 114 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index eff92aa..4616c8d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2005-09-07 Richard Henderson <rth@redhat.com> + + * gas/lns/lns.exp: New file. + * gas/lns/lns-common-1.[sd]: New test. + * gas/lns/lns-diag-1.[sl]: New test. + 2005-09-06 Chao-ying Fu <fu@mips.com> * gas/mips/mips.exp: Run MT test for mips32r2 only. diff --git a/gas/testsuite/gas/lns/lns-common-1.d b/gas/testsuite/gas/lns/lns-common-1.d new file mode 100644 index 0000000..bb250e2 --- /dev/null +++ b/gas/testsuite/gas/lns/lns-common-1.d @@ -0,0 +1,29 @@ +#readelf: -wl +#name: lns-common-1 +Dump of debug contents of section \.debug_line: +#... + DWARF Version: 2 + Prologue Length: 28 + Minimum Instruction Length: 1 + Initial value of 'is_stmt': 1 + Line Base: -5 + Line Range: 14 + Opcode Base: 13 +#... + Line Number Statements: + Extended opcode 2: set Address to 0x0 + Copy + Set prologue_end to true + Special opcode 19: advance Address by .* to .* and Line by 0 to 1 + Set epilogue_begin to true + Special opcode 20: advance Address by .* to .* and Line by 1 to 2 + Set ISA to 1 + Set basic block + Special opcode 20: advance Address by .* to .* and Line by 1 to 3 + Set is_stmt to 0 + Special opcode 19: advance Address by .* to .* and Line by 0 to 3 + Set is_stmt to 1 + Special opcode 19: advance Address by .* to .* and Line by 0 to 3 + Advance PC by .* to .* + Extended opcode 1: End of Sequence +#... diff --git a/gas/testsuite/gas/lns/lns-common-1.s b/gas/testsuite/gas/lns/lns-common-1.s new file mode 100644 index 0000000..8d3fec3 --- /dev/null +++ b/gas/testsuite/gas/lns/lns-common-1.s @@ -0,0 +1,16 @@ + .file 1 "foo.c" + .loc 1 1 + nop + .loc prologue_end + nop + .loc epilogue_begin + .loc 1 2 + nop + .loc isa 1 + .loc basic_block + .loc 1 3 + nop + .loc is_stmt 0 + nop + .loc is_stmt 1 + nop diff --git a/gas/testsuite/gas/lns/lns-diag-1.l b/gas/testsuite/gas/lns/lns-diag-1.l new file mode 100644 index 0000000..52207ed --- /dev/null +++ b/gas/testsuite/gas/lns/lns-diag-1.l @@ -0,0 +1,11 @@ +.*: Assembler messages: +.*:2: Error: file number less than one +.*:3: Error: missing string +.*:4: Error: file number 1 already allocated +.*:8: Error: unassigned file number 3 +.*:9: Error: junk at end of line, first unrecognized character is `1' +.*:12: Error: junk at end of line, first unrecognized character is `0' +.*:18: Error: is_stmt value not 0 or 1 +.*:19: Error: bad or irreducible absolute expression +.*:23: Error: isa number less than zero +.*:26: Error: unknown .loc sub-directive frobnitz diff --git a/gas/testsuite/gas/lns/lns-diag-1.s b/gas/testsuite/gas/lns/lns-diag-1.s new file mode 100644 index 0000000..8193559 --- /dev/null +++ b/gas/testsuite/gas/lns/lns-diag-1.s @@ -0,0 +1,26 @@ + .file 1 "foo.c" + .file 0 "bar.c" + .file 2 baz.c + .file 1 "bar.c" + + .loc 1 1 + .loc 1 2 3 + .loc 3 1 + .loc 1 1 1 1 + + .loc basic_block + .loc basic_block 0 + .loc prologue_end + .loc epilogue_begin + + .loc is_stmt 0 + .loc is_stmt 1 + .loc is_stmt 2 + .loc is_stmt foo + + .loc isa 1 + .loc isa 2 + .loc isa -1 + .loc isa 0 + + .loc frobnitz diff --git a/gas/testsuite/gas/lns/lns.exp b/gas/testsuite/gas/lns/lns.exp new file mode 100644 index 0000000..784f9a3 --- /dev/null +++ b/gas/testsuite/gas/lns/lns.exp @@ -0,0 +1,26 @@ +# ??? This probably shouldn't be replicated here... +proc run_list_test { name opts } { + global srcdir subdir + set testname "lns $name" + set file $srcdir/$subdir/$name + gas_run ${name}.s $opts ">&dump.out" + if { [regexp_diff "dump.out" "${file}.l"] } then { + fail $testname + verbose "output is [file_contents "dump.out"]" 2 + return + } + pass $testname +} + +if ![is_elf_format] then { + return +} + +run_list_test "lns-diag-1" "" + +# ??? Won't work on targets that don't have a bare "nop" insn, +# which is only ia64, afaik. Perhaps we could arrange for an +# include file or something that defined a macro... +if ![istarget ia64*-*-*] { + run_dump_test "lns-common-1" +} |