aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1998-07-09 00:27:21 +0000
committerJeff Law <law@gcc.gnu.org>1998-07-08 18:27:21 -0600
commit00ccc16d80f6919608604373eff0ec9fad3427f8 (patch)
tree2c11e8768375a58ac458e5a70a031a44a7cd6643 /gcc
parent0841099a974af90ccfd56d290beaeb70b6dcac5e (diff)
downloadgcc-00ccc16d80f6919608604373eff0ec9fad3427f8.zip
gcc-00ccc16d80f6919608604373eff0ec9fad3427f8.tar.gz
gcc-00ccc16d80f6919608604373eff0ec9fad3427f8.tar.bz2
configure.in: Check if the assembler supports ".balign" and ".p2align" and define...
* configure.in: Check if the assembler supports ".balign" and ".p2align" and define HAVE_GAS_BALIGN_AND_P2ALIGN appropriately. * acconfig.h (HAVE_GAS_BALIGN_AND_P2ALIGN): New tag. * i386/gas.h (ASM_OUTPUT_ALIGN): If the assembler has support for ".balign" then use it. From-SVN: r21023
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/acconfig.h3
-rw-r--r--gcc/config/i386/gas.h2
-rwxr-xr-xgcc/configure20
-rw-r--r--gcc/configure.in14
5 files changed, 44 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a9a3f84..bc58a67 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
Wed Jul 8 21:43:14 1998 Jeffrey A Law (law@cygnus.com)
+ * configure.in: Check if the assembler supports ".balign" and
+ ".p2align" and define HAVE_GAS_BALIGN_AND_P2ALIGN appropriately.
+ * acconfig.h (HAVE_GAS_BALIGN_AND_P2ALIGN): New tag.
+ * i386/gas.h (ASM_OUTPUT_ALIGN): If the assembler has support for
+ ".balign" then use it.
+
* print-rtl.c (print_rtx): Revert previous patch.
* jump.c (duplicate_loop_exit_test): Do not duplicate the loop exit
diff --git a/gcc/acconfig.h b/gcc/acconfig.h
index 7c1523f..e1ac384 100644
--- a/gcc/acconfig.h
+++ b/gcc/acconfig.h
@@ -14,6 +14,9 @@
of bytes to skip when using the GAS .p2align command. */
#undef HAVE_GAS_MAX_SKIP_P2ALIGN
+/* Define if your assembler supports .balign and .p2align. */
+#undef HAVE_GAS_BALIGN_AND_P2ALIGN
+
/* Define if you have a working <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
diff --git a/gcc/config/i386/gas.h b/gcc/config/i386/gas.h
index 2da338a..52c5cc4 100644
--- a/gcc/config/i386/gas.h
+++ b/gcc/config/i386/gas.h
@@ -80,7 +80,7 @@ Boston, MA 02111-1307, USA. */
doubt or guess work, and since this file is used for both a.out and other
file formats, we use one of them. */
-#if 0 /* ??? However, not every port uses binutils 2.6 yet. */
+#ifdef HAVE_GAS_BALIGN_AND_P2ALIGN
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.balign %d\n", 1<<(LOG))
diff --git a/gcc/configure b/gcc/configure
index 654ec63..9e59376 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -5237,6 +5237,15 @@ elif [ -f $srcdir/../gas/configure.in ]; then
done
gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([0-9]*\)"`
gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
+ # Gas version 2.6 and later support for .balign and .p2align.
+ # bytes to skip when using .p2align.
+ if [ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2 ]; then
+ gcc_cv_as_alignment_features=".balign and .p2align"
+ cat >> confdefs.h <<\EOF
+#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
+EOF
+
+ fi
# Gas version 2.8 and later support specifying the maximum
# bytes to skip when using .p2align.
if [ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2 ]; then
@@ -5251,6 +5260,17 @@ elif [ x$host = x$target ]; then
gcc_cv_as=as$host_exeext
fi
if [ x$gcc_cv_as != x ]; then
+ # Check if we have .balign and .p2align
+ echo ".balign 4" > conftest.s
+ echo ".p2align 2" >> conftest.s
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+ gcc_cv_as_alignment_features=".balign and .p2align"
+ cat >> confdefs.h <<\EOF
+#define HAVE_GAS_BALIGN_AND_P2ALIGN 1
+EOF
+
+ fi
+ rm -f conftest.s conftest.o
# Check if specifying the maximum bytes to skip when
# using .p2align is supported.
echo ".p2align 4,,7" > conftest.s
diff --git a/gcc/configure.in b/gcc/configure.in
index 1714963..097ca9e 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -3332,6 +3332,12 @@ elif [[ -f $srcdir/../gas/configure.in ]]; then
done
gcc_cv_gas_major_version=`expr "$gcc_cv_gas_version" : "VERSION=\([[0-9]]*\)"`
gcc_cv_gas_minor_version=`expr "$gcc_cv_gas_version" : "VERSION=[[0-9]]*\.\([[0-9]]*\)"`
+ # Gas version 2.6 and later support for .balign and .p2align.
+ # bytes to skip when using .p2align.
+ if [[ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 6 -o "$gcc_cv_gas_major_version" -gt 2 ]]; then
+ gcc_cv_as_alignment_features=".balign and .p2align"
+ AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
+ fi
# Gas version 2.8 and later support specifying the maximum
# bytes to skip when using .p2align.
if [[ "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 8 -o "$gcc_cv_gas_major_version" -gt 2 ]]; then
@@ -3343,6 +3349,14 @@ elif [[ x$host = x$target ]]; then
gcc_cv_as=as$host_exeext
fi
if [[ x$gcc_cv_as != x ]]; then
+ # Check if we have .balign and .p2align
+ echo ".balign 4" > conftest.s
+ echo ".p2align 2" >> conftest.s
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+ gcc_cv_as_alignment_features=".balign and .p2align"
+ AC_DEFINE(HAVE_GAS_BALIGN_AND_P2ALIGN)
+ fi
+ rm -f conftest.s conftest.o
# Check if specifying the maximum bytes to skip when
# using .p2align is supported.
echo ".p2align 4,,7" > conftest.s