mirror of git://gcc.gnu.org/git/gcc.git
gcconfig.h: Add x86-64 definitions.
2002-07-18 Bo Thorsen <bo@suse.de> * include/private/gcconfig.h: Add x86-64 definitions. * os_dep.c: Add x86-64 support. * configure.in: Likewise. * configure: Regenerate. Approved by Hans Boehm. From-SVN: r55584
This commit is contained in:
parent
7ea8939450
commit
48528b673e
|
@ -1,3 +1,10 @@
|
||||||
|
2002-07-18 Bo Thorsen <bo@suse.de>
|
||||||
|
|
||||||
|
* include/private/gcconfig.h: Add x86-64 definitions.
|
||||||
|
* os_dep.c: Add x86-64 support.
|
||||||
|
* configure.in: Likewise.
|
||||||
|
* configure: Regenerate.
|
||||||
|
|
||||||
2002-07-18 H.J. Lu <hjl@gnu.org>
|
2002-07-18 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
* mach_dep.c (GC_push_regs): Remove the unused Linux/mips code.
|
* mach_dep.c (GC_push_regs): Remove the unused Linux/mips code.
|
||||||
|
|
|
@ -2391,7 +2391,7 @@ if test -z "$CXXCPP"; then
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_ext=C
|
ac_ext=C
|
||||||
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||||
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||||
|
@ -2417,15 +2417,18 @@ else
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
ac_cv_prog_CXXCPP="$CXXCPP"
|
ac_cv_prog_CXXCPP="$CXXCPP"
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||||
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||||
cross_compiling=$ac_cv_prog_cc_cross
|
cross_compiling=$ac_cv_prog_cc_cross
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
CXXCPP="$ac_cv_prog_CXXCPP"
|
||||||
|
else
|
||||||
|
ac_cv_prog_CXXCPP=$CXXCPP
|
||||||
fi
|
fi
|
||||||
CXXCPP="$ac_cv_prog_CXXCPP"
|
|
||||||
echo "$ac_t""$CXXCPP" 1>&6
|
echo "$ac_t""$CXXCPP" 1>&6
|
||||||
|
|
||||||
|
|
||||||
|
@ -2551,7 +2554,7 @@ fi
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
|
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
|
||||||
echo "configure:2555: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
echo "configure:2558: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
||||||
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
|
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
|
||||||
if test "${enable_maintainer_mode+set}" = set; then
|
if test "${enable_maintainer_mode+set}" = set; then
|
||||||
enableval="$enable_maintainer_mode"
|
enableval="$enable_maintainer_mode"
|
||||||
|
@ -2584,7 +2587,7 @@ if false; then
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
|
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
|
||||||
echo "configure:2588: checking for executable suffix" >&5
|
echo "configure:2591: checking for executable suffix" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -2594,7 +2597,7 @@ else
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
echo 'int main () { return 0; }' > conftest.$ac_ext
|
echo 'int main () { return 0; }' > conftest.$ac_ext
|
||||||
ac_cv_exeext=
|
ac_cv_exeext=
|
||||||
if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||||
for file in conftest.*; do
|
for file in conftest.*; do
|
||||||
case $file in
|
case $file in
|
||||||
*.c | *.o | *.obj) ;;
|
*.c | *.o | *.obj) ;;
|
||||||
|
@ -2617,7 +2620,7 @@ ac_exeext=$EXEEXT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
|
echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
|
||||||
echo "configure:2621: checking for thread model used by GCC" >&5
|
echo "configure:2624: checking for thread model used by GCC" >&5
|
||||||
THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
|
THREADS=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
|
||||||
if test -z "$THREADS"; then
|
if test -z "$THREADS"; then
|
||||||
THREADS=no
|
THREADS=no
|
||||||
|
@ -2646,7 +2649,7 @@ case "$THREADS" in
|
||||||
THREADS=posix
|
THREADS=posix
|
||||||
THREADLIBS=-lpthread
|
THREADLIBS=-lpthread
|
||||||
case "$host" in
|
case "$host" in
|
||||||
x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux*)
|
x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define GC_LINUX_THREADS 1
|
#define GC_LINUX_THREADS 1
|
||||||
EOF
|
EOF
|
||||||
|
@ -2748,7 +2751,7 @@ esac
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||||
echo "configure:2752: checking for dlopen in -ldl" >&5
|
echo "configure:2755: checking for dlopen in -ldl" >&5
|
||||||
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
@ -2756,7 +2759,7 @@ else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 2760 "configure"
|
#line 2763 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
@ -2767,7 +2770,7 @@ int main() {
|
||||||
dlopen()
|
dlopen()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -2986,7 +2989,7 @@ EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
;;
|
;;
|
||||||
x86-*-linux* | i586-*-linux* | i686-*-linux* )
|
x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define MAKE_BACK_GRAPH 1
|
#define MAKE_BACK_GRAPH 1
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -73,7 +73,7 @@ case "$THREADS" in
|
||||||
THREADS=posix
|
THREADS=posix
|
||||||
THREADLIBS=-lpthread
|
THREADLIBS=-lpthread
|
||||||
case "$host" in
|
case "$host" in
|
||||||
x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux*)
|
x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
|
||||||
AC_DEFINE(GC_LINUX_THREADS)
|
AC_DEFINE(GC_LINUX_THREADS)
|
||||||
AC_DEFINE(_REENTRANT)
|
AC_DEFINE(_REENTRANT)
|
||||||
if test "${enable_parallel_mark}"; then
|
if test "${enable_parallel_mark}"; then
|
||||||
|
@ -259,7 +259,7 @@ AC_ARG_ENABLE(full-debug,
|
||||||
ia64-*-linux* )
|
ia64-*-linux* )
|
||||||
AC_DEFINE(MAKE_BACK_GRAPH)
|
AC_DEFINE(MAKE_BACK_GRAPH)
|
||||||
;;
|
;;
|
||||||
x86-*-linux* | i586-*-linux* | i686-*-linux* )
|
x86-*-linux* | i586-*-linux* | i686-*-linux* | x86_64-*-linux* )
|
||||||
AC_DEFINE(MAKE_BACK_GRAPH)
|
AC_DEFINE(MAKE_BACK_GRAPH)
|
||||||
AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
|
AC_MSG_WARN("Client must not use -fomit-frame-pointer.")
|
||||||
AC_DEFINE(SAVE_CALL_COUNT, 8)
|
AC_DEFINE(SAVE_CALL_COUNT, 8)
|
||||||
|
|
|
@ -193,6 +193,10 @@
|
||||||
# define I386
|
# define I386
|
||||||
# define mach_type_known
|
# define mach_type_known
|
||||||
# endif
|
# endif
|
||||||
|
# if defined(LINUX) && defined(__x86_64__)
|
||||||
|
# define X86_64
|
||||||
|
# define mach_type_known
|
||||||
|
# endif
|
||||||
# if defined(LINUX) && (defined(__ia64__) || defined(__ia64))
|
# if defined(LINUX) && (defined(__ia64__) || defined(__ia64))
|
||||||
# define IA64
|
# define IA64
|
||||||
# define mach_type_known
|
# define mach_type_known
|
||||||
|
@ -427,6 +431,7 @@
|
||||||
/* (HPUX) */
|
/* (HPUX) */
|
||||||
/* SH ==> Hitachi SuperH */
|
/* SH ==> Hitachi SuperH */
|
||||||
/* (LINUX & MSWINCE) */
|
/* (LINUX & MSWINCE) */
|
||||||
|
/* X86_64 ==> AMD x86-64 */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1624,6 +1629,44 @@
|
||||||
# define DATAEND /* not needed */
|
# define DATAEND /* not needed */
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
# ifdef X86_64
|
||||||
|
# define MACH_TYPE "X86_64"
|
||||||
|
# define ALIGNMENT 8
|
||||||
|
# define CPP_WORDSZ 64
|
||||||
|
# define CACHE_LINE_SIZE 64
|
||||||
|
# define USE_GENERIC_PUSH_REGS
|
||||||
|
# endif
|
||||||
|
# ifdef LINUX
|
||||||
|
# define OS_TYPE "LINUX"
|
||||||
|
# define LINUX_STACKBOTTOM
|
||||||
|
# if !defined(GC_LINUX_THREADS) || !defined(REDIRECT_MALLOC)
|
||||||
|
# define MPROTECT_VDB
|
||||||
|
# else
|
||||||
|
/* We seem to get random errors in incremental mode, */
|
||||||
|
/* possibly because Linux threads is itself a malloc client */
|
||||||
|
/* and can't deal with the signals. */
|
||||||
|
# endif
|
||||||
|
# ifdef __ELF__
|
||||||
|
# define DYNAMIC_LOADING
|
||||||
|
# ifdef UNDEFINED /* includes ro data */
|
||||||
|
extern int _etext[];
|
||||||
|
# define DATASTART ((ptr_t)((((word) (_etext)) + 0xfff) & ~0xfff))
|
||||||
|
# endif
|
||||||
|
# include <features.h>
|
||||||
|
# define LINUX_DATA_START
|
||||||
|
extern int _end[];
|
||||||
|
# define DATAEND (_end)
|
||||||
|
# else
|
||||||
|
extern int etext[];
|
||||||
|
# define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
|
||||||
|
# endif
|
||||||
|
# define PREFETCH(x) \
|
||||||
|
__asm__ __volatile__ (" prefetch %0": : "m"(*(char *)(x)))
|
||||||
|
# define PREFETCH_FOR_WRITE(x) \
|
||||||
|
__asm__ __volatile__ (" prefetchw %0": : "m"(*(char *)(x)))
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
#ifdef LINUX_DATA_START
|
#ifdef LINUX_DATA_START
|
||||||
/* Some Linux distributions arrange to define __data_start. Some */
|
/* Some Linux distributions arrange to define __data_start. Some */
|
||||||
/* define data_start as a weak symbol. The latter is technically */
|
/* define data_start as a weak symbol. The latter is technically */
|
||||||
|
@ -1817,7 +1860,7 @@
|
||||||
# define CAN_SAVE_CALL_STACKS
|
# define CAN_SAVE_CALL_STACKS
|
||||||
# define CAN_SAVE_CALL_ARGS
|
# define CAN_SAVE_CALL_ARGS
|
||||||
#endif
|
#endif
|
||||||
#if defined(I386) && defined(LINUX)
|
#if (defined(I386) || defined(X86_64)) && defined(LINUX)
|
||||||
/* SAVE_CALL_CHAIN is supported if the code is compiled to save */
|
/* SAVE_CALL_CHAIN is supported if the code is compiled to save */
|
||||||
/* frame pointers by default, i.e. no -fomit-frame-pointer flag. */
|
/* frame pointers by default, i.e. no -fomit-frame-pointer flag. */
|
||||||
# define CAN_SAVE_CALL_STACKS
|
# define CAN_SAVE_CALL_STACKS
|
||||||
|
|
|
@ -2174,7 +2174,7 @@ SIG_PF GC_old_segv_handler; /* Also old MSWIN32 ACCESS_VIOLATION filter */
|
||||||
char * addr = (char *) (scp -> si_addr);
|
char * addr = (char *) (scp -> si_addr);
|
||||||
# endif
|
# endif
|
||||||
# ifdef LINUX
|
# ifdef LINUX
|
||||||
# ifdef I386
|
# if defined(I386) || defined (X86_64)
|
||||||
char * addr = (char *) (sc.cr2);
|
char * addr = (char *) (sc.cr2);
|
||||||
# else
|
# else
|
||||||
# if defined(M68K)
|
# if defined(M68K)
|
||||||
|
|
Loading…
Reference in New Issue