From: Uros Bizjak Date: Thu, 21 Mar 2013 09:31:52 +0000 (+0100) Subject: re PR bootstrap/56656 (Suffix or operands invalid for 'movq') X-Git-Tag: upstream/12.2.0~70765 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fe04878d00b2847e8982e96d0a274e8c3b8d8f0f;p=platform%2Fupstream%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0c7ce7a..bdbe767 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2013-03-21 Uros Bizjak + + 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 * config/aarch64/aarch64-simd.md (simd_fabd): New Attribute. diff --git a/gcc/config.in b/gcc/config.in index f1ab30d..223ce93 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -327,6 +327,12 @@ #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. */ #ifndef USED_FOR_TARGET #undef HAVE_AS_IX86_QUAD diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 2a2708c..d622346 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1878,9 +1878,11 @@ return "pxor\t%0, %0"; case TYPE_MMXMOV: +#ifndef HAVE_AS_IX86_INTERUNIT_MOVQ /* Handle broken assemblers that require movd instead of movq. */ if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) return "movd\t{%1, %0|%0, %1}"; +#endif return "movq\t{%1, %0|%0, %1}"; case TYPE_SSELOG1: @@ -1890,9 +1892,11 @@ switch (get_attr_mode (insn)) { case MODE_DI: +#ifndef HAVE_AS_IX86_INTERUNIT_MOVQ /* Handle broken assemblers that require movd instead of movq. */ if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) return "%vmovd\t{%1, %0|%0, %1}"; +#endif return "%vmovq\t{%1, %0|%0, %1}"; case MODE_TI: return "%vmovdqa\t{%1, %0|%0, %1}"; @@ -2043,9 +2047,16 @@ return "pxor\t%0, %0"; case TYPE_MMXMOV: - if (get_attr_mode (insn) == MODE_DI) - return "movq\t{%1, %0|%0, %1}"; - return "movd\t{%1, %0|%0, %1}"; + switch (get_attr_mode (insn)) + { + 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: return "lea{l}\t{%E1, %0|%0, %E1}"; @@ -2797,9 +2808,11 @@ return "movlpd\t{%1, %0|%0, %1}"; case MODE_DI: +#ifndef HAVE_AS_IX86_INTERUNIT_MOVQ /* Handle broken assemblers that require movd instead of movq. */ if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1])) return "%vmovd\t{%1, %0|%0, %1}"; +#endif return "%vmovq\t{%1, %0|%0, %1}"; default: @@ -2952,9 +2965,16 @@ } case TYPE_MMXMOV: - if (get_attr_mode (insn) == MODE_DI) - return "movq\t{%1, %0|%0, %1}"; - return "movd\t{%1, %0|%0, %1}"; + switch (get_attr_mode (insn)) + { + case MODE_DI: + return "movq\t{%1, %0|%0, %1}"; + case MODE_SI: + return "movd\t{%1, %0|%0, %1}"; + + default: + gcc_unreachable (); + } default: gcc_unreachable (); diff --git a/gcc/configure b/gcc/configure index e0f3230..69d99af 100755 --- a/gcc/configure +++ b/gcc/configure @@ -24644,6 +24644,39 @@ $as_echo "#define HAVE_AS_IX86_SAHF 1" >>confdefs.h 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_n "checking assembler for hle prefixes... " >&6; } if test "${gcc_cv_as_ix86_hle+set}" = set; then : diff --git a/gcc/configure.ac b/gcc/configure.ac index f783b61..53cea1d 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3723,6 +3723,14 @@ foo: nop [AC_DEFINE(HAVE_AS_IX86_SAHF, 1, [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_cv_as_ix86_hle,,, [lock xacquire cmpxchg %esi, (%ecx)],,