Message ID | 87r4qpzfuf.fsf@talisman.home |
---|---|
State | New |
Headers | show |
On Wed, 29 Aug 2012, Richard Sandiford wrote: > Richard Sandiford <rdsandiford@googlemail.com> writes: > > I'm testing a patch to make the testsuite work out the default > > -m{no,}synci, which ought to be enough. The usual rules should > > then kick in and force -mno-synci where necessary. Hopefully. > > Here's the patch. > Index: gcc/testsuite/gcc.target/mips/mips.exp > =================================================================== > --- gcc/testsuite/gcc.target/mips/mips.exp 2012-08-27 17:27:13.000000000 +0100 > +++ gcc/testsuite/gcc.target/mips/mips.exp 2012-08-29 19:50:50.141982450 +0100 > @@ -767,6 +767,12 @@ proc mips-dg-init {} { > "-mno-smartmips", > #endif > > + #ifdef __mips_synci JFTR, I came up with something very similar locally, but without new builtin defines and with the invalid assumption of configuring with --with-synci=yes, hence "#if (__mips == 32 || __mips == 64) && __mips_isa_rev == 2 && !defined(__mips16)" brgds, H-P
Index: gcc/config/mips/mips.h =================================================================== --- gcc/config/mips/mips.h 2012-08-29 19:40:47.000000000 +0100 +++ gcc/config/mips/mips.h 2012-08-29 19:50:50.144982449 +0100 @@ -517,6 +517,9 @@ #define TARGET_CPU_CPP_BUILTINS() \ if (TARGET_OCTEON) \ builtin_define ("__OCTEON__"); \ \ + if (TARGET_SYNCI) \ + builtin_define ("__mips_synci"); \ + \ /* Macros dependent on the C dialect. */ \ if (preprocessing_asm_p ()) \ { \ Index: gcc/testsuite/gcc.target/mips/mips.exp =================================================================== --- gcc/testsuite/gcc.target/mips/mips.exp 2012-08-27 17:27:13.000000000 +0100 +++ gcc/testsuite/gcc.target/mips/mips.exp 2012-08-29 19:50:50.141982450 +0100 @@ -767,6 +767,12 @@ proc mips-dg-init {} { "-mno-smartmips", #endif + #ifdef __mips_synci + "-msynci", + #else + "-mno-synci", + #endif + 0 }; }]