* gas/d10v/instruction_packing-005.d: Adjust.
authorAlan Modra <amodra@gmail.com>
Mon, 21 Feb 2005 10:07:08 +0000 (10:07 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 21 Feb 2005 10:07:08 +0000 (10:07 +0000)
* gas/d10v/instruction_packing-008.d: Ignore disassembled stabs.
* gas/d10v/instruction_packing-009.d: Likewise.
* gas/d10v/instruction_packing-010.d: Likewise.
* gas/d10v/warning-001.d: Use #warning instead of #error.
* gas/d10v/warning-002.d: Likewise.
* gas/d10v/warning-003.d: Likewise.
* gas/d10v/warning-004.d: Likewise.
* gas/d10v/warning-005.d: Likewise.
* gas/d10v/warning-006.d: Likewise.
* gas/d10v/warning-007.d: Likewise.
* gas/d10v/warning-008.d: Likewise.
* gas/d10v/warning-009.d: Likewise.
* gas/d10v/warning-010.d: Likewise.
* gas/d10v/warning-011.d: Likewise.
* gas/d10v/warning-012.d: Likewise.
* gas/d10v/warning-013.d: Likewise.
* gas/d10v/warning-015.d: Likewise.
* gas/d10v/warning-016.d: Likewise.
* gas/d10v/warning-017.d: Likewise.
* gas/d10v/warning-018.d: Likewise.
* gas/d10v/warning-019.d: Likewise.
* lib/gas-defs.exp (run_dump_test): Don't require a dump program if
#warning given.  Rearrange to allow $program to remain unset.
Fail the test if warning not found when expected.  Conversely fail
the test if assembler errors or warnings given when not expected.

24 files changed:
gas/testsuite/ChangeLog
gas/testsuite/gas/d10v/instruction_packing-005.d
gas/testsuite/gas/d10v/instruction_packing-008.d
gas/testsuite/gas/d10v/instruction_packing-009.d
gas/testsuite/gas/d10v/instruction_packing-010.d
gas/testsuite/gas/d10v/warning-001.d
gas/testsuite/gas/d10v/warning-002.d
gas/testsuite/gas/d10v/warning-003.d
gas/testsuite/gas/d10v/warning-004.d
gas/testsuite/gas/d10v/warning-005.d
gas/testsuite/gas/d10v/warning-006.d
gas/testsuite/gas/d10v/warning-007.d
gas/testsuite/gas/d10v/warning-008.d
gas/testsuite/gas/d10v/warning-009.d
gas/testsuite/gas/d10v/warning-010.d
gas/testsuite/gas/d10v/warning-011.d
gas/testsuite/gas/d10v/warning-012.d
gas/testsuite/gas/d10v/warning-013.d
gas/testsuite/gas/d10v/warning-015.d
gas/testsuite/gas/d10v/warning-016.d
gas/testsuite/gas/d10v/warning-017.d
gas/testsuite/gas/d10v/warning-018.d
gas/testsuite/gas/d10v/warning-019.d
gas/testsuite/lib/gas-defs.exp

index 8e1b1b702ce5806043a3b6ffaf080db9d2bcb3e9..eec0315afcfdab82744e4b40a7444b349feaa572 100644 (file)
@@ -1,3 +1,32 @@
+2005-02-21  Alan Modra  <amodra@bigpond.net.au>
+
+       * gas/d10v/instruction_packing-005.d: Adjust.
+       * gas/d10v/instruction_packing-008.d: Ignore disassembled stabs.
+       * gas/d10v/instruction_packing-009.d: Likewise.
+       * gas/d10v/instruction_packing-010.d: Likewise.
+       * gas/d10v/warning-001.d: Use #warning instead of #error.
+       * gas/d10v/warning-002.d: Likewise.
+       * gas/d10v/warning-003.d: Likewise.
+       * gas/d10v/warning-004.d: Likewise.
+       * gas/d10v/warning-005.d: Likewise.
+       * gas/d10v/warning-006.d: Likewise.
+       * gas/d10v/warning-007.d: Likewise.
+       * gas/d10v/warning-008.d: Likewise.
+       * gas/d10v/warning-009.d: Likewise.
+       * gas/d10v/warning-010.d: Likewise.
+       * gas/d10v/warning-011.d: Likewise.
+       * gas/d10v/warning-012.d: Likewise.
+       * gas/d10v/warning-013.d: Likewise.
+       * gas/d10v/warning-015.d: Likewise.
+       * gas/d10v/warning-016.d: Likewise.
+       * gas/d10v/warning-017.d: Likewise.
+       * gas/d10v/warning-018.d: Likewise.
+       * gas/d10v/warning-019.d: Likewise.
+       * lib/gas-defs.exp (run_dump_test): Don't require a dump program if
+       #warning given.  Rearrange to allow $program to remain unset.
+       Fail the test if warning not found when expected.  Conversely fail
+       the test if assembler errors or warnings given when not expected.
+
 2005-02-18  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
 
        * gas/mips/noat-1.s, gas/mips/noat-1.d, gas/mips/noat-2.s,
index 71ed975fc9ddb4664eaf58deef2c48ed174e3867..0129b7140aa29bcc605b51bd87af2c1182e844d2 100644 (file)
@@ -25,5 +25,5 @@ Disassembly of section .text:
 Disassembly of section .data:
 
 00000000 <in_data>:
-   0:  Address 0x0 is out of bounds.
+   0:  Address 0x0+ is out of bounds.
 
index 22db4809d2e8bba66d5ad24ffe986d302c257949..1845950fdb7b1cb82a68ad5aca31ab260c1fc209 100644 (file)
@@ -12,3 +12,4 @@ Disassembly of section .text:
    8:  60 22 c0 67     ldi.s   r2, 0x2 ->      ldi.s   r3, 0x3
    c:  e0 40 40 00     ldi.l   r4, 0x4000
   10:  60 55 cc 1a     ldi.s   r5, 0x5 ->      jmp     r13
+#pass
index 327ea3e5da43ea1f09f8d37fca972500979a7f55..b81df4f1b9e007ff5052cb1a38355266920266cd 100644 (file)
@@ -14,3 +14,4 @@ Disassembly of section .text:
   10:  e0 40 40 00     ldi.l   r4, 0x4000
   14:  20 55 de 00     ldi.s   r5, 0x5 ||      nop     
   18:  26 0d 5e 00     jmp     r13     ||      nop     
+#pass
index aba360e607f866bb24a62f115594aaa7e2a25f9c..227540191e388507aee9915bb00dd2f556eb9787 100644 (file)
@@ -12,3 +12,4 @@ Disassembly of section .text:
    8:  60 22 c0 67     ldi.s   r2, 0x2 ->      ldi.s   r3, 0x3
    c:  e0 40 40 00     ldi.l   r4, 0x4000
   10:  60 55 cc 1a     ldi.s   r5, 0x5 ->      jmp     r13
+#pass
index 5ef473c36e2eca133fe8a6a039ea58d5d5a1f254..1f120426edf8930eeb453b3c4a2aa09fd239c1ea 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-001.s
-#error : cr6 is a reserved control register
+#warning : cr6 is a reserved control register
index c331e6915159905b18fbf667d1548cae3eee2c48..c62eae69b6e77d6d6ab36cbd14c4a794119646f7 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-002.s
-#error : cr6 is a reserved control register
+#warning : cr6 is a reserved control register
index 4282e13b0de39ddb5b73696e0b402a40c82a7e45..e155d561b1d03c19c224eafb76ae09f37ca15531 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-003.s
-#error : cr12 is a reserved control register
+#warning : cr12 is a reserved control register
index 193a843277e7303312d388908f7e60b734475de7..46f8e2eb8a1d5251b71cd0b122b2053736b387d9 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-004.s
-#error : cr12 is a reserved control register
+#warning : cr12 is a reserved control register
index 77592712a2cdbeabce85bc4a8af5eb84abd4dc24..4fcae03d9acb82f8c9e36ad8ad930be9c02fcc89 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-005.s
-#error : Warning: cr13 is a reserved control register
+#warning : Warning: cr13 is a reserved control register
index 50656fb797caa933ad9f166dc36cb0d8747606d3..e398fd97b644044d53c96f670e8ecc3200fe9877 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-006.s
-#error : cr13 is a reserved control register
+#warning : cr13 is a reserved control register
index 1ab4879dd23509ab15e03e597bf8e3fb86995b5e..b5b92e88b59b89a12c8720c49193e21b8c77b501 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-007.s
-#error : Warning: cr13 is a reserved control register
+#warning : Warning: cr13 is a reserved control register
index 30211ab297784de833e48e2c7b9329ff9aebd929..911934b95800c3cb578c44ee03af90114426e141 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-008.s
-#error : cr15 is a reserved control register
+#warning : cr15 is a reserved control register
index 695fc77b9caf071eef6e301c6f707c8ec7fc6d85..b11666ca6b36e4cfa26f52119d9077748d2d7314 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-009.s
-#error : cr15 is a reserved control register
+#warning : cr15 is a reserved control register
index 44e1e30e515dc3cd9f0f0cdf24a850ad15b9e1c4..d5825c671e4745cee5b2501749cdd095bc1499c5 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-010.s
-#error : cr4 is a reserved control register
+#warning : cr4 is a reserved control register
index 12a3c04bcd1985906abd2be56ddc2d6846d7b164..cf1a54b59a0777b072ee0a92f17de6355f85a41d 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-011.s
-#error : cr4 is a reserved control register
+#warning : cr4 is a reserved control register
index 2e4dcbb8feb594b1de3b6596f539c3319ea3bb46..8a17f47a0226329730bd498835327f9a7cf82933 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-012.s
-#error : cr5 is a reserved control register
+#warning : cr5 is a reserved control register
index 86754289f436298640a9fc6ea6eb569516a9c992..6da2bb3d6032bac5b33e5cc37379e0ec106b7ef3 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-013.s
-#error : cr5 is a reserved control register
+#warning : cr5 is a reserved control register
index ff4a97ca994befa091772b275e48488769c65ba8..6725d012b71f5f4c243dd1eb88400cc468fb5a90 100644 (file)
@@ -1,2 +1,2 @@
 #source: instruction_packing-002.s
-#error : Warning: resource conflict \(C flag\)
+#warning : Warning: resource conflict \(C flag\)
index f833369cc32767ed250d94fa76c80740863754c7..cd19f0fb5b1e08c085e14428aa67aef1865af69f 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-016.s
-#error : Warning: resource conflict \(F flag\)
+#warning : Warning: resource conflict \(F flag\)
index a8aed683c213b908cedd6351df6f30c354fc11f9..34134cc9719881a94e3da90013bc1d936c3aa78b 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-017.s
-#error : Warning: resource conflict \(C flag\)
+#warning : Warning: resource conflict \(C flag\)
index 40b1106182ee080538fb3f1059617d1e83780a6b..5c5e7108cae5bed79ecb74d6fe86d5f73935096b 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-018.s
-#error : Warning: resource conflict \(C flag\)
+#warning : Warning: resource conflict \(C flag\)
index 6388751887747315a7e702f3a7083da15b42ac3b..cf05c54e89d6c9300364145d930e46dbd9cc3db6 100644 (file)
@@ -1,2 +1,2 @@
 #source: warning-019.s
-#error : Warning: resource conflict \(R0\)
+#warning : Warning: resource conflict \(R0\)
index 9498437f750de8953f0c788484f9ea7763faa77d..9f933734bb901b131f9abda68ce6d0093069fdfa 100644 (file)
@@ -1,5 +1,5 @@
-# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+# 2004, 2005 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -371,59 +371,48 @@ proc run_dump_test { name {extra_options {}} } {
        append opts($opt_name) $opt_val
     }
 
-    if {$opts(PROG) != ""} {
-       switch -- $opts(PROG) {
-           objdump
-               { set program objdump }
-           nm
-               { set program nm }
-           objcopy
-               { set program objcopy }
-           readelf
-               { set program readelf }
-           default
-               { perror "unrecognized program option $opts(PROG) in $file.d"
-                 unresolved $subdir/$name
-                 return }
-       }
-    } elseif { $opts(error) != "" } {
-       # It's meaningless to require an output-testing method when we
-       # expect an error.  For simplicity, we fake an arbitrary method.
-       set program "nm"
-    } else {
-       # Guess which program to run, by seeing which option was specified.
-       set program ""
-       foreach p {objdump objcopy nm readelf} {
-           if {$opts($p) != ""} {
-               if {$program != ""} {
-                   perror "ambiguous dump program in $file.d"
+    if { (($opts(warning) != "") && ($opts(error) != "")) \
+        || (($opts(warning) != "") && ($opts(stderr) != "")) } {
+       perror "$testname: bad mix of stderr, error and warning test-directives"
+       return
+    }
+
+    set program ""
+    # It's meaningless to require an output-testing method when we
+    # expect an error.
+    if { $opts(error) == "" } {
+       if {$opts(PROG) != ""} {
+           switch -- $opts(PROG) {
+               objdump { set program objdump }
+               nm      { set program nm }
+               objcopy { set program objcopy }
+               readelf { set program readelf }
+               default {
+                   perror "unrecognized program option $opts(PROG) in $file.d"
                    unresolved $subdir/$name
-                   return
-               } else {
-                   set program $p
+                   return }
+           }
+       } else {
+           # Guess which program to run, by seeing which option was specified.
+           foreach p {objdump objcopy nm readelf} {
+               if {$opts($p) != ""} {
+                   if {$program != ""} {
+                       perror "ambiguous dump program in $file.d"
+                       unresolved $subdir/$name
+                       return
+                   } else {
+                       set program $p
+                   }
                }
            }
        }
-       if {$program == ""} {
+       if { $program == "" && $opts(warning) == "" } {
            perror "dump program unspecified in $file.d"
            unresolved $subdir/$name
            return
        }
     }
 
-    set expmsg $opts(error)
-    if { $opts(warning) != "" } {
-       set expmsg $opts(warning)
-    }
-    if { (($opts(warning) != "") && ($opts(error) != "")) \
-        || (($opts(warning) != "") && ($opts(stderr) != "")) } {
-       perror "$testname: bad mix of stderr, error and warning test-directives"
-       return
-    }
-
-    set progopts1 $opts($program)
-    eval set progopts \$[string toupper $program]FLAGS
-    eval set binary \$[string toupper $program]
     if { $opts(name) == "" } {
        set testname "$subdir/$name"
     } else {
@@ -441,7 +430,11 @@ proc run_dump_test { name {extra_options {}} } {
     set cmdret [catch "exec $cmd" comp_output]
     set comp_output [prune_warnings $comp_output]
 
-    if { $cmdret != 0 || $comp_output != "" || $opts(stderr) != "" } then {
+    set expmsg $opts(error)
+    if { $opts(warning) != "" } {
+       set expmsg $opts(warning)
+    }
+    if { $cmdret != 0 || $comp_output != "" || $expmsg != "" } then {
        # If the executed program writes to stderr and stderr is not
        # redirected, exec *always* returns failure, regardless of the
        # program exit code.  Thankfully, we can retrieve the true
@@ -460,18 +453,17 @@ proc run_dump_test { name {extra_options {}} } {
            send_log "$comp_output\n"
            verbose "$comp_output" 3
 
-           if { $expmsg != "" \
-                   && [regexp $expmsg $comp_output] \
+           if { [regexp $expmsg $comp_output] \
                    && (($cmdret == 0) == ($opts(warning) != "")) } {
-               verbose -log "$exitstat with: <$comp_output>, expected: <$expmsg>"
-
-               # Only "pass" and return here if we expected (and got)
-               # an error.
-               if { $opts(error) != "" } {
+               # We have the expected output from gas.
+               # Return if there's nothing more to do.
+               if { $opts(error) != "" || $program == "" } {
                    pass $testname
                    return
                }
-           } {
+           } else {
+               verbose -log "$exitstat with: <$comp_output>, expected: <$expmsg>"
+
                fail $testname
                return
            }
@@ -503,6 +495,13 @@ proc run_dump_test { name {extra_options {}} } {
        }
     }
 
+    if { $program == "" } {
+       return
+    }
+    set progopts1 $opts($program)
+    eval set progopts \$[string toupper $program]FLAGS
+    eval set binary \$[string toupper $program]
+
     if { [which $binary] == 0 } {
        untested $testname
        return
This page took 0.052341 seconds and 4 git commands to generate.