* ld-empic/empic.exp: Update for changes in objdump output.
authorIan Lance Taylor <ian@airs.com>
Tue, 21 Nov 1995 21:06:55 +0000 (21:06 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 21 Nov 1995 21:06:55 +0000 (21:06 +0000)
ld/testsuite/ChangeLog
ld/testsuite/ld-empic/empic.exp

index 8d043d17bb5f0add6b2ec10d5e750d357c9fb2db..8430fdf2424259d53693b7fafc362079ceb0355a 100644 (file)
@@ -1,3 +1,14 @@
+Tue Nov 21 16:05:53 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * ld-empic/empic.exp: Update for changes in objdump output.
+
+Wed Nov 15 17:42:48 1995  Ian Lance Taylor  <ian@cygnus.com>
+
+       * ld-srec/srec.exp: New tests.
+       * ld-srec/sr1.c, ld-srec/sr2.c, ld-srec/sr3.cc: New files.
+       * lib/ld.exp (ld_simple_link): Discard warnings about not being
+       able to find the entry symbol.
+
 Tue Nov 14 20:03:54 1995  Ian Lance Taylor  <ian@cygnus.com>
 
        * ld-sh/sh2.c (__main): Define.
index 937f01aac8fd9bb6b20f2a973dfa9a85306b0a42..f04bbde9d8a6a67d19aa028a4e9881e02bf82c20 100644 (file)
@@ -99,6 +99,7 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir$subdir/relax.t tmpdir/r
            # This is a straight function call.  All function calls in
            # this example are to either foo or bar.
            if "0x$dest != $nm_output(foo) && 0x$dest != $nm_output(bar)" {
+               send_log "fail 1\n"
                send_log "$line\n"
                fail $testname
                return
@@ -109,6 +110,7 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir$subdir/relax.t tmpdir/r
            # Otherwise, it should be lui, and the next instruction
            # should be an addiu, followed by an addu to $31.
            if { [gets $file l] == -1 } {
+               send_log "fail 2\n"
                send_log "$line\n"
                fail $testname
                return
@@ -119,6 +121,7 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir$subdir/relax.t tmpdir/r
                continue
            }
            if ![regexp "lui (\[\$a-z0-9\]+),(\[0-9\]+)" $l whole reg upper] {
+               send_log "fail 3\n"
                send_log "$line\n"
                send_log "$l\n"
                fail $testname
@@ -126,12 +129,14 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir$subdir/relax.t tmpdir/r
            }
 
            if { [gets $file l] == -1 } {
+               send_log "fail 4\n"
                send_log "$line\n"
                fail $testname
                return
            }
            verbose "$l"
            if ![regexp "addiu \\$reg,\\$reg,(\[-0-9\]+)" $l whole lower] {
+               send_log "fail 5\n"
                send_log "$line\n"
                send_log "$l\n"
                send_log "addiu \\$reg,\\$reg,(\[-0-9\]+)\n"
@@ -140,12 +145,14 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir$subdir/relax.t tmpdir/r
            }
 
            if { [gets $file l] == -1 } {
+               send_log "fail 6\n"
                send_log "$line\n"
                fail $testname
                return
            }
            verbose "$l"
            if ![regexp "addu \\$reg,\\$reg,\\\$ra" $l] {
+               send_log "fail 7\n"
                send_log "$line\n"
                send_log "$l\n"
                fail $testname
@@ -157,6 +164,7 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir$subdir/relax.t tmpdir/r
            # function, and the next line can be anything.
 
            if { [gets $file l] == -1 } {
+               send_log "fail 8\n"
                send_log "$line\n"
                fail $testname
                return
@@ -165,18 +173,25 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir$subdir/relax.t tmpdir/r
            if [string match "*jalr*" $l] {
                set dest [expr 0x$addr + 8 + ($upper << 16) + $lower]
                if { $dest != $nm_output(foo) && $dest != $nm_output(bar) } {
+                   send_log "fail 9\n"
                    send_log "$line\n"
                    fail $testname
                    return
                }
            } else {
                set dest [expr ($upper << 16) + $lower]
-               if ![regexp "<\[a-z\]+\\+(\[0-9a-fA-F\]+)>" $label whole offset] {
+               if ![regexp "<(\[.a-z\]+)\\+(\[0-9a-fA-F\]+)>" $label whole base offset] {
+                   send_log "fail 10\n"
                    send_log "$line\n"
                    fail $testname
                    return
                }
-               if "0x$offset + 8 != - $dest" {
+               set offset 0x$offset
+               if { $base == ".foo" } {
+                   set offset [expr $offset - ($nm_output(foo) - 0x30)]
+               }
+               if { $offset + 8 != - $dest } {
+                   send_log "fail 11\n"
                    send_log "$line\n"
                    fail $testname
                    return
@@ -188,6 +203,7 @@ if ![ld_simple_link $ld tmpdir/relax "--relax -T $srcdir$subdir/relax.t tmpdir/r
     close $file
 
     if {$balcnt < 10} {
+       send_log "fail 12\n"
        fail $testname
     } else {
        verbose "$balcnt bal instructions"