Richard Sandiford <[email protected]> writes:
> Hans-Peter Nilsson <[email protected]> writes:
>> On Tue, 28 Aug 2012, Richard Sandiford wrote:
>>> Hans-Peter Nilsson <[email protected]> writes:
>>> > On Sun, 26 Aug 2012, Richard Sandiford wrote:
>>> >> I'm preparing a patch to turn gcc.target/mips into a torture-like
>>> >> testsuite.
>>> >
>>> > While on the subject of gcc.target/mips and its extensions, it
>>> > also doesn't handle a build configured with --with-synci=yes.
>>> > (Well, not on the 4.7 branch at least.)
>>>
>>> What goes wrong?
>>
>> I don't remember details, but IIRC some synci-related tests go
>> wrong for mipsisa32r2el-linux-gnu due to -msynci being the
>> default. Don't worry, I've fixed it in the local import. :)
>> I though the above would entice you to try it, but I guess I
>> need to report better for that to happen. Maybe later.
>
> Trying it now. I suspect it was the problem that Steve hit:
> the implicit -msynci is still (deliberately) kept when a lower
> architecture is selected.
>
> 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. Tested on mipsisa64r2-elf, where mips.exp
comes out clean. I looked at the logs to make sure that -mno-synci
was being passed for lower architectures but that no explicit
-msynci or -mno-synci option was used when testing mips64r2.
Applied.
Richard
gcc/
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_synci
if TARGET_SYNCI.
gcc/testsuite/
* gcc.target/mips/mips.exp: Work out default -msynci setting.
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
};
}]