diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2010-12-09 23:57:22 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2010-12-09 23:57:22 +0000 |
commit | 738f4d98b409bad654486d6c1db037f2e320535a (patch) | |
tree | ff3e6a5489959af6d652091db25b941f58477ef5 /binutils | |
parent | c7af42732698afc889b4d53944a44c7ea4a7613f (diff) | |
download | gdb-738f4d98b409bad654486d6c1db037f2e320535a.zip gdb-738f4d98b409bad654486d6c1db037f2e320535a.tar.gz gdb-738f4d98b409bad654486d6c1db037f2e320535a.tar.bz2 |
gas/
* config/tc-mips.c (file_ase_mips16): Adjust comment.
(append_insn): Update file_ase_mips16.
(mips_after_parse_args): Don't set file_ase_mips16 here.
gas/testsuite/
* gas/mips/elf_ase_mips16.d: Update test for new MIPS16 ASE flag
semantics.
* gas/mips/elf_ase_mips16-2.d: New test.
* gas/mips/nop.s: Source for the new test.
* gas/mips/mips.exp: Run the new test.
binutils/testsuite/
* lib/binutils-common.exp (regexp_diff): Implement inverse
matching, requested by `!'.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/testsuite/lib/binutils-common.exp | 25 |
2 files changed, 22 insertions, 8 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog index e044acc..1e5801b 100644 --- a/binutils/testsuite/ChangeLog +++ b/binutils/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-12-09 Maciej W. Rozycki <macro@codesourcery.com> + + * lib/binutils-common.exp (regexp_diff): Implement inverse + matching, requested by `!'. + 2010-11-20 Richard Sandiford <rdsandiford@googlemail.com> * lib/binutils-common.exp (regexp_diff): New procedure. diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp index 2f8b426..424ca3d 100644 --- a/binutils/testsuite/lib/binutils-common.exp +++ b/binutils/testsuite/lib/binutils-common.exp @@ -167,7 +167,9 @@ proc is_elf64 { binary_file } { # REGEXP # Skip all lines in FILE_1 until the first that matches REGEXP. # -# Other # lines are comments. Skip empty lines in both files. +# Other # lines are comments. Regexp lines starting with the `!' character +# specify inverse matching (use `\!' for literal matching against a leading +# `!'). Skip empty lines in both files. # # The first optional argument is a list of regexp substitutions of the form: # @@ -235,12 +237,15 @@ proc regexp_diff { file_1 file_2 args } { set diff_pass 1 break } + set negated [expr { [string index $line_b 0] eq "!" }] + set line_bx [string range $line_b $negated end] + set n [expr { $negated ? "! " : "" }] # Substitute on the reference. foreach {name value} $ref_subst { - regsub -- $name $line_b $value line_b + regsub -- $name $line_bx $value line_bx } - verbose "looking for \"^$line_b$\"" 3 - while { ![regexp "^$line_b$" "$line_a"] } { + verbose "looking for $n\"^$line_bx$\"" 3 + while { [expr [regexp "^$line_bx$" "$line_a"] == $negated] } { verbose "skipping \"$line_a\"" 3 if { [gets $file_a line_a] == $eof } { set end_1 1 @@ -270,14 +275,18 @@ proc regexp_diff { file_1 file_2 args } { set differences 1 break } else { + set negated [expr { [string index $line_b 0] eq "!" }] + set line_bx [string range $line_b $negated end] + set n [expr { $negated ? "! " : "" }] + set s [expr { $negated ? " " : "" }] # Substitute on the reference. foreach {name value} $ref_subst { - regsub -- $name $line_b $value line_b + regsub -- $name $line_bx $value line_bx } - verbose "regexp \"^$line_b$\"\nline \"$line_a\"" 3 - if { ![regexp "^$line_b$" "$line_a"] } { + verbose "regexp $n\"^$line_bx$\"\nline \"$line_a\"" 3 + if { [expr [regexp "^$line_bx$" "$line_a"] == $negated] } { send_log "regexp_diff match failure\n" - send_log "regexp \"^$line_b$\"\nline \"$line_a\"\n" + send_log "regexp $n\"^$line_bx$\"\nline $s\"$line_a\"\n" verbose "regexp_diff match failure\n" 3 set differences 1 } |