diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-lineno-1.s | 25 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-lineno-1.txt | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-lineno-1a.dd | 24 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-lineno-1a.nd | 8 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-lineno-1b.dd | 16 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix-lineno-1b.nd | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/aix52.exp | 14 |
8 files changed, 105 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index cb7c24e..ebb5120 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com> + * ld-powerpc/aix-lineno-1.s, ld-powerpc/aix-lineno-1.txt, + ld-powerpc/aix-lineno-1a.dd, ld-powerpc/aix-lineno-1a.nd, + ld-powerpc/aix-lineno-1b.dd, ld-powerpc/aix-lineno-1b.nd: New tests. + * ld-powerpc/aix52.exp: Run them. Copy aix-lineno-1.txt to tmpdir. + +2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com> + * ld-powerpc/aix-toc-1.ex, ld-powerpc/aix-toc-1a.s, ld-powerpc/aix-toc-1b.s, ld-powerpc/aix-toc-1-32.dd, ld-powerpc/aix-toc-1-64.dd: New tests. diff --git a/ld/testsuite/ld-powerpc/aix-lineno-1.s b/ld/testsuite/ld-powerpc/aix-lineno-1.s new file mode 100644 index 0000000..196e012 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-lineno-1.s @@ -0,0 +1,25 @@ + .file "tmpdir/aix-lineno-1.txt" + .csect .foo[PR] + .function .foo,.foo +.foo: + .bf 1 + nop + .line 2 + nop + .line 3 + nop + .line 4 + nop + .line 5 + nop + .ef 1 + + .globl .main + .csect .main[PR] + .function .main,.main +.main: + .bf 7 + bl .foo + .line 2 + nop + .ef 7 diff --git a/ld/testsuite/ld-powerpc/aix-lineno-1.txt b/ld/testsuite/ld-powerpc/aix-lineno-1.txt new file mode 100644 index 0000000..0e8dc16 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-lineno-1.txt @@ -0,0 +1,8 @@ +Four +and +twenty +blackbirds +baked +in +a +pie diff --git a/ld/testsuite/ld-powerpc/aix-lineno-1a.dd b/ld/testsuite/ld-powerpc/aix-lineno-1a.dd new file mode 100644 index 0000000..72410c9 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-lineno-1a.dd @@ -0,0 +1,24 @@ + +.* + + +Disassembly of section \.text: + +0*10000000 <\.foo>: +Four + *10000000: 60 00 00 00 (oril r0,r0,0|nop) +and + *10000004: 60 00 00 00 (oril r0,r0,0|nop) +twenty + *10000008: 60 00 00 00 (oril r0,r0,0|nop) +blackbirds + *1000000c: 60 00 00 00 (oril r0,r0,0|nop) +baked + *10000010: 60 00 00 00 (oril r0,r0,0|nop) + +0*10000014 <\.main>: +in +a + *10000014: 4b ff ff ed bl 10000000 <\.foo> +pie + *10000018: 60 00 00 00 (oril r0,r0,0|nop) diff --git a/ld/testsuite/ld-powerpc/aix-lineno-1a.nd b/ld/testsuite/ld-powerpc/aix-lineno-1a.nd new file mode 100644 index 0000000..5e84188 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-lineno-1a.nd @@ -0,0 +1,8 @@ +0*10000000 t \.bf +0*10000014 t \.bf +0*10000014 t \.ef +0*1000001c t \.ef +0*10000000 t \.foo +0*10000000 t \.foo +0*10000014 t \.main +0*10000014 T \.main diff --git a/ld/testsuite/ld-powerpc/aix-lineno-1b.dd b/ld/testsuite/ld-powerpc/aix-lineno-1b.dd new file mode 100644 index 0000000..64c08df --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-lineno-1b.dd @@ -0,0 +1,16 @@ + +.* + + +Disassembly of section \.text: + +0*10000000 <\.foo>: + *10000000: 60 00 00 00 (oril r0,r0,0|nop) + *10000004: 60 00 00 00 (oril r0,r0,0|nop) + *10000008: 60 00 00 00 (oril r0,r0,0|nop) + *1000000c: 60 00 00 00 (oril r0,r0,0|nop) + *10000010: 60 00 00 00 (oril r0,r0,0|nop) + +0*10000014 <\.main>: + *10000014: 4b ff ff ed bl 10000000 <\.foo> + *10000018: 60 00 00 00 (oril r0,r0,0|nop) diff --git a/ld/testsuite/ld-powerpc/aix-lineno-1b.nd b/ld/testsuite/ld-powerpc/aix-lineno-1b.nd new file mode 100644 index 0000000..d341470 --- /dev/null +++ b/ld/testsuite/ld-powerpc/aix-lineno-1b.nd @@ -0,0 +1,3 @@ +0*10000000 t \.foo +0*10000014 t \.main +0*10000014 T \.main diff --git a/ld/testsuite/ld-powerpc/aix52.exp b/ld/testsuite/ld-powerpc/aix52.exp index 247b2d1..2178316 100644 --- a/ld/testsuite/ld-powerpc/aix52.exp +++ b/ld/testsuite/ld-powerpc/aix52.exp @@ -64,6 +64,10 @@ proc run_aix_test { size name ldopts asopts sources tools output } { $output]] } +foreach file { "aix-lineno-1.txt" } { + remote_upload host "$srcdir/$subdir/$file" "tmpdir/$file" +} + set aix52tests { {"Absolute branch test 1" "-shared -bI:aix-abs-branch-1.im -bE:aix-abs-branch-1.ex" @@ -98,6 +102,16 @@ set aix52tests { {{objdump {-D -j.text -j.data} aix-glink-1-SIZE.dd}} "aix-glink-1.so"} + {"Line number test 1 (no discards)" "-e.main" + "" {aix-lineno-1.s} + {{objdump -dS aix-lineno-1a.dd} {nm {} aix-lineno-1a.nd}} + "aix-lineno-1a.exe"} + + {"Line number test 1 (discard locals)" "-e.main -x" + "" {aix-lineno-1.s} + {{objdump -dS aix-lineno-1b.dd} {nm {} aix-lineno-1b.nd}} + "aix-lineno-1b.exe"} + {"TOC test 1" "-shared -bE:aix-toc-1.ex" "" {aix-toc-1a.s aix-toc-1b.s} {{objdump -dr aix-toc-1-SIZE.dd}} |