Commit fe04878d by Uros Bizjak Committed by Uros Bizjak

re PR bootstrap/56656 (Suffix or operands invalid for 'movq')

	PR bootstrap/56656
	* configure.ac (HAVE_AS_IX86_INTERUNIT_MOVQ): New test.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/i386/i386.md (*movdf_internal): Use
	HAVE_AS_IX86_INTERUNIT_MOVQ to handle broken assemblers that require
	movd instead of movq mnemonic for interunit moves.
	(*movdi_internal): Ditto.

From-SVN: r196861
parent fa2e9a58
2013-03-21 Uros Bizjak <ubizjak@gmail.com>
PR bootstrap/56656
* configure.ac (HAVE_AS_IX86_INTERUNIT_MOVQ): New test.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/i386.md (*movdf_internal): Use
HAVE_AS_IX86_INTERUNIT_MOVQ to handle broken assemblers that require
movd instead of movq mnemonic for interunit moves.
(*movdi_internal): Ditto.
2013-03-21 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com> 2013-03-21 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
* config/aarch64/aarch64-simd.md (simd_fabd): New Attribute. * config/aarch64/aarch64-simd.md (simd_fabd): New Attribute.
......
...@@ -327,6 +327,12 @@ ...@@ -327,6 +327,12 @@
#endif #endif
/* Define if your assembler supports interunit movq mnemonic. */
#ifndef USED_FOR_TARGET
#undef HAVE_AS_IX86_INTERUNIT_MOVQ
#endif
/* Define if your assembler supports the .quad directive. */ /* Define if your assembler supports the .quad directive. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET
#undef HAVE_AS_IX86_QUAD #undef HAVE_AS_IX86_QUAD
......
...@@ -1878,9 +1878,11 @@ ...@@ -1878,9 +1878,11 @@
return "pxor\t%0, %0"; return "pxor\t%0, %0";
case TYPE_MMXMOV: case TYPE_MMXMOV:
#ifndef HAVE_AS_IX86_INTERUNIT_MOVQ
/* Handle broken assemblers that require movd instead of movq. */ /* Handle broken assemblers that require movd instead of movq. */
if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1]))
return "movd\t{%1, %0|%0, %1}"; return "movd\t{%1, %0|%0, %1}";
#endif
return "movq\t{%1, %0|%0, %1}"; return "movq\t{%1, %0|%0, %1}";
case TYPE_SSELOG1: case TYPE_SSELOG1:
...@@ -1890,9 +1892,11 @@ ...@@ -1890,9 +1892,11 @@
switch (get_attr_mode (insn)) switch (get_attr_mode (insn))
{ {
case MODE_DI: case MODE_DI:
#ifndef HAVE_AS_IX86_INTERUNIT_MOVQ
/* Handle broken assemblers that require movd instead of movq. */ /* Handle broken assemblers that require movd instead of movq. */
if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1]))
return "%vmovd\t{%1, %0|%0, %1}"; return "%vmovd\t{%1, %0|%0, %1}";
#endif
return "%vmovq\t{%1, %0|%0, %1}"; return "%vmovq\t{%1, %0|%0, %1}";
case MODE_TI: case MODE_TI:
return "%vmovdqa\t{%1, %0|%0, %1}"; return "%vmovdqa\t{%1, %0|%0, %1}";
...@@ -2043,9 +2047,16 @@ ...@@ -2043,9 +2047,16 @@
return "pxor\t%0, %0"; return "pxor\t%0, %0";
case TYPE_MMXMOV: case TYPE_MMXMOV:
if (get_attr_mode (insn) == MODE_DI) switch (get_attr_mode (insn))
return "movq\t{%1, %0|%0, %1}"; {
return "movd\t{%1, %0|%0, %1}"; case MODE_DI:
return "movq\t{%1, %0|%0, %1}";
case MODE_SI:
return "movd\t{%1, %0|%0, %1}";
default:
gcc_unreachable ();
}
case TYPE_LEA: case TYPE_LEA:
return "lea{l}\t{%E1, %0|%0, %E1}"; return "lea{l}\t{%E1, %0|%0, %E1}";
...@@ -2797,9 +2808,11 @@ ...@@ -2797,9 +2808,11 @@
return "movlpd\t{%1, %0|%0, %1}"; return "movlpd\t{%1, %0|%0, %1}";
case MODE_DI: case MODE_DI:
#ifndef HAVE_AS_IX86_INTERUNIT_MOVQ
/* Handle broken assemblers that require movd instead of movq. */ /* Handle broken assemblers that require movd instead of movq. */
if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1]))
return "%vmovd\t{%1, %0|%0, %1}"; return "%vmovd\t{%1, %0|%0, %1}";
#endif
return "%vmovq\t{%1, %0|%0, %1}"; return "%vmovq\t{%1, %0|%0, %1}";
default: default:
...@@ -2952,9 +2965,16 @@ ...@@ -2952,9 +2965,16 @@
} }
case TYPE_MMXMOV: case TYPE_MMXMOV:
if (get_attr_mode (insn) == MODE_DI) switch (get_attr_mode (insn))
return "movq\t{%1, %0|%0, %1}"; {
return "movd\t{%1, %0|%0, %1}"; case MODE_DI:
return "movq\t{%1, %0|%0, %1}";
case MODE_SI:
return "movd\t{%1, %0|%0, %1}";
default:
gcc_unreachable ();
}
default: default:
gcc_unreachable (); gcc_unreachable ();
......
...@@ -24644,6 +24644,39 @@ $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h ...@@ -24644,6 +24644,39 @@ $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for interunit movq mnemonic" >&5
$as_echo_n "checking assembler for interunit movq mnemonic... " >&6; }
if test "${gcc_cv_as_ix86_interunit_movq+set}" = set; then :
$as_echo_n "(cached) " >&6
else
gcc_cv_as_ix86_interunit_movq=no
if test x$gcc_cv_as != x; then
$as_echo '.code64
movq %mm0, %rax
movq %rax, %xmm0' > conftest.s
if { ac_try='$gcc_cv_as $gcc_cv_as_flags -o conftest.o conftest.s >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
then
gcc_cv_as_ix86_interunit_movq=yes
else
echo "configure: failed program was" >&5
cat conftest.s >&5
fi
rm -f conftest.o conftest.s
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_interunit_movq" >&5
$as_echo "$gcc_cv_as_ix86_interunit_movq" >&6; }
if test $gcc_cv_as_ix86_interunit_movq = yes; then
$as_echo "#define HAVE_AS_IX86_INTERUNIT_MOVQ 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for hle prefixes" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for hle prefixes" >&5
$as_echo_n "checking assembler for hle prefixes... " >&6; } $as_echo_n "checking assembler for hle prefixes... " >&6; }
if test "${gcc_cv_as_ix86_hle+set}" = set; then : if test "${gcc_cv_as_ix86_hle+set}" = set; then :
......
...@@ -3723,6 +3723,14 @@ foo: nop ...@@ -3723,6 +3723,14 @@ foo: nop
[AC_DEFINE(HAVE_AS_IX86_SAHF, 1, [AC_DEFINE(HAVE_AS_IX86_SAHF, 1,
[Define if your assembler supports the sahf mnemonic in 64bit mode.])]) [Define if your assembler supports the sahf mnemonic in 64bit mode.])])
gcc_GAS_CHECK_FEATURE([interunit movq mnemonic],
gcc_cv_as_ix86_interunit_movq,,,
[.code64
movq %mm0, %rax
movq %rax, %xmm0],,
[AC_DEFINE(HAVE_AS_IX86_INTERUNIT_MOVQ, 1,
[Define if your assembler supports interunit movq mnemonic.])])
gcc_GAS_CHECK_FEATURE([hle prefixes], gcc_GAS_CHECK_FEATURE([hle prefixes],
gcc_cv_as_ix86_hle,,, gcc_cv_as_ix86_hle,,,
[lock xacquire cmpxchg %esi, (%ecx)],, [lock xacquire cmpxchg %esi, (%ecx)],,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment