Passing 548 tests in 64-bit mode.
This commit is contained in:
parent
5eaa2ff469
commit
aa44ce2733
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
cp configure.32.ac configure.ac && \
|
||||||
|
autoconf && \
|
||||||
|
./configure --prefix=/Users/ikarus/.opt CFLAGS=-m32 LDFLAGS=-m32 \
|
||||||
|
&& make clean \
|
||||||
|
&& make
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
cp configure.64.ac configure.ac && \
|
||||||
|
autoconf && \
|
||||||
|
./configure CFLAGS="-m64 -I/Users/ikarus/.opt64/include" \
|
||||||
|
LDFLAGS="-m64 -L/Users/ikarus/.opt64/lib" \
|
||||||
|
&& make clean \
|
||||||
|
&& make
|
||||||
|
|
|
@ -0,0 +1,102 @@
|
||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.59)
|
||||||
|
AC_INIT(ikarus, 0.0.3, aghuloum@cs.indiana.edu)
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
AM_INIT_AUTOMAKE(ikarus, 0.0.3)
|
||||||
|
AC_CONFIG_SRCDIR([src/])
|
||||||
|
|
||||||
|
|
||||||
|
AM_PROG_AS
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -DNDEBUG -O3 -Wall -m32"
|
||||||
|
CCASFLAGS="$CCASFLAGS -m32"
|
||||||
|
LDFLAGS="$LDFLAGS -m32"
|
||||||
|
|
||||||
|
case "$target_os" in
|
||||||
|
*linux*)
|
||||||
|
LDFLAGS="-rdynamic $LDFLAGS"
|
||||||
|
;;
|
||||||
|
*bsd*)
|
||||||
|
LDFLAGS="-Wl,-E $LDFLAGS"
|
||||||
|
;;
|
||||||
|
*cygwin*)
|
||||||
|
LDFLAGS="-Wl,-E -Wl,--export-all-symbols $LDFLAGS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF(void *)
|
||||||
|
# remember to enable before release.
|
||||||
|
if (test $ac_cv_sizeof_void_p != 4); then
|
||||||
|
AC_MSG_ERROR([Ikarus can only run in 32-bit mode.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
AC_SEARCH_LIBS(dlsym, dl,, [AC_MSG_ERROR([Cannot find libdl])])
|
||||||
|
AC_SEARCH_LIBS(cos, m,, [AC_MSG_ERROR([Cannot find libm])])
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_HEADER_SYS_WAIT
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([assert.h dlfcn.h errno.h fcntl.h signal.h \
|
||||||
|
stdint.h stdlib.h string.h strings.h \
|
||||||
|
sys/mman.h sys/resource.h sys/stat.h \
|
||||||
|
sys/time.h sys/types.h sys/wait.h time.h \
|
||||||
|
unistd.h])
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([gmp.h],,[AC_MSG_ERROR([
|
||||||
|
ERROR: Cannot find libgmp.
|
||||||
|
ERROR: You might want to supply CFLAGS=-I</path/to/include> (containing
|
||||||
|
ERROR: the gmp.h header file), and LDFLAGS=-L</path/to/lib> (containing
|
||||||
|
ERROR: libgmp.so) if libgmp is installed in a non-standard location.
|
||||||
|
ERROR: libgmp can be obtained from <http://gmplib.org>. ])])
|
||||||
|
|
||||||
|
# check that gmp is present
|
||||||
|
AC_HAVE_LIBRARY([gmp],,[AC_MSG_ERROR([
|
||||||
|
ERROR: Cannot find libgmp.
|
||||||
|
ERROR: You might want to supply CFLAGS=-I</path/to/include> (containing
|
||||||
|
ERROR: the gmp.h header file), and LDFLAGS=-L</path/to/lib> (containing
|
||||||
|
ERROR: libgmp.so) if libgmp is installed in a non-standard location.
|
||||||
|
ERROR: libgmp can be obtained from <http://gmplib.org>. ])])
|
||||||
|
|
||||||
|
# check that gmp exports mpn_mul
|
||||||
|
# unfortunately, gmp.h defines mpn_mul as a macro
|
||||||
|
# that expands to __gmpn_mul on my machine.
|
||||||
|
AC_CHECK_LIB(gmp,__gmpn_mul,,[AC_MSG_ERROR([
|
||||||
|
ERROR: your version of libgmp does not contain a binding for
|
||||||
|
ERROR: some of the primitives that ikarus uses. This is most
|
||||||
|
ERROR: likely to happen if your version of gmp was compiled
|
||||||
|
ERROR: in 64-bit mode, while ikarus expects needs the 32-bit
|
||||||
|
ERROR: version. Refer to the following bug report for details
|
||||||
|
https://bugs.launchpad.net/ikarus/+bug/159235
|
||||||
|
])])
|
||||||
|
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_INLINE
|
||||||
|
AC_C_RESTRICT
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_HEADER_TIME
|
||||||
|
AC_STRUCT_TM
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_FORK
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_FUNC_MEMCMP
|
||||||
|
AC_FUNC_MMAP
|
||||||
|
AC_FUNC_STAT
|
||||||
|
AC_FUNC_STRFTIME
|
||||||
|
AC_FUNC_STRTOD
|
||||||
|
AC_CHECK_FUNCS([sigaltstack bzero gettimeofday memmove memset munmap setenv sqrt strerror getaddrinfo])
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
AC_CONFIG_FILES(Makefile src/Makefile scheme/Makefile doc/Makefile lib/Makefile benchmarks/Makefile)
|
||||||
|
AC_OUTPUT #(Makefile src/Makefile scheme/Makefile doc/Makefile)
|
||||||
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ(2.59)
|
||||||
|
AC_INIT(ikarus, 0.0.3, aghuloum@cs.indiana.edu)
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
AM_INIT_AUTOMAKE(ikarus, 0.0.3)
|
||||||
|
AC_CONFIG_SRCDIR([src/])
|
||||||
|
|
||||||
|
|
||||||
|
AM_PROG_AS
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AM_PROG_CC_C_O
|
||||||
|
|
||||||
|
CFLAGS="$CFLAGS -DNDEBUG -O3 -Wall -m64"
|
||||||
|
CCASFLAGS="$CCASFLAGS -m64"
|
||||||
|
LDFLAGS="$LDFLAGS -m64"
|
||||||
|
|
||||||
|
case "$target_os" in
|
||||||
|
*linux*)
|
||||||
|
LDFLAGS="-rdynamic $LDFLAGS"
|
||||||
|
;;
|
||||||
|
*bsd*)
|
||||||
|
LDFLAGS="-Wl,-E $LDFLAGS"
|
||||||
|
;;
|
||||||
|
*cygwin*)
|
||||||
|
LDFLAGS="-Wl,-E -Wl,--export-all-symbols $LDFLAGS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF(void *)
|
||||||
|
# remember to enable before release.
|
||||||
|
# if (test $ac_cv_sizeof_void_p != 4); then
|
||||||
|
# AC_MSG_ERROR([Ikarus can only run in 32-bit mode.])
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# Checks for libraries.
|
||||||
|
AC_SEARCH_LIBS(dlsym, dl,, [AC_MSG_ERROR([Cannot find libdl])])
|
||||||
|
AC_SEARCH_LIBS(cos, m,, [AC_MSG_ERROR([Cannot find libm])])
|
||||||
|
|
||||||
|
# Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
AC_HEADER_SYS_WAIT
|
||||||
|
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([assert.h dlfcn.h errno.h fcntl.h signal.h \
|
||||||
|
stdint.h stdlib.h string.h strings.h \
|
||||||
|
sys/mman.h sys/resource.h sys/stat.h \
|
||||||
|
sys/time.h sys/types.h sys/wait.h time.h \
|
||||||
|
unistd.h])
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([gmp.h],,[AC_MSG_ERROR([
|
||||||
|
ERROR: Cannot find libgmp.
|
||||||
|
ERROR: You might want to supply CFLAGS=-I</path/to/include> (containing
|
||||||
|
ERROR: the gmp.h header file), and LDFLAGS=-L</path/to/lib> (containing
|
||||||
|
ERROR: libgmp.so) if libgmp is installed in a non-standard location.
|
||||||
|
ERROR: libgmp can be obtained from <http://gmplib.org>. ])])
|
||||||
|
|
||||||
|
# check that gmp is present
|
||||||
|
AC_HAVE_LIBRARY([gmp],,[AC_MSG_ERROR([
|
||||||
|
ERROR: Cannot find libgmp.
|
||||||
|
ERROR: You might want to supply CFLAGS=-I</path/to/include> (containing
|
||||||
|
ERROR: the gmp.h header file), and LDFLAGS=-L</path/to/lib> (containing
|
||||||
|
ERROR: libgmp.so) if libgmp is installed in a non-standard location.
|
||||||
|
ERROR: libgmp can be obtained from <http://gmplib.org>. ])])
|
||||||
|
|
||||||
|
# check that gmp exports mpn_mul
|
||||||
|
# unfortunately, gmp.h defines mpn_mul as a macro
|
||||||
|
# that expands to __gmpn_mul on my machine.
|
||||||
|
|
||||||
|
# AC_CHECK_LIB(gmp,__gmpn_mul,,[AC_MSG_ERROR([
|
||||||
|
# ERROR: your version of libgmp does not contain a binding for
|
||||||
|
# ERROR: some of the primitives that ikarus uses. This is most
|
||||||
|
# ERROR: likely to happen if your version of gmp was compiled
|
||||||
|
# ERROR: in 64-bit mode, while ikarus expects needs the 32-bit
|
||||||
|
# ERROR: version. Refer to the following bug report for details
|
||||||
|
# https://bugs.launchpad.net/ikarus/+bug/159235
|
||||||
|
# ])])
|
||||||
|
|
||||||
|
|
||||||
|
# Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_C_INLINE
|
||||||
|
AC_C_RESTRICT
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_HEADER_TIME
|
||||||
|
AC_STRUCT_TM
|
||||||
|
|
||||||
|
# Checks for library functions.
|
||||||
|
AC_FUNC_FORK
|
||||||
|
AC_FUNC_MALLOC
|
||||||
|
AC_FUNC_MEMCMP
|
||||||
|
AC_FUNC_MMAP
|
||||||
|
AC_FUNC_STAT
|
||||||
|
AC_FUNC_STRFTIME
|
||||||
|
AC_FUNC_STRTOD
|
||||||
|
AC_CHECK_FUNCS([sigaltstack bzero gettimeofday memmove memset munmap setenv sqrt strerror getaddrinfo])
|
||||||
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
AC_CONFIG_FILES(Makefile src/Makefile scheme/Makefile doc/Makefile lib/Makefile benchmarks/Makefile)
|
||||||
|
AC_OUTPUT #(Makefile src/Makefile scheme/Makefile doc/Makefile)
|
||||||
|
|
|
@ -2154,6 +2154,18 @@
|
||||||
(not (<= (- (expt 2 31)) n (- (expt 2 31) 1)))]
|
(not (<= (- (expt 2 31)) n (- (expt 2 31) 1)))]
|
||||||
[else #t])]
|
[else #t])]
|
||||||
[else #f]))
|
[else #f]))
|
||||||
|
(define (small-operand? x)
|
||||||
|
(case wordsize
|
||||||
|
[(4) (not (mem? x))]
|
||||||
|
[(8)
|
||||||
|
(struct-case x
|
||||||
|
[(constant n)
|
||||||
|
(cond
|
||||||
|
[(integer? n)
|
||||||
|
(<= (- (expt 2 31)) n (- (expt 2 31) 1))]
|
||||||
|
[else #f])]
|
||||||
|
[else (or (register? x) (var? x))])]
|
||||||
|
[else (error 'small-operand? "huh?")]))
|
||||||
(define (mem? x)
|
(define (mem? x)
|
||||||
(or (disp? x) (fvar? x)))
|
(or (disp? x) (fvar? x)))
|
||||||
;;; unspillable effect
|
;;; unspillable effect
|
||||||
|
@ -2183,7 +2195,7 @@
|
||||||
(E (make-asm-instr 'move u a))
|
(E (make-asm-instr 'move u a))
|
||||||
(E (make-asm-instr op u b)))
|
(E (make-asm-instr op u b)))
|
||||||
(E (make-asm-instr 'move a u))))]
|
(E (make-asm-instr 'move a u))))]
|
||||||
[(and (mem? a) (mem? b))
|
[(and (mem? a) (not (small-operand? b)))
|
||||||
(let ([u (mku)])
|
(let ([u (mku)])
|
||||||
(make-seq
|
(make-seq
|
||||||
(E (make-asm-instr 'move u b))
|
(E (make-asm-instr 'move u b))
|
||||||
|
@ -2201,7 +2213,12 @@
|
||||||
(make-seq
|
(make-seq
|
||||||
(E (make-asm-instr 'move u s1))
|
(E (make-asm-instr 'move u s1))
|
||||||
(E (make-asm-instr op (make-disp s0 u) b))))]
|
(E (make-asm-instr op (make-disp s0 u) b))))]
|
||||||
[else x]))]
|
[(small-operand? b) x]
|
||||||
|
[else
|
||||||
|
(let ([u (mku)])
|
||||||
|
(make-seq
|
||||||
|
(E (make-asm-instr 'move u b))
|
||||||
|
(E (make-asm-instr op a u))))]))]
|
||||||
[(disp? b)
|
[(disp? b)
|
||||||
(let ([s0 (disp-s0 b)] [s1 (disp-s1 b)])
|
(let ([s0 (disp-s0 b)] [s1 (disp-s1 b)])
|
||||||
(cond
|
(cond
|
||||||
|
@ -2244,7 +2261,7 @@
|
||||||
x]
|
x]
|
||||||
[(mset bset/c bset/h)
|
[(mset bset/c bset/h)
|
||||||
(cond
|
(cond
|
||||||
[(mem? b)
|
[(not (small-operand? b))
|
||||||
(let ([u (mku)])
|
(let ([u (mku)])
|
||||||
(make-seq
|
(make-seq
|
||||||
(E (make-asm-instr 'move u b))
|
(E (make-asm-instr 'move u b))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1439
|
1440
|
||||||
|
|
Loading…
Reference in New Issue