From 2660fecc0c6cd1a0d4c67b6a50abb063f6a4b8d8 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Fri, 28 Sep 2018 23:50:34 +0200 Subject: [PATCH] rs6000: Delete HAVE_AS_LWSYNC and TARGET_LWSYNC_INSTRUCTION All supported assemblers know lwsync, so we never need to generate this instruction using the .long escape hatch. * config.in (HAVE_AS_LWSYNC): Delete. * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete. * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never do it as a .long . * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete. * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it as a .long . * configure.ac: Delete HAVE_AS_LWSYNC. * configure: Regenerate. From-SVN: r264702 --- gcc/ChangeLog | 12 +++++++++ gcc/config.in | 6 ----- gcc/config/powerpcspe/powerpcspe.h | 8 ------ gcc/config/powerpcspe/sync.md | 5 +--- gcc/config/rs6000/rs6000.h | 8 ------ gcc/config/rs6000/sync.md | 5 +--- gcc/configure | 43 ------------------------------ gcc/configure.ac | 13 --------- 8 files changed, 14 insertions(+), 86 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96baa7d48e2..cf52864503c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2018-09-28 Segher Boessenkool + + * config.in (HAVE_AS_LWSYNC): Delete. + * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete. + * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never + do it as a .long . + * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete. + * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it + as a .long . + * configure.ac: Delete HAVE_AS_LWSYNC. + * configure: Regenerate. + 2018-09-28 Eric Botcazou Pierre-Marie de Rodat diff --git a/gcc/config.in b/gcc/config.in index 48dfd23e9d6..1242326ad98 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -528,12 +528,6 @@ #endif -/* Define if your assembler supports LWSYNC instructions. */ -#ifndef USED_FOR_TARGET -#undef HAVE_AS_LWSYNC -#endif - - /* Define if your assembler supports the -mabi option. */ #ifndef USED_FOR_TARGET #undef HAVE_AS_MABI_OPTION diff --git a/gcc/config/powerpcspe/powerpcspe.h b/gcc/config/powerpcspe/powerpcspe.h index a30fe34dbc0..2bb32c7f7ac 100644 --- a/gcc/config/powerpcspe/powerpcspe.h +++ b/gcc/config/powerpcspe/powerpcspe.h @@ -216,14 +216,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define TARGET_MFCRF 0 #endif -/* Define TARGET_LWSYNC_INSTRUCTION if the assembler knows about lwsync. If - not, generate the lwsync code as an integer constant. */ -#ifdef HAVE_AS_LWSYNC -#define TARGET_LWSYNC_INSTRUCTION 1 -#else -#define TARGET_LWSYNC_INSTRUCTION 0 -#endif - /* Define TARGET_TLS_MARKERS if the target assembler does not support arg markers for __tls_get_addr calls. */ #ifndef HAVE_AS_TLS_MARKERS diff --git a/gcc/config/powerpcspe/sync.md b/gcc/config/powerpcspe/sync.md index f4f7bc2151d..dff3932e63a 100644 --- a/gcc/config/powerpcspe/sync.md +++ b/gcc/config/powerpcspe/sync.md @@ -91,13 +91,10 @@ (unspec:BLK [(match_dup 0)] UNSPEC_LWSYNC))] "" { - /* Some AIX assemblers don't accept lwsync, so we use a .long. */ if (TARGET_NO_LWSYNC) return "sync"; - else if (TARGET_LWSYNC_INSTRUCTION) - return "lwsync"; else - return ".long 0x7c2004ac"; + return "lwsync"; } [(set_attr "type" "sync")]) diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 232d442864c..d2fe795fd8a 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -219,14 +219,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define TARGET_MFCRF 0 #endif -/* Define TARGET_LWSYNC_INSTRUCTION if the assembler knows about lwsync. If - not, generate the lwsync code as an integer constant. */ -#ifdef HAVE_AS_LWSYNC -#define TARGET_LWSYNC_INSTRUCTION 1 -#else -#define TARGET_LWSYNC_INSTRUCTION 0 -#endif - /* Define TARGET_TLS_MARKERS if the target assembler does not support arg markers for __tls_get_addr calls. */ #ifndef HAVE_AS_TLS_MARKERS diff --git a/gcc/config/rs6000/sync.md b/gcc/config/rs6000/sync.md index ee98049cdd8..f18b6b77280 100644 --- a/gcc/config/rs6000/sync.md +++ b/gcc/config/rs6000/sync.md @@ -91,13 +91,10 @@ (unspec:BLK [(match_dup 0)] UNSPEC_LWSYNC))] "" { - /* Some AIX assemblers don't accept lwsync, so we use a .long. */ if (TARGET_NO_LWSYNC) return "sync"; - else if (TARGET_LWSYNC_INSTRUCTION) - return "lwsync"; else - return ".long 0x7c2004ac"; + return "lwsync"; } [(set_attr "type" "sync")]) diff --git a/gcc/configure b/gcc/configure index f2d5a6f2f62..5d2fd184a23 100755 --- a/gcc/configure +++ b/gcc/configure @@ -26719,49 +26719,6 @@ if test $gcc_cv_as_powerpc_vsx = yes; then $as_echo "#define HAVE_AS_VSX 1" >>confdefs.h -fi - - - case $target in - *-*-aix*) conftest_s=' .csect .text[PR] - lwsync';; - *) conftest_s=' .text - lwsync';; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for lwsync support" >&5 -$as_echo_n "checking assembler for lwsync support... " >&6; } -if test "${gcc_cv_as_powerpc_lwsync+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - gcc_cv_as_powerpc_lwsync=no - if test $in_tree_gas = yes; then - if test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 2` - then gcc_cv_as_powerpc_lwsync=yes -fi - elif test x$gcc_cv_as != x; then - $as_echo "$conftest_s" > conftest.s - if { ac_try='$gcc_cv_as $gcc_cv_as_flags -a32 -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_powerpc_lwsync=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_powerpc_lwsync" >&5 -$as_echo "$gcc_cv_as_powerpc_lwsync" >&6; } -if test $gcc_cv_as_powerpc_lwsync = yes; then - -$as_echo "#define HAVE_AS_LWSYNC 1" >>confdefs.h - fi diff --git a/gcc/configure.ac b/gcc/configure.ac index 470fde644f7..3c1e0ad27c3 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -4557,19 +4557,6 @@ LCF0: [AC_DEFINE(HAVE_AS_VSX, 1, [Define if your assembler supports VSX instructions.])]) - case $target in - *-*-aix*) conftest_s=' .csect .text[[PR]] - lwsync';; - *) conftest_s=' .text - lwsync';; - esac - - gcc_GAS_CHECK_FEATURE([lwsync support], - gcc_cv_as_powerpc_lwsync, [2,19,2], -a32, - [$conftest_s],, - [AC_DEFINE(HAVE_AS_LWSYNC, 1, - [Define if your assembler supports LWSYNC instructions.])]) - case $target in *-*-aix*) conftest_s=' .machine "476" .csect .text[[PR]] -- 2.30.2