Remove deprecated 8-bit opcodes
This commit is contained in:
parent
07391b9ced
commit
c3244b0148
8 changed files with 20 additions and 85 deletions
|
|
@ -67,6 +67,7 @@
|
|||
- buildsystem parallel builds work (i.e make -j999)
|
||||
- ECL builds on consoles with unusual encodings on Windows (i.e cp936)
|
||||
** API changes
|
||||
- deprecated configure option ~--enable-opcode8~ has been removed
|
||||
- mk-defsystem is not build by default (enable by ~--with-defsystem=yes~)
|
||||
- asdf:make-build accepts ~:init-name~ argument for libraries
|
||||
this allows specifying human-memorable initialization function name to call
|
||||
|
|
|
|||
|
|
@ -23,9 +23,6 @@
|
|||
/* Use CMU Common-Lisp's FORMAT routine */
|
||||
#define ECL_CMU_FORMAT 1
|
||||
|
||||
/* Bytecodes and arguments are 8 and 16 bits large, respectively */
|
||||
/* #undef ECL_SMALL_BYTECODES */
|
||||
|
||||
/* Assembler implementation of APPLY and friends */
|
||||
/* #undef ECL_ASM_APPLY */
|
||||
|
||||
|
|
|
|||
|
|
@ -189,20 +189,7 @@ asm_end(cl_env_ptr env, cl_index beginning, cl_object definition) {
|
|||
return bytecodes;
|
||||
}
|
||||
|
||||
#if defined(ECL_SMALL_BYTECODES)
|
||||
static void
|
||||
asm_arg(cl_env_ptr env, int n) {
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
asm_op(env, (n >> 8) & 0xFF);
|
||||
asm_op(env, n & 0xFF);
|
||||
#else
|
||||
asm_op(env, n & 0xFF);
|
||||
asm_op(env, (n >> 8) & 0xFF);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
#define asm_arg(env,n) asm_op(env,n)
|
||||
#endif
|
||||
|
||||
static void
|
||||
asm_op(cl_env_ptr env, cl_fixnum code) {
|
||||
|
|
@ -249,19 +236,7 @@ asm_complete(cl_env_ptr env, int op, cl_index pc) {
|
|||
else if (ecl_unlikely(delta < -MAX_OPARG || delta > MAX_OPARG))
|
||||
FEprogram_error("Too large jump", 0);
|
||||
else {
|
||||
#ifdef ECL_SMALL_BYTECODES
|
||||
unsigned char low = delta & 0xFF;
|
||||
char high = delta >> 8;
|
||||
# ifdef WORDS_BIGENDIAN
|
||||
env->stack[pc] = (cl_object)(cl_fixnum)high;
|
||||
env->stack[pc+1] = (cl_object)(cl_fixnum)low;
|
||||
# else
|
||||
env->stack[pc] = (cl_object)(cl_fixnum)low;
|
||||
env->stack[pc+1] = (cl_object)(cl_fixnum)high;
|
||||
# endif
|
||||
#else
|
||||
env->stack[pc] = (cl_object)(cl_fixnum)delta;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
37
src/configure
vendored
37
src/configure
vendored
|
|
@ -737,6 +737,7 @@ infodir
|
|||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
|
|
@ -781,7 +782,6 @@ with_libgc_prefix
|
|||
with_libgc_incdir
|
||||
with_libgc_libdir
|
||||
with___thread
|
||||
enable_opcode8
|
||||
with_cxx
|
||||
with_tcp
|
||||
with_serve_event
|
||||
|
|
@ -866,6 +866,7 @@ datadir='${datarootdir}'
|
|||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
|
|
@ -1118,6 +1119,15 @@ do
|
|||
| -silent | --silent | --silen | --sile | --sil)
|
||||
silent=yes ;;
|
||||
|
||||
-runstatedir | --runstatedir | --runstatedi | --runstated \
|
||||
| --runstate | --runstat | --runsta | --runst | --runs \
|
||||
| --run | --ru | --r)
|
||||
ac_prev=runstatedir ;;
|
||||
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
|
||||
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
|
||||
| --run=* | --ru=* | --r=*)
|
||||
runstatedir=$ac_optarg ;;
|
||||
|
||||
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
||||
ac_prev=sbindir ;;
|
||||
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
||||
|
|
@ -1255,7 +1265,7 @@ fi
|
|||
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
|
||||
datadir sysconfdir sharedstatedir localstatedir includedir \
|
||||
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
|
||||
libdir localedir mandir
|
||||
libdir localedir mandir runstatedir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
|
|
@ -1408,6 +1418,7 @@ Fine tuning of the installation directories:
|
|||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
||||
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
||||
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
||||
|
|
@ -1458,8 +1469,6 @@ Optional Features:
|
|||
(no|yes, default=yes)
|
||||
--enable-gmp version of the GMP library
|
||||
(portable|included|system|auto, default=auto)
|
||||
--enable-opcode8 Deprecated! interpreter uses 8-bit codes
|
||||
(default=NO, only works on Intel)
|
||||
--enable-unicode={yes|no|32}
|
||||
enable support for unicode (default=YES)
|
||||
--enable-longdouble include support for long double (yes|no|auto,
|
||||
|
|
@ -2771,14 +2780,6 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --enable-opcode8 was given.
|
||||
if test "${enable_opcode8+set}" = set; then :
|
||||
enableval=$enable_opcode8; opcode8=${enableval}
|
||||
else
|
||||
opcode8=no
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-cxx was given.
|
||||
if test "${with_cxx+set}" = set; then :
|
||||
|
|
@ -8940,6 +8941,8 @@ main ()
|
|||
if (*(data + i) != *(data3 + i))
|
||||
return 14;
|
||||
close (fd);
|
||||
free (data);
|
||||
free (data3);
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
|
|
@ -9393,8 +9396,8 @@ if test "x$ac_cv_func_feenableexcept" = xyes; then :
|
|||
$as_echo "#define HAVE_FEENABLEEXCEPT /**/" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: feenableexcept not declared: disabling floating point exceptions" >&5
|
||||
$as_echo "$as_me: WARNING: feenableexcept not declared: disabling floating point exceptions" >&2;}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: feenableexcept not provided: disabling floating point exceptions" >&5
|
||||
$as_echo "$as_me: WARNING: feenableexcept not provided: disabling floating point exceptions" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -9493,12 +9496,6 @@ $as_echo "#define ECL_CXX_CORE 1" >>confdefs.h
|
|||
boehm_configure_flags="${boehm_configure_flags} --enable-cplusplus"
|
||||
fi
|
||||
|
||||
if test ! ${opcode8} = "no" ; then
|
||||
|
||||
$as_echo "#define ECL_SMALL_BYTECODES 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test "x${cross_compiling}" != "xyes"; then
|
||||
if test "$cross_compiling" = yes; then :
|
||||
|
|
|
|||
|
|
@ -143,11 +143,6 @@ AC_ARG_WITH(__thread,
|
|||
[(supported by NPTL-aware glibc and maybe Windows)] ),
|
||||
[], [with___thread=no])
|
||||
|
||||
AC_ARG_ENABLE(opcode8,
|
||||
AS_HELP_STRING( [--enable-opcode8],
|
||||
[Deprecated! interpreter uses 8-bit codes (default=NO, only works on Intel)]),
|
||||
[opcode8=${enableval}], [opcode8=no])
|
||||
|
||||
AC_ARG_WITH(cxx,
|
||||
AS_HELP_STRING( [--with-cxx],
|
||||
[build ECL using C++ compiler (default=NO)]),
|
||||
|
|
@ -787,13 +782,6 @@ else
|
|||
boehm_configure_flags="${boehm_configure_flags} --enable-cplusplus"
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Do we need to have 8-bit opcodes?
|
||||
if test ! ${opcode8} = "no" ; then
|
||||
AC_DEFINE( ECL_SMALL_BYTECODES, [1],
|
||||
[Bytecodes and arguments are 8 and 16 bits large, respectively])
|
||||
fi
|
||||
|
||||
ECL_GCC_BACKTRACE
|
||||
ECL_LIBATOMIC_OPS
|
||||
|
||||
|
|
|
|||
|
|
@ -45,9 +45,6 @@
|
|||
/* ECL_SIGNED_ZERO */
|
||||
#undef ECL_SIGNED_ZERO
|
||||
|
||||
/* Bytecodes and arguments are 8 and 16 bits large, respectively */
|
||||
#undef ECL_SMALL_BYTECODES
|
||||
|
||||
/* ECL_SMALL_CONS */
|
||||
#undef ECL_SMALL_CONS
|
||||
|
||||
|
|
|
|||
|
|
@ -101,30 +101,13 @@ enum {
|
|||
#define MAX_OPARG 0x7FFF
|
||||
typedef int16_t cl_oparg;
|
||||
|
||||
/*
|
||||
* Note that in the small bytecodes case, we have to recompose a signed
|
||||
* small integer out of its pieces. We have to be careful because the
|
||||
* least significant byte has to be interpreted as unsigned, while the
|
||||
* most significant byte carries a sign.
|
||||
*/
|
||||
#ifdef ECL_SMALL_BYTECODES
|
||||
typedef signed char cl_opcode;
|
||||
# define OPCODE_SIZE 1
|
||||
# define OPARG_SIZE 2
|
||||
# ifdef WORDS_BIGENDIAN
|
||||
# define READ_OPARG(v) ((cl_fixnum)v[0] << 8) + (unsigned char)v[1]
|
||||
# else
|
||||
# define READ_OPARG(v) ((cl_fixnum)v[1] << 8) + (unsigned char)v[0]
|
||||
# endif
|
||||
# define GET_OPARG(r,v) { r = READ_OPARG(v); v += 2; }
|
||||
#else
|
||||
typedef int16_t cl_opcode;
|
||||
typedef int16_t cl_opcode;
|
||||
# define OPCODE_SIZE 1
|
||||
# define OPARG_SIZE 1
|
||||
# define READ_OPCODE(v) v[0]
|
||||
# define READ_OPARG(v) v[0]
|
||||
# define GET_OPARG(r,v) { r = *(v++); }
|
||||
#endif
|
||||
|
||||
#define GET_OPCODE(v) *((v)++)
|
||||
#define GET_DATA(r,v,data) { \
|
||||
cl_oparg ndx; \
|
||||
|
|
|
|||
|
|
@ -31,9 +31,6 @@
|
|||
/* Undefine this if you do not want ECL to check for circular lists */
|
||||
#define ECL_SAFE
|
||||
|
||||
/* Bytecodes and arguments are 8 and 16 bits large, respectively */
|
||||
#undef ECL_SMALL_BYTECODES
|
||||
|
||||
/* Assembler implementation of APPLY and friends */
|
||||
#undef ECL_ASM_APPLY
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue