mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
* 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.
This commit is contained in:
@ -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>
|
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,
|
* gas/mips/noat-1.s, gas/mips/noat-1.d, gas/mips/noat-2.s,
|
||||||
|
@ -25,5 +25,5 @@ Disassembly of section .text:
|
|||||||
Disassembly of section .data:
|
Disassembly of section .data:
|
||||||
|
|
||||||
00000000 <in_data>:
|
00000000 <in_data>:
|
||||||
0: Address 0x0 is out of bounds.
|
0: Address 0x0+ is out of bounds.
|
||||||
|
|
||||||
|
@ -12,3 +12,4 @@ Disassembly of section .text:
|
|||||||
8: 60 22 c0 67 ldi.s r2, 0x2 -> ldi.s r3, 0x3
|
8: 60 22 c0 67 ldi.s r2, 0x2 -> ldi.s r3, 0x3
|
||||||
c: e0 40 40 00 ldi.l r4, 0x4000
|
c: e0 40 40 00 ldi.l r4, 0x4000
|
||||||
10: 60 55 cc 1a ldi.s r5, 0x5 -> jmp r13
|
10: 60 55 cc 1a ldi.s r5, 0x5 -> jmp r13
|
||||||
|
#pass
|
||||||
|
@ -14,3 +14,4 @@ Disassembly of section .text:
|
|||||||
10: e0 40 40 00 ldi.l r4, 0x4000
|
10: e0 40 40 00 ldi.l r4, 0x4000
|
||||||
14: 20 55 de 00 ldi.s r5, 0x5 || nop
|
14: 20 55 de 00 ldi.s r5, 0x5 || nop
|
||||||
18: 26 0d 5e 00 jmp r13 || nop
|
18: 26 0d 5e 00 jmp r13 || nop
|
||||||
|
#pass
|
||||||
|
@ -12,3 +12,4 @@ Disassembly of section .text:
|
|||||||
8: 60 22 c0 67 ldi.s r2, 0x2 -> ldi.s r3, 0x3
|
8: 60 22 c0 67 ldi.s r2, 0x2 -> ldi.s r3, 0x3
|
||||||
c: e0 40 40 00 ldi.l r4, 0x4000
|
c: e0 40 40 00 ldi.l r4, 0x4000
|
||||||
10: 60 55 cc 1a ldi.s r5, 0x5 -> jmp r13
|
10: 60 55 cc 1a ldi.s r5, 0x5 -> jmp r13
|
||||||
|
#pass
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-001.s
|
#source: warning-001.s
|
||||||
#error : cr6 is a reserved control register
|
#warning : cr6 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-002.s
|
#source: warning-002.s
|
||||||
#error : cr6 is a reserved control register
|
#warning : cr6 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-003.s
|
#source: warning-003.s
|
||||||
#error : cr12 is a reserved control register
|
#warning : cr12 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-004.s
|
#source: warning-004.s
|
||||||
#error : cr12 is a reserved control register
|
#warning : cr12 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-005.s
|
#source: warning-005.s
|
||||||
#error : Warning: cr13 is a reserved control register
|
#warning : Warning: cr13 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-006.s
|
#source: warning-006.s
|
||||||
#error : cr13 is a reserved control register
|
#warning : cr13 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-007.s
|
#source: warning-007.s
|
||||||
#error : Warning: cr13 is a reserved control register
|
#warning : Warning: cr13 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-008.s
|
#source: warning-008.s
|
||||||
#error : cr15 is a reserved control register
|
#warning : cr15 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-009.s
|
#source: warning-009.s
|
||||||
#error : cr15 is a reserved control register
|
#warning : cr15 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-010.s
|
#source: warning-010.s
|
||||||
#error : cr4 is a reserved control register
|
#warning : cr4 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-011.s
|
#source: warning-011.s
|
||||||
#error : cr4 is a reserved control register
|
#warning : cr4 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-012.s
|
#source: warning-012.s
|
||||||
#error : cr5 is a reserved control register
|
#warning : cr5 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-013.s
|
#source: warning-013.s
|
||||||
#error : cr5 is a reserved control register
|
#warning : cr5 is a reserved control register
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: instruction_packing-002.s
|
#source: instruction_packing-002.s
|
||||||
#error : Warning: resource conflict \(C flag\)
|
#warning : Warning: resource conflict \(C flag\)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-016.s
|
#source: warning-016.s
|
||||||
#error : Warning: resource conflict \(F flag\)
|
#warning : Warning: resource conflict \(F flag\)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-017.s
|
#source: warning-017.s
|
||||||
#error : Warning: resource conflict \(C flag\)
|
#warning : Warning: resource conflict \(C flag\)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-018.s
|
#source: warning-018.s
|
||||||
#error : Warning: resource conflict \(C flag\)
|
#warning : Warning: resource conflict \(C flag\)
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#source: warning-019.s
|
#source: warning-019.s
|
||||||
#error : Warning: resource conflict \(R0\)
|
#warning : Warning: resource conflict \(R0\)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
# Copyright (C) 1993, 1994, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||||
# Free Software Foundation, Inc.
|
# 2004, 2005 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -371,28 +371,29 @@ proc run_dump_test { name {extra_options {}} } {
|
|||||||
append opts($opt_name) $opt_val
|
append opts($opt_name) $opt_val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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) != ""} {
|
if {$opts(PROG) != ""} {
|
||||||
switch -- $opts(PROG) {
|
switch -- $opts(PROG) {
|
||||||
objdump
|
objdump { set program objdump }
|
||||||
{ set program objdump }
|
nm { set program nm }
|
||||||
nm
|
objcopy { set program objcopy }
|
||||||
{ set program nm }
|
readelf { set program readelf }
|
||||||
objcopy
|
default {
|
||||||
{ set program objcopy }
|
perror "unrecognized program option $opts(PROG) in $file.d"
|
||||||
readelf
|
|
||||||
{ set program readelf }
|
|
||||||
default
|
|
||||||
{ perror "unrecognized program option $opts(PROG) in $file.d"
|
|
||||||
unresolved $subdir/$name
|
unresolved $subdir/$name
|
||||||
return }
|
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 {
|
} else {
|
||||||
# Guess which program to run, by seeing which option was specified.
|
# Guess which program to run, by seeing which option was specified.
|
||||||
set program ""
|
|
||||||
foreach p {objdump objcopy nm readelf} {
|
foreach p {objdump objcopy nm readelf} {
|
||||||
if {$opts($p) != ""} {
|
if {$opts($p) != ""} {
|
||||||
if {$program != ""} {
|
if {$program != ""} {
|
||||||
@ -404,26 +405,14 @@ proc run_dump_test { name {extra_options {}} } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if {$program == ""} {
|
}
|
||||||
|
if { $program == "" && $opts(warning) == "" } {
|
||||||
perror "dump program unspecified in $file.d"
|
perror "dump program unspecified in $file.d"
|
||||||
unresolved $subdir/$name
|
unresolved $subdir/$name
|
||||||
return
|
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) == "" } {
|
if { $opts(name) == "" } {
|
||||||
set testname "$subdir/$name"
|
set testname "$subdir/$name"
|
||||||
} else {
|
} else {
|
||||||
@ -441,7 +430,11 @@ proc run_dump_test { name {extra_options {}} } {
|
|||||||
set cmdret [catch "exec $cmd" comp_output]
|
set cmdret [catch "exec $cmd" comp_output]
|
||||||
set comp_output [prune_warnings $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
|
# If the executed program writes to stderr and stderr is not
|
||||||
# redirected, exec *always* returns failure, regardless of the
|
# redirected, exec *always* returns failure, regardless of the
|
||||||
# program exit code. Thankfully, we can retrieve the true
|
# 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"
|
send_log "$comp_output\n"
|
||||||
verbose "$comp_output" 3
|
verbose "$comp_output" 3
|
||||||
|
|
||||||
if { $expmsg != "" \
|
if { [regexp $expmsg $comp_output] \
|
||||||
&& [regexp $expmsg $comp_output] \
|
|
||||||
&& (($cmdret == 0) == ($opts(warning) != "")) } {
|
&& (($cmdret == 0) == ($opts(warning) != "")) } {
|
||||||
verbose -log "$exitstat with: <$comp_output>, expected: <$expmsg>"
|
# We have the expected output from gas.
|
||||||
|
# Return if there's nothing more to do.
|
||||||
# Only "pass" and return here if we expected (and got)
|
if { $opts(error) != "" || $program == "" } {
|
||||||
# an error.
|
|
||||||
if { $opts(error) != "" } {
|
|
||||||
pass $testname
|
pass $testname
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} {
|
} else {
|
||||||
|
verbose -log "$exitstat with: <$comp_output>, expected: <$expmsg>"
|
||||||
|
|
||||||
fail $testname
|
fail $testname
|
||||||
return
|
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 } {
|
if { [which $binary] == 0 } {
|
||||||
untested $testname
|
untested $testname
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user