Steve Ellcey <sell...@mips.com> writes: > On Mon, 2012-06-11 at 18:24 -0700, David Daney wrote: > >> > This patch addes the -mno-synci flag to MIPS tests that specify an >> > architecture that does not support synci, thus getting rid of the >> > warning message and making the tests pass. Tested with the mips-linux-gnu >> > and mips-sde-elf targets both with and without --with-synci on the >> > GCC configuration. >> > >> > OK to checkin? >> >> I wonder if it would make more sense to modify the testsuite driver to >> take care of this. It seems like the set of files with the -mno-synci >> annotation could easily become different than the set that requires it. >> >> David Daney > > I did think about that, but the number of flags that I would have to > check for in the testsuite driver to decide whether or not to turn on > -mno-synci was large enough to make me not want to do it that way. > > I would need to check the isa= and isa_rev= flags that are currently > handled in the driver, the -mabi flag, the -march flag, and the -mips > flag. The number of values that each flag could have (particularly > -march) is rather large. I can imagine people adding a new test and > forgetting to add -mno-synci but that would be easy to fix and no worse > then adding a new -march value and not handling it in the test suite > driver.
I agree with David. This is really the same kind of situation as we already have for -m(no-)dsp, etc. There too we need to override an explicit -mdsp (which might be added using --target_board, etc.) when testing a target that doesn't support the DSP ASE. I think the patch below should be enough. Spot-checked on mips64-elf using --target_board mips-sim-idt64/-mips64r2/-msynci. Could you give it a go with your target? Thanks, Richard gcc/testsuite/ * gcc.target/mips/mips.exp (mips-dg-options): Handle -msynci. Index: gcc/testsuite/gcc.target/mips/mips.exp =================================================================== --- gcc/testsuite/gcc.target/mips/mips.exp 2012-02-07 19:23:25.000000000 +0000 +++ gcc/testsuite/gcc.target/mips/mips.exp 2012-06-13 18:54:03.507449114 +0100 @@ -839,6 +839,8 @@ proc mips-dg-finish {} { # | | # -mdsp -mno-dsp # | | +# -msynci -mno-synci +# | | # +-- gp, abi & arch ---------+ # # For these purposes, the "gp", "abi" & "arch" option groups are treated @@ -987,6 +989,7 @@ proc mips-dg-options { args } { # - the DSP ASE if { $isa_rev < 2 && (($gp_size == 32 && [mips_have_test_option_p options "-mfp64"]) + || [mips_have_test_option_p options "-msynci"] || [mips_have_test_option_p options "-mdsp"] || [mips_have_test_option_p options "-mdspr2"]) } { if { $gp_size == 32 } { @@ -1150,6 +1153,7 @@ proc mips-dg-options { args } { mips_make_test_option options "-mfp32" } mips_make_test_option options "-mno-dsp" + mips_make_test_option options "-mno-synci" } unset arch unset isa