Hi Uros,

with the following removal of HAVE_AS_IX86_QUAD, there seem to be more
cleanup opportunities:

* ASM_QUAD is now always defined as .quad in either i386/att.h,
  i386/bsd.h, or i386/darwin.h.

  From a quick check, any x86 target includes one of those headers, so
  the !ASM_QUAD code in i386.cc can be removed.

  All definitions of ASM_QUAD being identical, they can be moved to
  i386.h instead.

* The same is mostly true for ASM_{BYTE, SHORT, LONG}: they are defined
  in the same headers and already used unconditionally.

  However, ASM_SHORT is defined as .value in att.h, while the two others
  use .short instead.  I suspect that all cases could use .short here,
  allowing the ASM_SHORT definition to be moved to i386.h, too.  If need
  be, ASM_SHORT could be overridden in att.h instead.

Or am I overlooking something?

Thanks.

        Rainer

---------------------------------------------------------------------------

Every supported version of the Solaris/x86 assembler supports the .quad
directive, so HAVE_AS_IX86_QUAD is always defined with both as and gas.
This patch removes the configure check and guarded code.

Bootstrapped without regressions on i386-pc-solaris2.11,
amd64-pc-solaris2.11 with both the original Solaris 11.4 as and the
current one, and x86_64-pc-linux-gnu.

Committed to trunk.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2026-06-25  Rainer Orth  <[email protected]>

        gcc:
        * configure.ac (gcc_cv_as_ix86_quad): Remove.
        * configure: Regenerate.
        * config.in: Likewise.
        * config/i386/sol2.h [!HAVE_AS_IX86_QUAD] (ASM_QUAD): Don't undefine.

# HG changeset patch
# Parent  f7b79f88b4db2c1f1b4f2e2735808011d5bc538e
Remove HAVE_AS_IX86_QUAD

diff --git a/gcc/config.in b/gcc/config.in
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -549,12 +549,6 @@
 #endif
 
 
-/* Define if your assembler supports the .quad directive. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_AS_IX86_QUAD
-#endif
-
-
 /* Define if the assembler supports 'rep <insn>, lock <insn>'. */
 #ifndef USED_FOR_TARGET
 #undef HAVE_AS_IX86_REP_LOCK_PREFIX
diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h
--- a/gcc/config/i386/sol2.h
+++ b/gcc/config/i386/sol2.h
@@ -94,11 +94,6 @@ along with GCC; see the file COPYING3.  
 #undef LOCAL_LABEL_PREFIX
 #define LOCAL_LABEL_PREFIX "."
 
-/* The 32-bit Solaris assembler does not support .quad.  Do not use it.  */
-#ifndef HAVE_AS_IX86_QUAD
-#undef ASM_QUAD
-#endif
-
 /* The Solaris assembler wants a .local for non-exported aliases.  */
 #define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET)	\
   do {							\
diff --git a/gcc/configure b/gcc/configure
--- a/gcc/configure
+++ b/gcc/configure
@@ -29672,38 +29672,6 @@ $as_echo "#define HAVE_AS_IX86_FFREEP 1"
 fi
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for .quad directive" >&5
-$as_echo_n "checking assembler for .quad directive... " >&6; }
-if ${gcc_cv_as_ix86_quad+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  gcc_cv_as_ix86_quad=no
-  if test x"$gcc_cv_as" != x; then
-    $as_echo '.quad 0' > 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_quad=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_quad" >&5
-$as_echo "$gcc_cv_as_ix86_quad" >&6; }
-if test $gcc_cv_as_ix86_quad = yes; then
-
-$as_echo "#define HAVE_AS_IX86_QUAD 1" >>confdefs.h
-
-fi
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for sahf mnemonic" >&5
 $as_echo_n "checking assembler for sahf mnemonic... " >&6; }
 if ${gcc_cv_as_ix86_sahf+:} false; then :
diff --git a/gcc/configure.ac b/gcc/configure.ac
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4916,12 +4916,6 @@ foo:	nop
       [AC_DEFINE(HAVE_AS_IX86_FFREEP, 1,
         [Define if your assembler supports the ffreep mnemonic.])])
 
-    gcc_GAS_CHECK_FEATURE([.quad directive],
-      gcc_cv_as_ix86_quad,,
-      [.quad 0],,
-      [AC_DEFINE(HAVE_AS_IX86_QUAD, 1,
-        [Define if your assembler supports the .quad directive.])])
-
     gcc_GAS_CHECK_FEATURE([sahf mnemonic],
       gcc_cv_as_ix86_sahf,,
       [.code64

Reply via email to