On Mon, 2014-06-23 at 03:31 -0700, Matthew Fortune wrote:
> > > Recommendations on how to rework the mips.exp logic to cope with this > > > would be appreciated. > > > > Could you give an example of the kind of thing you mean? > > You have actually covered the cases I was concerned about below. The > problem cases are those tests that already have a isa/isa_rev >= ... > > > If tests really do need r5 or earlier, we should enforce that in the > > dg-options. E.g. for conditional moves we should add an isa_rev > > limit to the existing tests and add new ones with isa_rev>=6. > > OK. Steve has actually been working on this in parallel to the > review and has taken this approach. > > > I suppose we'll need a way of specifying an isa_rev range, say > > "isa_rev=2-5". That should be a fairly localised change though. > > There appear to be about 9 tests that are not fixed by educating mips.exp > about flags which are not supported on R6. Steve has initially dealt with > these via forbid_cpu=mips.*r6 but I guess it would be cleaner to try and > support an isa_rev range. I'll see we can club together enough tcl skills > to write it :-) Here is a change to mips.exp to support a range for isa or isa_rev. This takes care of problems like madd-3.c where I can change 'isa_rev>=1' to 'isa_rev=1-5' but it doesn't seem to help with a test like movcc-1.c. That currently has 'isa>=4' and I want to add 'isa_rev<=5' but mips.exp does not seem to allow both a isa and an isa_rev check in the same test. I am not sure if that change could be easily added, I don't see a clean way to implement it off hand. Steve Ellcey sell...@mips.com 2014-06-23 Steve Ellcey <sell...@mips.com> * gcc.target/mips/mips.exp (mips-dg-options): Check for range of values on isa or isa_rev pseudo-options. diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp index 1c45a77..e28ecb6 100644 --- a/gcc/testsuite/gcc.target/mips/mips.exp +++ b/gcc/testsuite/gcc.target/mips/mips.exp @@ -974,7 +974,21 @@ proc mips-dg-options { args } { set arch "-march=loongson2f" } } else { - if { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]*)$} \ + # First check for a range of legal values to isa or isa_rev, + # Then check for a minimum, maximum, or exact value requirement. + if { [regexp {^(isa(?:|_rev))(=)([0-9]*)[-]([0-9]*)$} \ + $spec dummy prop relation minvalue maxvalue nocpus] } { + set current [mips_arch_info $arch $prop] + # Set value so that the code below will force the appropriate + # isa or isa_rev setting if it is necessary. + if { $current > $maxvalue } { + set value $maxvalue + } elseif { $current < $minvalue } { + set value $minvalue + } else { + set value $current + } + } elseif { ![regexp {^(isa(?:|_rev))(=|<=|>=)([0-9]*)$} \ $spec dummy prop relation value nocpus] } { error "Unrecognized isa specification: $spec" }