mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-31 06:40:50 -08:00
Only use 64 bits intel assembler when compiler supports it
This commit is contained in:
parent
6faa88cb16
commit
eef4026f7d
5 changed files with 129 additions and 118 deletions
|
|
@ -66,6 +66,9 @@ ECL 0.9k:
|
|||
- The reader function for #\ was not suitable for being invoked by the
|
||||
user on an arbitrary stream.
|
||||
|
||||
- ECL tried to use intel-64bits assembler on 64 bits processors, even though
|
||||
compiler and the operating system work with 32bits.
|
||||
|
||||
;;; Local Variables: ***
|
||||
;;; mode:text ***
|
||||
;;; fill-column:79 ***
|
||||
|
|
|
|||
6
src/aclocal.m4
vendored
6
src/aclocal.m4
vendored
|
|
@ -558,7 +558,11 @@ case "${host_cpu}" in
|
|||
dynamic_ffi=yes
|
||||
;;
|
||||
x86_64 )
|
||||
EXTRA_OBJS="${EXTRA_OBJS} ffi_x86_64.o"
|
||||
if [ "${CL_FIXNUM_BITS}" = 32 ]; then
|
||||
EXTRA_OBJS="${EXTRA_OBJS} ffi_x86.o"
|
||||
else
|
||||
EXTRA_OBJS="${EXTRA_OBJS} ffi_x86_64.o"
|
||||
fi
|
||||
dynamic_ffi=yes
|
||||
;;
|
||||
*)
|
||||
|
|
|
|||
228
src/configure
vendored
228
src/configure
vendored
|
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# From configure.in Revision: 1.149 .
|
||||
# From configure.in Revision: 1.150 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for ecl 0.9j.
|
||||
#
|
||||
|
|
@ -717,14 +717,14 @@ INSTALL_INFO
|
|||
XMKMF
|
||||
GREP
|
||||
EGREP
|
||||
ECL_SETJMP
|
||||
ECL_LONGJMP
|
||||
ECL_FILE_CNT
|
||||
ECL_FPE_CODE
|
||||
CL_FIXNUM_TYPE
|
||||
CL_FIXNUM_BITS
|
||||
CL_FIXNUM_MAX
|
||||
CL_FIXNUM_MIN
|
||||
ECL_SETJMP
|
||||
ECL_LONGJMP
|
||||
ECL_FILE_CNT
|
||||
ECL_FPE_CODE
|
||||
LIBOBJS
|
||||
POW_LIB
|
||||
ECL_CC
|
||||
|
|
@ -7209,6 +7209,108 @@ if test "${GCC}" = "yes"; then
|
|||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking appropiate type for fixnums" >&5
|
||||
echo $ECHO_N "checking appropiate type for fixnums... $ECHO_C" >&6; }
|
||||
if test -z "${CL_FIXNUM_TYPE}" ; then
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
const char *int_type;
|
||||
int bits;
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
if (sizeof(int) >= sizeof(void*)) {
|
||||
unsigned int t = 1;
|
||||
signed int l = 0;
|
||||
int_type="int";
|
||||
for (bits=1; ((t << 1) >> 1) == t; bits++, t <<= 1);
|
||||
l = (~l) << (bits - 3);
|
||||
#if 1
|
||||
fprintf(f,"CL_FIXNUM_MIN='%d';",l);
|
||||
fprintf(f,"CL_FIXNUM_MAX='%d';",-(l+1));
|
||||
#else
|
||||
l++;
|
||||
fprintf(f,"CL_FIXNUM_MIN='%d';",l);
|
||||
fprintf(f,"CL_FIXNUM_MAX='%d';",-l);
|
||||
#endif
|
||||
} else if (sizeof(long) >= sizeof(void*)) {
|
||||
unsigned long int t = 1;
|
||||
signed long int l = 0;
|
||||
int_type="long int";
|
||||
for (bits=1; ((t << 1) >> 1) == t; bits++, t <<= 1);
|
||||
l = (~l) << (bits - 3);
|
||||
#if 1
|
||||
fprintf(f,"CL_FIXNUM_MIN='%ld';",l);
|
||||
fprintf(f,"CL_FIXNUM_MAX='%ld';",-(l+1));
|
||||
#else
|
||||
l++;
|
||||
fprintf(f,"CL_FIXNUM_MIN='%ld';",l);
|
||||
fprintf(f,"CL_FIXNUM_MAX='%ld';",-l);
|
||||
#endif
|
||||
} else
|
||||
exit(1);
|
||||
fprintf(f,"CL_FIXNUM_TYPE='%s';",int_type);
|
||||
fprintf(f,"CL_FIXNUM_BITS='%d'",bits);
|
||||
exit(0);
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
{ (case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_try") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
eval "`cat conftestval`"
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "${CL_FIXNUM_TYPE}" ; then
|
||||
{ { echo "$as_me:$LINENO: error: There is no appropiate integer type for the cl_fixnum type" >&5
|
||||
echo "$as_me: error: There is no appropiate integer type for the cl_fixnum type" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: ${CL_FIXNUM_TYPE}" >&5
|
||||
echo "${ECHO_T}${CL_FIXNUM_TYPE}" >&6; }
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking character sequence for end of line" >&5
|
||||
echo $ECHO_N "checking character sequence for end of line... $ECHO_C" >&6; }
|
||||
if test -z "${ECL_NEWLINE}" ; then
|
||||
|
|
@ -7551,7 +7653,11 @@ case "${host_cpu}" in
|
|||
dynamic_ffi=yes
|
||||
;;
|
||||
x86_64 )
|
||||
EXTRA_OBJS="${EXTRA_OBJS} ffi_x86_64.o"
|
||||
if "${CL_FIXNUM_BITS}" = 32 ; then
|
||||
EXTRA_OBJS="${EXTRA_OBJS} ffi_x86.o"
|
||||
else
|
||||
EXTRA_OBJS="${EXTRA_OBJS} ffi_x86_64.o"
|
||||
fi
|
||||
dynamic_ffi=yes
|
||||
;;
|
||||
*)
|
||||
|
|
@ -7867,108 +7973,6 @@ echo "$as_me: error: Unable to determine stack growth direction" >&2;}
|
|||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking appropiate type for fixnums" >&5
|
||||
echo $ECHO_N "checking appropiate type for fixnums... $ECHO_C" >&6; }
|
||||
if test -z "${CL_FIXNUM_TYPE}" ; then
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&5
|
||||
echo "$as_me: error: cannot run test program while cross compiling
|
||||
See \`config.log' for more details." >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
int main() {
|
||||
const char *int_type;
|
||||
int bits;
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
if (sizeof(int) >= sizeof(void*)) {
|
||||
unsigned int t = 1;
|
||||
signed int l = 0;
|
||||
int_type="int";
|
||||
for (bits=1; ((t << 1) >> 1) == t; bits++, t <<= 1);
|
||||
l = (~l) << (bits - 3);
|
||||
#if 1
|
||||
fprintf(f,"CL_FIXNUM_MIN='%d';",l);
|
||||
fprintf(f,"CL_FIXNUM_MAX='%d';",-(l+1));
|
||||
#else
|
||||
l++;
|
||||
fprintf(f,"CL_FIXNUM_MIN='%d';",l);
|
||||
fprintf(f,"CL_FIXNUM_MAX='%d';",-l);
|
||||
#endif
|
||||
} else if (sizeof(long) >= sizeof(void*)) {
|
||||
unsigned long int t = 1;
|
||||
signed long int l = 0;
|
||||
int_type="long int";
|
||||
for (bits=1; ((t << 1) >> 1) == t; bits++, t <<= 1);
|
||||
l = (~l) << (bits - 3);
|
||||
#if 1
|
||||
fprintf(f,"CL_FIXNUM_MIN='%ld';",l);
|
||||
fprintf(f,"CL_FIXNUM_MAX='%ld';",-(l+1));
|
||||
#else
|
||||
l++;
|
||||
fprintf(f,"CL_FIXNUM_MIN='%ld';",l);
|
||||
fprintf(f,"CL_FIXNUM_MAX='%ld';",-l);
|
||||
#endif
|
||||
} else
|
||||
exit(1);
|
||||
fprintf(f,"CL_FIXNUM_TYPE='%s';",int_type);
|
||||
fprintf(f,"CL_FIXNUM_BITS='%d'",bits);
|
||||
exit(0);
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_link") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
{ (case "(($ac_try" in
|
||||
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
*) ac_try_echo=$ac_try;;
|
||||
esac
|
||||
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
(eval "$ac_try") 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
eval "`cat conftestval`"
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
fi
|
||||
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "${CL_FIXNUM_TYPE}" ; then
|
||||
{ { echo "$as_me:$LINENO: error: There is no appropiate integer type for the cl_fixnum type" >&5
|
||||
echo "$as_me: error: There is no appropiate integer type for the cl_fixnum type" >&2;}
|
||||
{ (exit 1); exit 1; }; }
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: ${CL_FIXNUM_TYPE}" >&5
|
||||
echo "${ECHO_T}${CL_FIXNUM_TYPE}" >&6; }
|
||||
|
||||
|
||||
{ echo "$as_me:$LINENO: checking whether closedir returns void" >&5
|
||||
echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6; }
|
||||
if test "${ac_cv_func_closedir_void+set}" = set; then
|
||||
|
|
@ -12036,14 +12040,14 @@ INSTALL_INFO!$INSTALL_INFO$ac_delim
|
|||
XMKMF!$XMKMF$ac_delim
|
||||
GREP!$GREP$ac_delim
|
||||
EGREP!$EGREP$ac_delim
|
||||
ECL_SETJMP!$ECL_SETJMP$ac_delim
|
||||
ECL_LONGJMP!$ECL_LONGJMP$ac_delim
|
||||
ECL_FILE_CNT!$ECL_FILE_CNT$ac_delim
|
||||
ECL_FPE_CODE!$ECL_FPE_CODE$ac_delim
|
||||
CL_FIXNUM_TYPE!$CL_FIXNUM_TYPE$ac_delim
|
||||
CL_FIXNUM_BITS!$CL_FIXNUM_BITS$ac_delim
|
||||
CL_FIXNUM_MAX!$CL_FIXNUM_MAX$ac_delim
|
||||
CL_FIXNUM_MIN!$CL_FIXNUM_MIN$ac_delim
|
||||
ECL_SETJMP!$ECL_SETJMP$ac_delim
|
||||
ECL_LONGJMP!$ECL_LONGJMP$ac_delim
|
||||
ECL_FILE_CNT!$ECL_FILE_CNT$ac_delim
|
||||
ECL_FPE_CODE!$ECL_FPE_CODE$ac_delim
|
||||
LIBOBJS!$LIBOBJS$ac_delim
|
||||
POW_LIB!$POW_LIB$ac_delim
|
||||
ECL_CC!$ECL_CC$ac_delim
|
||||
|
|
|
|||
|
|
@ -397,6 +397,10 @@ if test "${GCC}" = "yes"; then
|
|||
CFLAGS="${CFLAGS} -fstrict-aliasing"
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check the appropiate type for cl_fixnum/cl_index
|
||||
ECL_FIXNUM_TYPE
|
||||
|
||||
ECL_LINEFEED_MODE
|
||||
ECL_FIND_SETJMP
|
||||
ECL_FILE_STRUCTURE
|
||||
|
|
@ -414,10 +418,6 @@ dnl -----------------------------------------------------------------------
|
|||
dnl Study the call conventions
|
||||
ECL_STACK_DIRECTION
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check the appropiate type for cl_fixnum/cl_index
|
||||
ECL_FIXNUM_TYPE
|
||||
|
||||
dnl =====================================================================
|
||||
dnl Checks for library functions
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Returns, as a string, the location of the machine on which ECL runs."
|
|||
(defun lisp-implementation-version ()
|
||||
"Args:()
|
||||
Returns the version of your ECL as a string."
|
||||
"@PACKAGE_VERSION@ (CVS 2008-02-03 12:26)")
|
||||
"@PACKAGE_VERSION@ (CVS 2008-02-03 13:04)")
|
||||
|
||||
(defun machine-type ()
|
||||
"Args: ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue