6649 lines
186 KiB
Plaintext
6649 lines
186 KiB
Plaintext
Patch name: portable1
|
|
Date: Tue Apr 3 19:35:37 EDT 2001
|
|
Author: Bryce Denney <bryce dot denney at bigfoot dot com>
|
|
Apply to: bochs-2000_0325a.tar.gz
|
|
How to apply: patch -p1 < THIS_PATCH_FILE
|
|
|
|
This patch is called "portable1" and it attempts to make bochs compile
|
|
on a wider variety of systems, including non-gcc compilers. The changes
|
|
were brought from the SMP-bochs source code base, but there is nothing
|
|
related to SMP in this patch!
|
|
|
|
Contents:
|
|
|
|
Makes the configure script check for several common compilation problems:
|
|
|
|
- check for sizeof int*
|
|
The size of a pointer is used to create an integer type bx_ptr_equiv_t,
|
|
is an integer type whose size equals that of a pointer.
|
|
sizeof(bx_ptr_equiv_t) == size(int *). This is used in the FPU code
|
|
to do clean type conversions between pointers and integers. Before
|
|
the patch, there are cases where a pointer is cast to a 32-bit int,
|
|
then later cast to a pointer and dereferenced, which crashes any 64-bit
|
|
machine. See PTR2INT and REGNO2PTR in fpu/fpu_system.h for more.
|
|
|
|
- check for snprintf, strtoull
|
|
These library functions are not found on all machines. When configure
|
|
sees that one is not found, it defines HAVE_SNPRINTF=0 or
|
|
HAVE_STRTOULL=0 in config.h. This enables code in main.cc which
|
|
defines a replacement for the missing function.
|
|
|
|
- check if empty structs allowed
|
|
Some compilers don't allow "typedef struct { } foo;" For these,
|
|
configure defines BX_NO_EMPTY_STRUCTS=1 to trigger a workaround.
|
|
|
|
- check for hash_map.h
|
|
Some people don't have hash_map.h at all. If not, configure defines
|
|
BX_HAVE_HASH_MAP=0 to disable some code in the debugger.
|
|
|
|
- check for labels at the end of a block, as in
|
|
void main () { /*some code*/ label: }
|
|
If this causes a compiler error, configure defines
|
|
BX_NO_BLANK_LABELS=1 for a workaround.
|
|
|
|
- check if __attribute__ allowed
|
|
If __attribute__ causes a compiler error, configure BX_NO_ATTRIBUTES
|
|
and the code is ignored by a preprocessor macro.
|
|
|
|
- if --enable-debugger, turn on --enable-disasm too.
|
|
|
|
Also some code changes to improve portability:
|
|
- some compilers can't handle any chars after an #endif, so I
|
|
commented them.
|
|
- wrong type arg1 of bx_dbg_watch and bx_dbg_unwatch. The code in
|
|
lexer.l was calling it with integers (not booleans) so I made it
|
|
an integer.
|
|
- in fpu code, "setcc" macro was implemented with braces inside parens,
|
|
which some compilers don't understand.
|
|
- in fpu_entry.c, FPU_load_int32 was consistently called with arg1 of
|
|
type (s32 *), but should be (u32 *)
|
|
- comment out sigcontext structure in fpu/stubs/asm/sigcontext.h because
|
|
it conflicted with sigcontext of other machines. This struct was never
|
|
used by bochs anyway.
|
|
- added a missing comma in gui/nogui.cc!
|
|
|
|
|
|
-------------patch begins here---------------------------------------------
|
|
diff -crN bochs-clean-2000-03-25/Makefile.in portable1/Makefile.in
|
|
*** bochs-clean-2000-03-25/Makefile.in Tue Apr 3 15:19:41 2001
|
|
--- portable1/Makefile.in Tue Apr 3 18:47:23 2001
|
|
***************
|
|
*** 74,80 ****
|
|
main.o \
|
|
load32bitOShack.o \
|
|
state_file.o \
|
|
! pc_system.o
|
|
|
|
EXTERN_ENVIRONMENT_OBJS = \
|
|
main.o \
|
|
--- 74,82 ----
|
|
main.o \
|
|
load32bitOShack.o \
|
|
state_file.o \
|
|
! pc_system.o \
|
|
! snprintf.o \
|
|
! strtoull.o
|
|
|
|
EXTERN_ENVIRONMENT_OBJS = \
|
|
main.o \
|
|
***************
|
|
*** 90,96 ****
|
|
|
|
BX_OBJS = @NONINLINE_VAR@
|
|
|
|
! BX_INCLUDES = bochs.h config.h
|
|
|
|
|
|
.@CPP_SUFFIX@.o:
|
|
--- 92,98 ----
|
|
|
|
BX_OBJS = @NONINLINE_VAR@
|
|
|
|
! BX_INCLUDES = bochs.h config.h osdep.h
|
|
|
|
|
|
.@CPP_SUFFIX@.o:
|
|
diff -crN bochs-clean-2000-03-25/bochs.h portable1/bochs.h
|
|
*** bochs-clean-2000-03-25/bochs.h Tue Apr 3 15:19:41 2001
|
|
--- portable1/bochs.h Tue Apr 3 18:51:06 2001
|
|
***************
|
|
*** 66,72 ****
|
|
#endif
|
|
#endif
|
|
|
|
! #include "config.h"
|
|
#include "debug/debug.h"
|
|
|
|
//
|
|
--- 66,73 ----
|
|
#endif
|
|
#endif
|
|
|
|
! #include "config.h" /* generated by configure script from config.h.in */
|
|
! #include "osdep.h" /* platform dependent includes and defines */
|
|
#include "debug/debug.h"
|
|
|
|
//
|
|
diff -crN bochs-clean-2000-03-25/config.h.in portable1/config.h.in
|
|
*** bochs-clean-2000-03-25/config.h.in Tue Apr 3 15:19:41 2001
|
|
--- portable1/config.h.in Tue Apr 3 18:16:42 2001
|
|
***************
|
|
*** 262,267 ****
|
|
--- 262,268 ----
|
|
#define SIZEOF_UNSIGNED_INT 0
|
|
#define SIZEOF_UNSIGNED_LONG 0
|
|
#define SIZEOF_UNSIGNED_LONG_LONG 0
|
|
+ #define SIZEOF_INT_P 0
|
|
|
|
#if BX_WITH_WIN32
|
|
typedef unsigned char Bit8u;
|
|
***************
|
|
*** 327,332 ****
|
|
--- 328,345 ----
|
|
#endif // BX_WITH_WIN32
|
|
|
|
|
|
+ // create an unsigned integer type that is the same size as a pointer.
|
|
+ // You can typecast a pointer to a bx_pr_equiv_t without losing any
|
|
+ // bits (and without getting the compiler excited). This is used in
|
|
+ // the FPU emulation code, where pointers and integers are often
|
|
+ // used interchangeably.
|
|
+ #if SIZEOF_INT_P == 4
|
|
+ typedef Bit32u bx_ptr_equiv_t;
|
|
+ #elif SIZEOF_INT_P == 8
|
|
+ typedef Bit64u bx_ptr_equiv_t;
|
|
+ #else
|
|
+ # error "could define bx_ptr_equiv_t to size of int*"
|
|
+ #endif
|
|
|
|
|
|
#if BX_WITH_MACOS == 0
|
|
***************
|
|
*** 389,394 ****
|
|
--- 402,426 ----
|
|
#define BX_SUPPORT_FPU 0
|
|
|
|
#define BX_HAVE_SELECT 0
|
|
+ #define BX_HAVE_SNPRINTF 0
|
|
+ #define BX_HAVE_STRTOULL 0
|
|
+
|
|
+ // set if your compiler does not permit an empty struct
|
|
+ #define BX_NO_EMPTY_STRUCTS 0
|
|
+
|
|
+ // set if your compiler does not understand __attribute__ after a struct
|
|
+ #define BX_NO_ATTRIBUTES 0
|
|
+ #if BX_NO_ATTRIBUTES
|
|
+ #define GCC_ATTRIBUTE(x) /* attribute not supported */
|
|
+ #else
|
|
+ #define GCC_ATTRIBUTE __attribute__
|
|
+ #endif
|
|
+
|
|
+ // set if your compiler does not allow label at the end of a {} block
|
|
+ #define BX_NO_BLANK_LABELS 0
|
|
+
|
|
+ // set if you don't have <hash_map.h>, used in debug/dbg_main.c
|
|
+ #define BX_HAVE_HASH_MAP 0
|
|
|
|
// Support x86 hardware debugger registers and facilites.
|
|
// These are the debug facilites offered by the x86 architecture,
|
|
diff -crN bochs-clean-2000-03-25/configure portable1/configure
|
|
*** bochs-clean-2000-03-25/configure Tue Apr 3 15:19:42 2001
|
|
--- portable1/configure Tue Apr 3 17:31:10 2001
|
|
***************
|
|
*** 1,7 ****
|
|
#! /bin/sh
|
|
|
|
# Guess values for system-dependent variables and create Makefiles.
|
|
! # Generated automatically using autoconf version 2.12
|
|
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
|
#
|
|
# This configure script is free software; the Free Software Foundation
|
|
--- 1,7 ----
|
|
#! /bin/sh
|
|
|
|
# Guess values for system-dependent variables and create Makefiles.
|
|
! # Generated automatically using autoconf version 2.13
|
|
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
|
#
|
|
# This configure script is free software; the Free Software Foundation
|
|
***************
|
|
*** 105,110 ****
|
|
--- 105,111 ----
|
|
# Initialize some other variables.
|
|
subdirs=
|
|
MFLAGS= MAKEFLAGS=
|
|
+ SHELL=${CONFIG_SHELL-/bin/sh}
|
|
# Maximum number of lines to put in a shell here document.
|
|
ac_max_here_lines=12
|
|
|
|
***************
|
|
*** 388,394 ****
|
|
verbose=yes ;;
|
|
|
|
-version | --version | --versio | --versi | --vers)
|
|
! echo "configure generated by autoconf version 2.12"
|
|
exit 0 ;;
|
|
|
|
-with-* | --with-*)
|
|
--- 389,395 ----
|
|
verbose=yes ;;
|
|
|
|
-version | --version | --versio | --versi | --vers)
|
|
! echo "configure generated by autoconf version 2.13"
|
|
exit 0 ;;
|
|
|
|
-with-* | --with-*)
|
|
***************
|
|
*** 558,566 ****
|
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
ac_cpp='$CPP $CPPFLAGS'
|
|
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
|
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
|
|
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
|
|
--- 559,569 ----
|
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
ac_cpp='$CPP $CPPFLAGS'
|
|
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'
|
|
cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
+ ac_exeext=
|
|
+ ac_objext=o
|
|
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
|
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
|
|
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
|
|
***************
|
|
*** 582,596 ****
|
|
# Extract the first word of "gcc", so it can be a program name with args.
|
|
set dummy gcc; ac_word=$2
|
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
! echo "configure:586: checking for $ac_word" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
if test -n "$CC"; then
|
|
ac_cv_prog_CC="$CC" # Let the user override the test.
|
|
else
|
|
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
! for ac_dir in $PATH; do
|
|
test -z "$ac_dir" && ac_dir=.
|
|
if test -f $ac_dir/$ac_word; then
|
|
ac_cv_prog_CC="gcc"
|
|
--- 585,600 ----
|
|
# Extract the first word of "gcc", so it can be a program name with args.
|
|
set dummy gcc; ac_word=$2
|
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
! echo "configure:589: checking for $ac_word" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
if test -n "$CC"; then
|
|
ac_cv_prog_CC="$CC" # Let the user override the test.
|
|
else
|
|
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|
! ac_dummy="$PATH"
|
|
! for ac_dir in $ac_dummy; do
|
|
test -z "$ac_dir" && ac_dir=.
|
|
if test -f $ac_dir/$ac_word; then
|
|
ac_cv_prog_CC="gcc"
|
|
***************
|
|
*** 611,626 ****
|
|
# Extract the first word of "cc", so it can be a program name with args.
|
|
set dummy cc; ac_word=$2
|
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
! echo "configure:615: checking for $ac_word" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
if test -n "$CC"; then
|
|
ac_cv_prog_CC="$CC" # Let the user override the test.
|
|
else
|
|
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
ac_prog_rejected=no
|
|
! for ac_dir in $PATH; do
|
|
test -z "$ac_dir" && ac_dir=.
|
|
if test -f $ac_dir/$ac_word; then
|
|
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
|
|
--- 615,631 ----
|
|
# Extract the first word of "cc", so it can be a program name with args.
|
|
set dummy cc; ac_word=$2
|
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
! echo "configure:619: checking for $ac_word" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
if test -n "$CC"; then
|
|
ac_cv_prog_CC="$CC" # Let the user override the test.
|
|
else
|
|
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|
ac_prog_rejected=no
|
|
! ac_dummy="$PATH"
|
|
! for ac_dir in $ac_dummy; do
|
|
test -z "$ac_dir" && ac_dir=.
|
|
if test -f $ac_dir/$ac_word; then
|
|
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
|
|
***************
|
|
*** 655,679 ****
|
|
echo "$ac_t""no" 1>&6
|
|
fi
|
|
|
|
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
|
|
fi
|
|
|
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
|
! echo "configure:663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
|
|
|
ac_ext=c
|
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
ac_cpp='$CPP $CPPFLAGS'
|
|
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
! cat > conftest.$ac_ext <<EOF
|
|
! #line 673 "configure"
|
|
#include "confdefs.h"
|
|
main(){return(0);}
|
|
EOF
|
|
! if { (eval echo configure:677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
ac_cv_prog_cc_works=yes
|
|
# If we can't run a trivial program, we are probably using a cross compiler.
|
|
if (./conftest; exit) 2>/dev/null; then
|
|
--- 660,720 ----
|
|
echo "$ac_t""no" 1>&6
|
|
fi
|
|
|
|
+ if test -z "$CC"; then
|
|
+ case "`uname -s`" in
|
|
+ *win32* | *WIN32*)
|
|
+ # Extract the first word of "cl", so it can be a program name with args.
|
|
+ set dummy cl; ac_word=$2
|
|
+ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
+ echo "configure:670: checking for $ac_word" >&5
|
|
+ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
|
+ echo $ac_n "(cached) $ac_c" 1>&6
|
|
+ else
|
|
+ if test -n "$CC"; then
|
|
+ ac_cv_prog_CC="$CC" # Let the user override the test.
|
|
+ else
|
|
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|
+ ac_dummy="$PATH"
|
|
+ for ac_dir in $ac_dummy; do
|
|
+ test -z "$ac_dir" && ac_dir=.
|
|
+ if test -f $ac_dir/$ac_word; then
|
|
+ ac_cv_prog_CC="cl"
|
|
+ break
|
|
+ fi
|
|
+ done
|
|
+ IFS="$ac_save_ifs"
|
|
+ fi
|
|
+ fi
|
|
+ CC="$ac_cv_prog_CC"
|
|
+ if test -n "$CC"; then
|
|
+ echo "$ac_t""$CC" 1>&6
|
|
+ else
|
|
+ echo "$ac_t""no" 1>&6
|
|
+ fi
|
|
+ ;;
|
|
+ esac
|
|
+ fi
|
|
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
|
|
fi
|
|
|
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
|
! echo "configure:702: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
|
|
|
ac_ext=c
|
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
ac_cpp='$CPP $CPPFLAGS'
|
|
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'
|
|
cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
! cat > conftest.$ac_ext << EOF
|
|
!
|
|
! #line 713 "configure"
|
|
#include "confdefs.h"
|
|
+
|
|
main(){return(0);}
|
|
EOF
|
|
! if { (eval echo configure:718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
ac_cv_prog_cc_works=yes
|
|
# If we can't run a trivial program, we are probably using a cross compiler.
|
|
if (./conftest; exit) 2>/dev/null; then
|
|
***************
|
|
*** 687,704 ****
|
|
ac_cv_prog_cc_works=no
|
|
fi
|
|
rm -fr conftest*
|
|
|
|
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
|
|
if test $ac_cv_prog_cc_works = no; then
|
|
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
|
fi
|
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
|
! echo "configure:697: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
|
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
|
cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
|
! echo "configure:702: checking whether we are using GNU C" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 728,751 ----
|
|
ac_cv_prog_cc_works=no
|
|
fi
|
|
rm -fr conftest*
|
|
+ ac_ext=c
|
|
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
+ ac_cpp='$CPP $CPPFLAGS'
|
|
+ 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'
|
|
+ cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
|
|
if test $ac_cv_prog_cc_works = no; then
|
|
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
|
fi
|
|
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
|
! echo "configure:744: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
|
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
|
cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
|
! echo "configure:749: checking whether we are using GNU C" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 707,713 ****
|
|
yes;
|
|
#endif
|
|
EOF
|
|
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
|
ac_cv_prog_gcc=yes
|
|
else
|
|
ac_cv_prog_gcc=no
|
|
--- 754,760 ----
|
|
yes;
|
|
#endif
|
|
EOF
|
|
! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
|
ac_cv_prog_gcc=yes
|
|
else
|
|
ac_cv_prog_gcc=no
|
|
***************
|
|
*** 718,728 ****
|
|
|
|
if test $ac_cv_prog_gcc = yes; then
|
|
GCC=yes
|
|
! ac_test_CFLAGS="${CFLAGS+set}"
|
|
! ac_save_CFLAGS="$CFLAGS"
|
|
! CFLAGS=
|
|
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
|
! echo "configure:726: checking whether ${CC-cc} accepts -g" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 765,779 ----
|
|
|
|
if test $ac_cv_prog_gcc = yes; then
|
|
GCC=yes
|
|
! else
|
|
! GCC=
|
|
! fi
|
|
!
|
|
! ac_test_CFLAGS="${CFLAGS+set}"
|
|
! ac_save_CFLAGS="$CFLAGS"
|
|
! CFLAGS=
|
|
! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
|
! echo "configure:777: checking whether ${CC-cc} accepts -g" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 737,768 ****
|
|
fi
|
|
|
|
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
|
|
! if test "$ac_test_CFLAGS" = set; then
|
|
! CFLAGS="$ac_save_CFLAGS"
|
|
! elif test $ac_cv_prog_cc_g = yes; then
|
|
CFLAGS="-g -O2"
|
|
else
|
|
! CFLAGS="-O2"
|
|
fi
|
|
else
|
|
! GCC=
|
|
! test "${CFLAGS+set}" = set || CFLAGS="-g"
|
|
fi
|
|
|
|
! for ac_prog in $CCC c++ g++ gcc CC cxx cc++
|
|
do
|
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
|
set dummy $ac_prog; ac_word=$2
|
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
! echo "configure:758: checking for $ac_word" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
if test -n "$CXX"; then
|
|
ac_cv_prog_CXX="$CXX" # Let the user override the test.
|
|
else
|
|
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
! for ac_dir in $PATH; do
|
|
test -z "$ac_dir" && ac_dir=.
|
|
if test -f $ac_dir/$ac_word; then
|
|
ac_cv_prog_CXX="$ac_prog"
|
|
--- 788,824 ----
|
|
fi
|
|
|
|
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
|
|
! if test "$ac_test_CFLAGS" = set; then
|
|
! CFLAGS="$ac_save_CFLAGS"
|
|
! elif test $ac_cv_prog_cc_g = yes; then
|
|
! if test "$GCC" = yes; then
|
|
CFLAGS="-g -O2"
|
|
else
|
|
! CFLAGS="-g"
|
|
fi
|
|
else
|
|
! if test "$GCC" = yes; then
|
|
! CFLAGS="-O2"
|
|
! else
|
|
! CFLAGS=
|
|
! fi
|
|
fi
|
|
|
|
! for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
|
|
do
|
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
|
set dummy $ac_prog; ac_word=$2
|
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
! echo "configure:813: checking for $ac_word" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
if test -n "$CXX"; then
|
|
ac_cv_prog_CXX="$CXX" # Let the user override the test.
|
|
else
|
|
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|
! ac_dummy="$PATH"
|
|
! for ac_dir in $ac_dummy; do
|
|
test -z "$ac_dir" && ac_dir=.
|
|
if test -f $ac_dir/$ac_word; then
|
|
ac_cv_prog_CXX="$ac_prog"
|
|
***************
|
|
*** 785,805 ****
|
|
|
|
|
|
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
|
! echo "configure:789: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
|
|
|
|
ac_ext=C
|
|
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
ac_cpp='$CXXCPP $CPPFLAGS'
|
|
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|
! ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
cross_compiling=$ac_cv_prog_cxx_cross
|
|
|
|
! cat > conftest.$ac_ext <<EOF
|
|
! #line 799 "configure"
|
|
#include "confdefs.h"
|
|
! main(){return(0);}
|
|
EOF
|
|
! if { (eval echo configure:803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
ac_cv_prog_cxx_works=yes
|
|
# If we can't run a trivial program, we are probably using a cross compiler.
|
|
if (./conftest; exit) 2>/dev/null; then
|
|
--- 841,863 ----
|
|
|
|
|
|
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
|
! echo "configure:845: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
|
|
|
|
ac_ext=C
|
|
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
ac_cpp='$CXXCPP $CPPFLAGS'
|
|
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|
! ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
cross_compiling=$ac_cv_prog_cxx_cross
|
|
|
|
! cat > conftest.$ac_ext << EOF
|
|
!
|
|
! #line 856 "configure"
|
|
#include "confdefs.h"
|
|
!
|
|
! int main(){return(0);}
|
|
EOF
|
|
! if { (eval echo configure:861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
ac_cv_prog_cxx_works=yes
|
|
# If we can't run a trivial program, we are probably using a cross compiler.
|
|
if (./conftest; exit) 2>/dev/null; then
|
|
***************
|
|
*** 817,823 ****
|
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
ac_cpp='$CPP $CPPFLAGS'
|
|
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|
! ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
|
|
--- 875,881 ----
|
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
ac_cpp='$CPP $CPPFLAGS'
|
|
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'
|
|
cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
|
|
***************
|
|
*** 825,836 ****
|
|
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
|
|
fi
|
|
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
|
! echo "configure:829: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
|
|
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
|
|
cross_compiling=$ac_cv_prog_cxx_cross
|
|
|
|
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
|
|
! echo "configure:834: checking whether we are using GNU C++" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 883,894 ----
|
|
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
|
|
fi
|
|
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
|
! echo "configure:887: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
|
|
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
|
|
cross_compiling=$ac_cv_prog_cxx_cross
|
|
|
|
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
|
|
! echo "configure:892: checking whether we are using GNU C++" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 839,845 ****
|
|
yes;
|
|
#endif
|
|
EOF
|
|
! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
|
ac_cv_prog_gxx=yes
|
|
else
|
|
ac_cv_prog_gxx=no
|
|
--- 897,903 ----
|
|
yes;
|
|
#endif
|
|
EOF
|
|
! if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
|
ac_cv_prog_gxx=yes
|
|
else
|
|
ac_cv_prog_gxx=no
|
|
***************
|
|
*** 850,860 ****
|
|
|
|
if test $ac_cv_prog_gxx = yes; then
|
|
GXX=yes
|
|
! ac_test_CXXFLAGS="${CXXFLAGS+set}"
|
|
! ac_save_CXXFLAGS="$CXXFLAGS"
|
|
! CXXFLAGS=
|
|
! echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
|
|
! echo "configure:858: checking whether ${CXX-g++} accepts -g" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 908,922 ----
|
|
|
|
if test $ac_cv_prog_gxx = yes; then
|
|
GXX=yes
|
|
! else
|
|
! GXX=
|
|
! fi
|
|
!
|
|
! ac_test_CXXFLAGS="${CXXFLAGS+set}"
|
|
! ac_save_CXXFLAGS="$CXXFLAGS"
|
|
! CXXFLAGS=
|
|
! echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
|
|
! echo "configure:920: checking whether ${CXX-g++} accepts -g" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 869,888 ****
|
|
fi
|
|
|
|
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
|
|
! if test "$ac_test_CXXFLAGS" = set; then
|
|
! CXXFLAGS="$ac_save_CXXFLAGS"
|
|
! elif test $ac_cv_prog_cxx_g = yes; then
|
|
CXXFLAGS="-g -O2"
|
|
else
|
|
! CXXFLAGS="-O2"
|
|
fi
|
|
else
|
|
! GXX=
|
|
! test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
|
|
fi
|
|
|
|
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
|
! echo "configure:886: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
|
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
--- 931,954 ----
|
|
fi
|
|
|
|
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
|
|
! if test "$ac_test_CXXFLAGS" = set; then
|
|
! CXXFLAGS="$ac_save_CXXFLAGS"
|
|
! elif test $ac_cv_prog_cxx_g = yes; then
|
|
! if test "$GXX" = yes; then
|
|
CXXFLAGS="-g -O2"
|
|
else
|
|
! CXXFLAGS="-g"
|
|
fi
|
|
else
|
|
! if test "$GXX" = yes; then
|
|
! CXXFLAGS="-O2"
|
|
! else
|
|
! CXXFLAGS=
|
|
! fi
|
|
fi
|
|
|
|
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
|
! echo "configure:952: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
|
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
***************
|
|
*** 911,925 ****
|
|
# Extract the first word of "ranlib", so it can be a program name with args.
|
|
set dummy ranlib; ac_word=$2
|
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
! echo "configure:915: checking for $ac_word" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
if test -n "$RANLIB"; then
|
|
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
|
|
else
|
|
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
! for ac_dir in $PATH; do
|
|
test -z "$ac_dir" && ac_dir=.
|
|
if test -f $ac_dir/$ac_word; then
|
|
ac_cv_prog_RANLIB="ranlib"
|
|
--- 977,992 ----
|
|
# Extract the first word of "ranlib", so it can be a program name with args.
|
|
set dummy ranlib; ac_word=$2
|
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|
! echo "configure:981: checking for $ac_word" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
if test -n "$RANLIB"; then
|
|
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
|
|
else
|
|
! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|
! ac_dummy="$PATH"
|
|
! for ac_dir in $ac_dummy; do
|
|
test -z "$ac_dir" && ac_dir=.
|
|
if test -f $ac_dir/$ac_word; then
|
|
ac_cv_prog_RANLIB="ranlib"
|
|
***************
|
|
*** 939,945 ****
|
|
|
|
|
|
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
|
! echo "configure:943: checking how to run the C preprocessor" >&5
|
|
# On Suns, sometimes $CPP names a directory.
|
|
if test -n "$CPP" && test -d "$CPP"; then
|
|
CPP=
|
|
--- 1006,1012 ----
|
|
|
|
|
|
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
|
! echo "configure:1010: checking how to run the C preprocessor" >&5
|
|
# On Suns, sometimes $CPP names a directory.
|
|
if test -n "$CPP" && test -d "$CPP"; then
|
|
CPP=
|
|
***************
|
|
*** 954,967 ****
|
|
# On the NeXT, cc -E runs the code through the compiler's parser,
|
|
# not just through cpp.
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 958 "configure"
|
|
#include "confdefs.h"
|
|
#include <assert.h>
|
|
Syntax Error
|
|
EOF
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
! { (eval echo configure:964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
! ac_err=`grep -v '^ *+' conftest.out`
|
|
if test -z "$ac_err"; then
|
|
:
|
|
else
|
|
--- 1021,1034 ----
|
|
# On the NeXT, cc -E runs the code through the compiler's parser,
|
|
# not just through cpp.
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1025 "configure"
|
|
#include "confdefs.h"
|
|
#include <assert.h>
|
|
Syntax Error
|
|
EOF
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
! { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
if test -z "$ac_err"; then
|
|
:
|
|
else
|
|
***************
|
|
*** 971,984 ****
|
|
rm -rf conftest*
|
|
CPP="${CC-cc} -E -traditional-cpp"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 975 "configure"
|
|
#include "confdefs.h"
|
|
#include <assert.h>
|
|
Syntax Error
|
|
EOF
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
! { (eval echo configure:981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
! ac_err=`grep -v '^ *+' conftest.out`
|
|
if test -z "$ac_err"; then
|
|
:
|
|
else
|
|
--- 1038,1068 ----
|
|
rm -rf conftest*
|
|
CPP="${CC-cc} -E -traditional-cpp"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1042 "configure"
|
|
! #include "confdefs.h"
|
|
! #include <assert.h>
|
|
! Syntax Error
|
|
! EOF
|
|
! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
! { (eval echo configure:1048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
! if test -z "$ac_err"; then
|
|
! :
|
|
! else
|
|
! echo "$ac_err" >&5
|
|
! echo "configure: failed program was:" >&5
|
|
! cat conftest.$ac_ext >&5
|
|
! rm -rf conftest*
|
|
! CPP="${CC-cc} -nologo -E"
|
|
! cat > conftest.$ac_ext <<EOF
|
|
! #line 1059 "configure"
|
|
#include "confdefs.h"
|
|
#include <assert.h>
|
|
Syntax Error
|
|
EOF
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
! { (eval echo configure:1065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
if test -z "$ac_err"; then
|
|
:
|
|
else
|
|
***************
|
|
*** 991,996 ****
|
|
--- 1075,1082 ----
|
|
rm -f conftest*
|
|
fi
|
|
rm -f conftest*
|
|
+ fi
|
|
+ rm -f conftest*
|
|
ac_cv_prog_CPP="$CPP"
|
|
fi
|
|
CPP="$ac_cv_prog_CPP"
|
|
***************
|
|
*** 1004,1010 ****
|
|
# Uses ac_ vars as temps to allow command line to override cache and checks.
|
|
# --without-x overrides everything else, but does not touch the cache.
|
|
echo $ac_n "checking for X""... $ac_c" 1>&6
|
|
! echo "configure:1008: checking for X" >&5
|
|
|
|
# Check whether --with-x or --without-x was given.
|
|
if test "${with_x+set}" = set; then
|
|
--- 1090,1096 ----
|
|
# Uses ac_ vars as temps to allow command line to override cache and checks.
|
|
# --without-x overrides everything else, but does not touch the cache.
|
|
echo $ac_n "checking for X""... $ac_c" 1>&6
|
|
! echo "configure:1094: checking for X" >&5
|
|
|
|
# Check whether --with-x or --without-x was given.
|
|
if test "${with_x+set}" = set; then
|
|
***************
|
|
*** 1066,1078 ****
|
|
|
|
# First, try using that file with no special directory specified.
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1070 "configure"
|
|
#include "confdefs.h"
|
|
#include <$x_direct_test_include>
|
|
EOF
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
! { (eval echo configure:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
! ac_err=`grep -v '^ *+' conftest.out`
|
|
if test -z "$ac_err"; then
|
|
rm -rf conftest*
|
|
# We can compile using X headers with no special include directory.
|
|
--- 1152,1164 ----
|
|
|
|
# First, try using that file with no special directory specified.
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1156 "configure"
|
|
#include "confdefs.h"
|
|
#include <$x_direct_test_include>
|
|
EOF
|
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|
! { (eval echo configure:1161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|
! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|
if test -z "$ac_err"; then
|
|
rm -rf conftest*
|
|
# We can compile using X headers with no special include directory.
|
|
***************
|
|
*** 1140,1153 ****
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-l$x_direct_test_library $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1144 "configure"
|
|
#include "confdefs.h"
|
|
|
|
int main() {
|
|
${x_direct_test_function}()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
LIBS="$ac_save_LIBS"
|
|
# We can link X programs with no special library path.
|
|
--- 1226,1239 ----
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-l$x_direct_test_library $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1230 "configure"
|
|
#include "confdefs.h"
|
|
|
|
int main() {
|
|
${x_direct_test_function}()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
LIBS="$ac_save_LIBS"
|
|
# We can link X programs with no special library path.
|
|
***************
|
|
*** 1253,1269 ****
|
|
case "`(uname -sr) 2>/dev/null`" in
|
|
"SunOS 5"*)
|
|
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
|
|
! echo "configure:1257: checking whether -R must be followed by a space" >&5
|
|
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1260 "configure"
|
|
#include "confdefs.h"
|
|
|
|
int main() {
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
ac_R_nospace=yes
|
|
else
|
|
--- 1339,1355 ----
|
|
case "`(uname -sr) 2>/dev/null`" in
|
|
"SunOS 5"*)
|
|
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
|
|
! echo "configure:1343: checking whether -R must be followed by a space" >&5
|
|
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1346 "configure"
|
|
#include "confdefs.h"
|
|
|
|
int main() {
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
ac_R_nospace=yes
|
|
else
|
|
***************
|
|
*** 1279,1292 ****
|
|
else
|
|
LIBS="$ac_xsave_LIBS -R $x_libraries"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1283 "configure"
|
|
#include "confdefs.h"
|
|
|
|
int main() {
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
ac_R_space=yes
|
|
else
|
|
--- 1365,1378 ----
|
|
else
|
|
LIBS="$ac_xsave_LIBS -R $x_libraries"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1369 "configure"
|
|
#include "confdefs.h"
|
|
|
|
int main() {
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
ac_R_space=yes
|
|
else
|
|
***************
|
|
*** 1318,1324 ****
|
|
# libraries were built with DECnet support. And karl@cs.umb.edu says
|
|
# the Alpha needs dnet_stub (dnet does not exist).
|
|
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
|
|
! echo "configure:1322: checking for dnet_ntoa in -ldnet" >&5
|
|
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
--- 1404,1410 ----
|
|
# libraries were built with DECnet support. And karl@cs.umb.edu says
|
|
# the Alpha needs dnet_stub (dnet does not exist).
|
|
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
|
|
! echo "configure:1408: checking for dnet_ntoa in -ldnet" >&5
|
|
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
***************
|
|
*** 1326,1332 ****
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-ldnet $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1330 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
--- 1412,1418 ----
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-ldnet $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1416 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
***************
|
|
*** 1337,1343 ****
|
|
dnet_ntoa()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
--- 1423,1429 ----
|
|
dnet_ntoa()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
***************
|
|
*** 1359,1365 ****
|
|
|
|
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
|
|
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
|
|
! echo "configure:1363: checking for dnet_ntoa in -ldnet_stub" >&5
|
|
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
--- 1445,1451 ----
|
|
|
|
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
|
|
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
|
|
! echo "configure:1449: checking for dnet_ntoa in -ldnet_stub" >&5
|
|
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
***************
|
|
*** 1367,1373 ****
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-ldnet_stub $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1371 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
--- 1453,1459 ----
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-ldnet_stub $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1457 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
***************
|
|
*** 1378,1384 ****
|
|
dnet_ntoa()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
--- 1464,1470 ----
|
|
dnet_ntoa()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
***************
|
|
*** 1407,1418 ****
|
|
# The nsl library prevents programs from opening the X display
|
|
# on Irix 5.2, according to dickey@clark.net.
|
|
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
|
|
! echo "configure:1411: checking for gethostbyname" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1416 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char gethostbyname(); below. */
|
|
--- 1493,1504 ----
|
|
# The nsl library prevents programs from opening the X display
|
|
# on Irix 5.2, according to dickey@clark.net.
|
|
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
|
|
! echo "configure:1497: checking for gethostbyname" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1502 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char gethostbyname(); below. */
|
|
***************
|
|
*** 1435,1441 ****
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_gethostbyname=yes"
|
|
else
|
|
--- 1521,1527 ----
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_gethostbyname=yes"
|
|
else
|
|
***************
|
|
*** 1456,1462 ****
|
|
|
|
if test $ac_cv_func_gethostbyname = no; then
|
|
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
|
|
! echo "configure:1460: checking for gethostbyname in -lnsl" >&5
|
|
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
--- 1542,1548 ----
|
|
|
|
if test $ac_cv_func_gethostbyname = no; then
|
|
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
|
|
! echo "configure:1546: checking for gethostbyname in -lnsl" >&5
|
|
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
***************
|
|
*** 1464,1470 ****
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-lnsl $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1468 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
--- 1550,1556 ----
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-lnsl $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1554 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
***************
|
|
*** 1475,1481 ****
|
|
gethostbyname()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
--- 1561,1567 ----
|
|
gethostbyname()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
***************
|
|
*** 1505,1516 ****
|
|
# -lsocket must be given before -lnsl if both are needed.
|
|
# We assume that if connect needs -lnsl, so does gethostbyname.
|
|
echo $ac_n "checking for connect""... $ac_c" 1>&6
|
|
! echo "configure:1509: checking for connect" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1514 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char connect(); below. */
|
|
--- 1591,1602 ----
|
|
# -lsocket must be given before -lnsl if both are needed.
|
|
# We assume that if connect needs -lnsl, so does gethostbyname.
|
|
echo $ac_n "checking for connect""... $ac_c" 1>&6
|
|
! echo "configure:1595: checking for connect" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1600 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char connect(); below. */
|
|
***************
|
|
*** 1533,1539 ****
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_connect=yes"
|
|
else
|
|
--- 1619,1625 ----
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_connect=yes"
|
|
else
|
|
***************
|
|
*** 1554,1560 ****
|
|
|
|
if test $ac_cv_func_connect = no; then
|
|
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
|
|
! echo "configure:1558: checking for connect in -lsocket" >&5
|
|
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
--- 1640,1646 ----
|
|
|
|
if test $ac_cv_func_connect = no; then
|
|
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
|
|
! echo "configure:1644: checking for connect in -lsocket" >&5
|
|
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
***************
|
|
*** 1562,1568 ****
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1566 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
--- 1648,1654 ----
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1652 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
***************
|
|
*** 1573,1579 ****
|
|
connect()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
--- 1659,1665 ----
|
|
connect()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
***************
|
|
*** 1597,1608 ****
|
|
|
|
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
|
|
echo $ac_n "checking for remove""... $ac_c" 1>&6
|
|
! echo "configure:1601: checking for remove" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1606 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char remove(); below. */
|
|
--- 1683,1694 ----
|
|
|
|
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
|
|
echo $ac_n "checking for remove""... $ac_c" 1>&6
|
|
! echo "configure:1687: checking for remove" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1692 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char remove(); below. */
|
|
***************
|
|
*** 1625,1631 ****
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_remove=yes"
|
|
else
|
|
--- 1711,1717 ----
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_remove=yes"
|
|
else
|
|
***************
|
|
*** 1646,1652 ****
|
|
|
|
if test $ac_cv_func_remove = no; then
|
|
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
|
|
! echo "configure:1650: checking for remove in -lposix" >&5
|
|
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
--- 1732,1738 ----
|
|
|
|
if test $ac_cv_func_remove = no; then
|
|
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
|
|
! echo "configure:1736: checking for remove in -lposix" >&5
|
|
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
***************
|
|
*** 1654,1660 ****
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-lposix $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1658 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
--- 1740,1746 ----
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-lposix $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1744 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
***************
|
|
*** 1665,1671 ****
|
|
remove()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
--- 1751,1757 ----
|
|
remove()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
***************
|
|
*** 1689,1700 ****
|
|
|
|
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
|
|
echo $ac_n "checking for shmat""... $ac_c" 1>&6
|
|
! echo "configure:1693: checking for shmat" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1698 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char shmat(); below. */
|
|
--- 1775,1786 ----
|
|
|
|
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
|
|
echo $ac_n "checking for shmat""... $ac_c" 1>&6
|
|
! echo "configure:1779: checking for shmat" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1784 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char shmat(); below. */
|
|
***************
|
|
*** 1717,1723 ****
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_shmat=yes"
|
|
else
|
|
--- 1803,1809 ----
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_shmat=yes"
|
|
else
|
|
***************
|
|
*** 1738,1744 ****
|
|
|
|
if test $ac_cv_func_shmat = no; then
|
|
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
|
|
! echo "configure:1742: checking for shmat in -lipc" >&5
|
|
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
--- 1824,1830 ----
|
|
|
|
if test $ac_cv_func_shmat = no; then
|
|
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
|
|
! echo "configure:1828: checking for shmat in -lipc" >&5
|
|
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
***************
|
|
*** 1746,1752 ****
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-lipc $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1750 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
--- 1832,1838 ----
|
|
ac_save_LIBS="$LIBS"
|
|
LIBS="-lipc $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1836 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
***************
|
|
*** 1757,1763 ****
|
|
shmat()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
--- 1843,1849 ----
|
|
shmat()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
***************
|
|
*** 1790,1804 ****
|
|
# libraries we check for below, so use a different variable.
|
|
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
|
|
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
|
|
! echo "configure:1794: checking for IceConnectionNumber in -lICE" >&5
|
|
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
ac_save_LIBS="$LIBS"
|
|
! LIBS="-lICE $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1802 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
--- 1876,1890 ----
|
|
# libraries we check for below, so use a different variable.
|
|
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
|
|
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
|
|
! echo "configure:1880: checking for IceConnectionNumber in -lICE" >&5
|
|
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
|
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
ac_save_LIBS="$LIBS"
|
|
! LIBS="-lICE $X_EXTRA_LIBS $LIBS"
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1888 "configure"
|
|
#include "confdefs.h"
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
|
/* We use char because int might match the return type of a gcc2
|
|
***************
|
|
*** 1809,1815 ****
|
|
IceConnectionNumber()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
--- 1895,1901 ----
|
|
IceConnectionNumber()
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
|
else
|
|
***************
|
|
*** 1835,1848 ****
|
|
|
|
|
|
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
|
|
! echo "configure:1839: checking whether byte ordering is bigendian" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
ac_cv_c_bigendian=unknown
|
|
# See if sys/param.h defines the BYTE_ORDER macro.
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1846 "configure"
|
|
#include "confdefs.h"
|
|
#include <sys/types.h>
|
|
#include <sys/param.h>
|
|
--- 1921,1934 ----
|
|
|
|
|
|
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
|
|
! echo "configure:1925: checking whether byte ordering is bigendian" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
ac_cv_c_bigendian=unknown
|
|
# See if sys/param.h defines the BYTE_ORDER macro.
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1932 "configure"
|
|
#include "confdefs.h"
|
|
#include <sys/types.h>
|
|
#include <sys/param.h>
|
|
***************
|
|
*** 1853,1863 ****
|
|
#endif
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
rm -rf conftest*
|
|
# It does; now see whether it defined to BIG_ENDIAN or not.
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1861 "configure"
|
|
#include "confdefs.h"
|
|
#include <sys/types.h>
|
|
#include <sys/param.h>
|
|
--- 1939,1949 ----
|
|
#endif
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
rm -rf conftest*
|
|
# It does; now see whether it defined to BIG_ENDIAN or not.
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1947 "configure"
|
|
#include "confdefs.h"
|
|
#include <sys/types.h>
|
|
#include <sys/param.h>
|
|
***************
|
|
*** 1868,1874 ****
|
|
#endif
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
rm -rf conftest*
|
|
ac_cv_c_bigendian=yes
|
|
else
|
|
--- 1954,1960 ----
|
|
#endif
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
rm -rf conftest*
|
|
ac_cv_c_bigendian=yes
|
|
else
|
|
***************
|
|
*** 1888,1894 ****
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1892 "configure"
|
|
#include "confdefs.h"
|
|
main () {
|
|
/* Are we little or big endian? From Harbison&Steele. */
|
|
--- 1974,1980 ----
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1978 "configure"
|
|
#include "confdefs.h"
|
|
main () {
|
|
/* Are we little or big endian? From Harbison&Steele. */
|
|
***************
|
|
*** 1901,1907 ****
|
|
exit (u.c[sizeof (long) - 1] == 1);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:1905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_c_bigendian=no
|
|
else
|
|
--- 1987,1993 ----
|
|
exit (u.c[sizeof (long) - 1] == 1);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_c_bigendian=no
|
|
else
|
|
***************
|
|
*** 1925,1945 ****
|
|
fi
|
|
|
|
echo $ac_n "checking for inline""... $ac_c" 1>&6
|
|
! echo "configure:1929: checking for inline" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
ac_cv_c_inline=no
|
|
for ac_kw in inline __inline__ __inline; do
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1936 "configure"
|
|
#include "confdefs.h"
|
|
|
|
int main() {
|
|
} $ac_kw foo() {
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:1943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
rm -rf conftest*
|
|
ac_cv_c_inline=$ac_kw; break
|
|
else
|
|
--- 2011,2031 ----
|
|
fi
|
|
|
|
echo $ac_n "checking for inline""... $ac_c" 1>&6
|
|
! echo "configure:2015: checking for inline" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
ac_cv_c_inline=no
|
|
for ac_kw in inline __inline__ __inline; do
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2022 "configure"
|
|
#include "confdefs.h"
|
|
|
|
int main() {
|
|
} $ac_kw foo() {
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:2029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
rm -rf conftest*
|
|
ac_cv_c_inline=$ac_kw; break
|
|
else
|
|
***************
|
|
*** 1965,1971 ****
|
|
esac
|
|
|
|
echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
|
|
! echo "configure:1969: checking size of unsigned char" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 2051,2057 ----
|
|
esac
|
|
|
|
echo $ac_n "checking size of unsigned char""... $ac_c" 1>&6
|
|
! echo "configure:2055: checking size of unsigned char" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_char'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 1973,1979 ****
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 1977 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
--- 2059,2065 ----
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2063 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
***************
|
|
*** 1984,1990 ****
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_char=`cat conftestval`
|
|
else
|
|
--- 2070,2076 ----
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_char=`cat conftestval`
|
|
else
|
|
***************
|
|
*** 2004,2010 ****
|
|
|
|
|
|
echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
|
|
! echo "configure:2008: checking size of unsigned short" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 2090,2096 ----
|
|
|
|
|
|
echo $ac_n "checking size of unsigned short""... $ac_c" 1>&6
|
|
! echo "configure:2094: checking size of unsigned short" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_short'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 2012,2018 ****
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2016 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
--- 2098,2104 ----
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2102 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
***************
|
|
*** 2023,2029 ****
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_short=`cat conftestval`
|
|
else
|
|
--- 2109,2115 ----
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_short=`cat conftestval`
|
|
else
|
|
***************
|
|
*** 2043,2049 ****
|
|
|
|
|
|
echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
|
|
! echo "configure:2047: checking size of unsigned int" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 2129,2135 ----
|
|
|
|
|
|
echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
|
|
! echo "configure:2133: checking size of unsigned int" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 2051,2057 ****
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2055 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
--- 2137,2143 ----
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2141 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
***************
|
|
*** 2062,2068 ****
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_int=`cat conftestval`
|
|
else
|
|
--- 2148,2154 ----
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_int=`cat conftestval`
|
|
else
|
|
***************
|
|
*** 2082,2088 ****
|
|
|
|
|
|
echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
|
|
! echo "configure:2086: checking size of unsigned long" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 2168,2174 ----
|
|
|
|
|
|
echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
|
|
! echo "configure:2172: checking size of unsigned long" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 2090,2096 ****
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2094 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
--- 2176,2182 ----
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2180 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
***************
|
|
*** 2101,2107 ****
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_long=`cat conftestval`
|
|
else
|
|
--- 2187,2193 ----
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_long=`cat conftestval`
|
|
else
|
|
***************
|
|
*** 2121,2127 ****
|
|
|
|
|
|
echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
|
|
! echo "configure:2125: checking size of unsigned long long" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
--- 2207,2213 ----
|
|
|
|
|
|
echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
|
|
! echo "configure:2211: checking size of unsigned long long" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
***************
|
|
*** 2129,2135 ****
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2133 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
--- 2215,2221 ----
|
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2219 "configure"
|
|
#include "confdefs.h"
|
|
#include <stdio.h>
|
|
main()
|
|
***************
|
|
*** 2140,2146 ****
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_long_long=`cat conftestval`
|
|
else
|
|
--- 2226,2232 ----
|
|
exit(0);
|
|
}
|
|
EOF
|
|
! if { (eval echo configure:2230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|
then
|
|
ac_cv_sizeof_unsigned_long_long=`cat conftestval`
|
|
else
|
|
***************
|
|
*** 2159,2173 ****
|
|
EOF
|
|
|
|
|
|
for ac_func in select
|
|
do
|
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
|
! echo "configure:2166: checking for $ac_func" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2171 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char $ac_func(); below. */
|
|
--- 2245,2298 ----
|
|
EOF
|
|
|
|
|
|
+ echo $ac_n "checking size of int *""... $ac_c" 1>&6
|
|
+ echo "configure:2250: checking size of int *" >&5
|
|
+ if eval "test \"`echo '$''{'ac_cv_sizeof_int_p'+set}'`\" = set"; then
|
|
+ echo $ac_n "(cached) $ac_c" 1>&6
|
|
+ else
|
|
+ if test "$cross_compiling" = yes; then
|
|
+ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
|
+ else
|
|
+ cat > conftest.$ac_ext <<EOF
|
|
+ #line 2258 "configure"
|
|
+ #include "confdefs.h"
|
|
+ #include <stdio.h>
|
|
+ main()
|
|
+ {
|
|
+ FILE *f=fopen("conftestval", "w");
|
|
+ if (!f) exit(1);
|
|
+ fprintf(f, "%d\n", sizeof(int *));
|
|
+ exit(0);
|
|
+ }
|
|
+ EOF
|
|
+ if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|
+ then
|
|
+ ac_cv_sizeof_int_p=`cat conftestval`
|
|
+ else
|
|
+ echo "configure: failed program was:" >&5
|
|
+ cat conftest.$ac_ext >&5
|
|
+ rm -fr conftest*
|
|
+ ac_cv_sizeof_int_p=0
|
|
+ fi
|
|
+ rm -fr conftest*
|
|
+ fi
|
|
+
|
|
+ fi
|
|
+ echo "$ac_t""$ac_cv_sizeof_int_p" 1>&6
|
|
+ cat >> confdefs.h <<EOF
|
|
+ #define SIZEOF_INT_P $ac_cv_sizeof_int_p
|
|
+ EOF
|
|
+
|
|
+
|
|
for ac_func in select
|
|
do
|
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
|
! echo "configure:2291: checking for $ac_func" >&5
|
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
|
echo $ac_n "(cached) $ac_c" 1>&6
|
|
else
|
|
cat > conftest.$ac_ext <<EOF
|
|
! #line 2296 "configure"
|
|
#include "confdefs.h"
|
|
/* System header to define __stub macros and hopefully few prototypes,
|
|
which can conflict with char $ac_func(); below. */
|
|
***************
|
|
*** 2190,2196 ****
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_$ac_func=yes"
|
|
else
|
|
--- 2315,2321 ----
|
|
|
|
; return 0; }
|
|
EOF
|
|
! if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
rm -rf conftest*
|
|
eval "ac_cv_func_$ac_func=yes"
|
|
else
|
|
***************
|
|
*** 2217,2226 ****
|
|
fi
|
|
done
|
|
|
|
|
|
|
|
echo $ac_n "checking for cpu level""... $ac_c" 1>&6
|
|
! echo "configure:2224: checking for cpu level" >&5
|
|
# Check whether --enable-cpu-level or --disable-cpu-level was given.
|
|
if test "${enable_cpu_level+set}" = set; then
|
|
enableval="$enable_cpu_level"
|
|
--- 2342,2589 ----
|
|
fi
|
|
done
|
|
|
|
+ for ac_func in snprintf
|
|
+ do
|
|
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
|
+ echo "configure:2349: checking for $ac_func" >&5
|
|
+ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
|
+ echo $ac_n "(cached) $ac_c" 1>&6
|
|
+ else
|
|
+ cat > conftest.$ac_ext <<EOF
|
|
+ #line 2354 "configure"
|
|
+ #include "confdefs.h"
|
|
+ /* System header to define __stub macros and hopefully few prototypes,
|
|
+ which can conflict with char $ac_func(); below. */
|
|
+ #include <assert.h>
|
|
+ /* Override any gcc2 internal prototype to avoid an error. */
|
|
+ /* We use char because int might match the return type of a gcc2
|
|
+ builtin and then its argument prototype would still apply. */
|
|
+ char $ac_func();
|
|
+
|
|
+ int main() {
|
|
+
|
|
+ /* The GNU C library defines this for functions which it implements
|
|
+ to always fail with ENOSYS. Some functions are actually named
|
|
+ something starting with __ and the normal name is an alias. */
|
|
+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
|
+ choke me
|
|
+ #else
|
|
+ $ac_func();
|
|
+ #endif
|
|
+
|
|
+ ; return 0; }
|
|
+ EOF
|
|
+ if { (eval echo configure:2377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
+ rm -rf conftest*
|
|
+ eval "ac_cv_func_$ac_func=yes"
|
|
+ else
|
|
+ echo "configure: failed program was:" >&5
|
|
+ cat conftest.$ac_ext >&5
|
|
+ rm -rf conftest*
|
|
+ eval "ac_cv_func_$ac_func=no"
|
|
+ fi
|
|
+ rm -f conftest*
|
|
+ fi
|
|
+
|
|
+ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
|
+ echo "$ac_t""yes" 1>&6
|
|
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
|
+ cat >> confdefs.h <<EOF
|
|
+ #define $ac_tr_func 1
|
|
+ EOF
|
|
+ cat >> confdefs.h <<\EOF
|
|
+ #define BX_HAVE_SNPRINTF 1
|
|
+ EOF
|
|
+
|
|
+ else
|
|
+ echo "$ac_t""no" 1>&6
|
|
+ fi
|
|
+ done
|
|
+
|
|
+ for ac_func in strtoull
|
|
+ do
|
|
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
|
+ echo "configure:2407: checking for $ac_func" >&5
|
|
+ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
|
+ echo $ac_n "(cached) $ac_c" 1>&6
|
|
+ else
|
|
+ cat > conftest.$ac_ext <<EOF
|
|
+ #line 2412 "configure"
|
|
+ #include "confdefs.h"
|
|
+ /* System header to define __stub macros and hopefully few prototypes,
|
|
+ which can conflict with char $ac_func(); below. */
|
|
+ #include <assert.h>
|
|
+ /* Override any gcc2 internal prototype to avoid an error. */
|
|
+ /* We use char because int might match the return type of a gcc2
|
|
+ builtin and then its argument prototype would still apply. */
|
|
+ char $ac_func();
|
|
+
|
|
+ int main() {
|
|
+
|
|
+ /* The GNU C library defines this for functions which it implements
|
|
+ to always fail with ENOSYS. Some functions are actually named
|
|
+ something starting with __ and the normal name is an alias. */
|
|
+ #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
|
+ choke me
|
|
+ #else
|
|
+ $ac_func();
|
|
+ #endif
|
|
+
|
|
+ ; return 0; }
|
|
+ EOF
|
|
+ if { (eval echo configure:2435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|
+ rm -rf conftest*
|
|
+ eval "ac_cv_func_$ac_func=yes"
|
|
+ else
|
|
+ echo "configure: failed program was:" >&5
|
|
+ cat conftest.$ac_ext >&5
|
|
+ rm -rf conftest*
|
|
+ eval "ac_cv_func_$ac_func=no"
|
|
+ fi
|
|
+ rm -f conftest*
|
|
+ fi
|
|
+
|
|
+ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
|
+ echo "$ac_t""yes" 1>&6
|
|
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
|
+ cat >> confdefs.h <<EOF
|
|
+ #define $ac_tr_func 1
|
|
+ EOF
|
|
+ cat >> confdefs.h <<\EOF
|
|
+ #define BX_HAVE_STRTOULL 1
|
|
+ EOF
|
|
+
|
|
+ else
|
|
+ echo "$ac_t""no" 1>&6
|
|
+ fi
|
|
+ done
|
|
+
|
|
+
|
|
+ echo $ac_n "checking if compiler allows empty structs""... $ac_c" 1>&6
|
|
+ echo "configure:2464: checking if compiler allows empty structs" >&5
|
|
+ cat > conftest.$ac_ext <<EOF
|
|
+ #line 2466 "configure"
|
|
+ #include "confdefs.h"
|
|
+
|
|
+ int main() {
|
|
+ typedef struct { } junk;
|
|
+ ; return 0; }
|
|
+ EOF
|
|
+ if { (eval echo configure:2473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
+ rm -rf conftest*
|
|
+ echo "$ac_t""yes" 1>&6
|
|
+ else
|
|
+ echo "configure: failed program was:" >&5
|
|
+ cat conftest.$ac_ext >&5
|
|
+ rm -rf conftest*
|
|
+
|
|
+ cat >> confdefs.h <<\EOF
|
|
+ #define BX_NO_EMPTY_STRUCTS 1
|
|
+ EOF
|
|
+
|
|
+ echo "$ac_t""no" 1>&6
|
|
+
|
|
+ fi
|
|
+ rm -f conftest*
|
|
+
|
|
+ echo $ac_n "checking if compiler allows __attribute__""... $ac_c" 1>&6
|
|
+ echo "configure:2491: checking if compiler allows __attribute__" >&5
|
|
+ cat > conftest.$ac_ext <<EOF
|
|
+ #line 2493 "configure"
|
|
+ #include "confdefs.h"
|
|
+
|
|
+ int main() {
|
|
+ typedef struct { } __attribute__ ((packed)) junk;
|
|
+ ; return 0; }
|
|
+ EOF
|
|
+ if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
+ rm -rf conftest*
|
|
+ echo "$ac_t""yes" 1>&6
|
|
+ else
|
|
+ echo "configure: failed program was:" >&5
|
|
+ cat conftest.$ac_ext >&5
|
|
+ rm -rf conftest*
|
|
+
|
|
+ echo "$ac_t""no" 1>&6
|
|
+ cat >> confdefs.h <<\EOF
|
|
+ #define BX_NO_ATTRIBUTES 1
|
|
+ EOF
|
|
+
|
|
+
|
|
+ fi
|
|
+ rm -f conftest*
|
|
+
|
|
+
|
|
+ ac_ext=C
|
|
+ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
+ ac_cpp='$CXXCPP $CPPFLAGS'
|
|
+ ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|
+ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|
+ cross_compiling=$ac_cv_prog_cxx_cross
|
|
+
|
|
+ echo $ac_n "checking for hash_map.h""... $ac_c" 1>&6
|
|
+ echo "configure:2526: checking for hash_map.h" >&5
|
|
+ cat > conftest.$ac_ext <<EOF
|
|
+ #line 2528 "configure"
|
|
+ #include "confdefs.h"
|
|
+ #include <hash_map.h>
|
|
+ int main() {
|
|
+
|
|
+ ; return 0; }
|
|
+ EOF
|
|
+ if { (eval echo configure:2535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
+ rm -rf conftest*
|
|
+
|
|
+ echo "$ac_t""yes" 1>&6
|
|
+ cat >> confdefs.h <<\EOF
|
|
+ #define BX_HAVE_HASH_MAP 1
|
|
+ EOF
|
|
+
|
|
+
|
|
+ else
|
|
+ echo "configure: failed program was:" >&5
|
|
+ cat conftest.$ac_ext >&5
|
|
+ rm -rf conftest*
|
|
+ echo "$ac_t""no" 1>&6
|
|
+ fi
|
|
+ rm -f conftest*
|
|
+
|
|
+ echo $ac_n "checking if compiler allows blank labels""... $ac_c" 1>&6
|
|
+ echo "configure:2553: checking if compiler allows blank labels" >&5
|
|
+ cat > conftest.$ac_ext <<EOF
|
|
+ #line 2555 "configure"
|
|
+ #include "confdefs.h"
|
|
+
|
|
+ int main() {
|
|
+ { label1: }
|
|
+ ; return 0; }
|
|
+ EOF
|
|
+ if { (eval echo configure:2562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|
+ rm -rf conftest*
|
|
+ echo "$ac_t""yes" 1>&6
|
|
+ else
|
|
+ echo "configure: failed program was:" >&5
|
|
+ cat conftest.$ac_ext >&5
|
|
+ rm -rf conftest*
|
|
+
|
|
+ echo "$ac_t""no" 1>&6
|
|
+ cat >> confdefs.h <<\EOF
|
|
+ #define BX_NO_BLANK_LABELS 1
|
|
+ EOF
|
|
+
|
|
+
|
|
+ fi
|
|
+ rm -f conftest*
|
|
+ ac_ext=c
|
|
+ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
+ ac_cpp='$CPP $CPPFLAGS'
|
|
+ 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'
|
|
+ cross_compiling=$ac_cv_prog_cc_cross
|
|
|
|
|
|
echo $ac_n "checking for cpu level""... $ac_c" 1>&6
|
|
! echo "configure:2587: checking for cpu level" >&5
|
|
# Check whether --enable-cpu-level or --disable-cpu-level was given.
|
|
if test "${enable_cpu_level+set}" = set; then
|
|
enableval="$enable_cpu_level"
|
|
***************
|
|
*** 2283,2289 ****
|
|
|
|
|
|
echo $ac_n "checking for dynamic translation support""... $ac_c" 1>&6
|
|
! echo "configure:2287: checking for dynamic translation support" >&5
|
|
# Check whether --enable-dynamic or --disable-dynamic was given.
|
|
if test "${enable_dynamic+set}" = set; then
|
|
enableval="$enable_dynamic"
|
|
--- 2646,2652 ----
|
|
|
|
|
|
echo $ac_n "checking for dynamic translation support""... $ac_c" 1>&6
|
|
! echo "configure:2650: checking for dynamic translation support" >&5
|
|
# Check whether --enable-dynamic or --disable-dynamic was given.
|
|
if test "${enable_dynamic+set}" = set; then
|
|
enableval="$enable_dynamic"
|
|
***************
|
|
*** 2356,2362 ****
|
|
|
|
|
|
echo $ac_n "checking for NE2000 support""... $ac_c" 1>&6
|
|
! echo "configure:2360: checking for NE2000 support" >&5
|
|
# Check whether --enable-ne2000 or --disable-ne2000 was given.
|
|
if test "${enable_ne2000+set}" = set; then
|
|
enableval="$enable_ne2000"
|
|
--- 2719,2725 ----
|
|
|
|
|
|
echo $ac_n "checking for NE2000 support""... $ac_c" 1>&6
|
|
! echo "configure:2723: checking for NE2000 support" >&5
|
|
# Check whether --enable-ne2000 or --disable-ne2000 was given.
|
|
if test "${enable_ne2000+set}" = set; then
|
|
enableval="$enable_ne2000"
|
|
***************
|
|
*** 2391,2397 ****
|
|
|
|
|
|
echo $ac_n "checking for i440FX PCI support""... $ac_c" 1>&6
|
|
! echo "configure:2395: checking for i440FX PCI support" >&5
|
|
# Check whether --enable-pci or --disable-pci was given.
|
|
if test "${enable_pci+set}" = set; then
|
|
enableval="$enable_pci"
|
|
--- 2754,2760 ----
|
|
|
|
|
|
echo $ac_n "checking for i440FX PCI support""... $ac_c" 1>&6
|
|
! echo "configure:2758: checking for i440FX PCI support" >&5
|
|
# Check whether --enable-pci or --disable-pci was given.
|
|
if test "${enable_pci+set}" = set; then
|
|
enableval="$enable_pci"
|
|
***************
|
|
*** 2426,2432 ****
|
|
|
|
|
|
echo $ac_n "checking for port e9 hack""... $ac_c" 1>&6
|
|
! echo "configure:2430: checking for port e9 hack" >&5
|
|
# Check whether --enable-port-e9-hack or --disable-port-e9-hack was given.
|
|
if test "${enable_port_e9_hack+set}" = set; then
|
|
enableval="$enable_port_e9_hack"
|
|
--- 2789,2795 ----
|
|
|
|
|
|
echo $ac_n "checking for port e9 hack""... $ac_c" 1>&6
|
|
! echo "configure:2793: checking for port e9 hack" >&5
|
|
# Check whether --enable-port-e9-hack or --disable-port-e9-hack was given.
|
|
if test "${enable_port_e9_hack+set}" = set; then
|
|
enableval="$enable_port_e9_hack"
|
|
***************
|
|
*** 2457,2463 ****
|
|
|
|
|
|
echo $ac_n "checking for use of .cpp as suffix""... $ac_c" 1>&6
|
|
! echo "configure:2461: checking for use of .cpp as suffix" >&5
|
|
# Check whether --enable-cpp or --disable-cpp was given.
|
|
if test "${enable_cpp+set}" = set; then
|
|
enableval="$enable_cpp"
|
|
--- 2820,2826 ----
|
|
|
|
|
|
echo $ac_n "checking for use of .cpp as suffix""... $ac_c" 1>&6
|
|
! echo "configure:2824: checking for use of .cpp as suffix" >&5
|
|
# Check whether --enable-cpp or --disable-cpp was given.
|
|
if test "${enable_cpp+set}" = set; then
|
|
enableval="$enable_cpp"
|
|
***************
|
|
*** 2499,2505 ****
|
|
|
|
|
|
echo $ac_n "checking for Bochs internal debugger support""... $ac_c" 1>&6
|
|
! echo "configure:2503: checking for Bochs internal debugger support" >&5
|
|
# Check whether --enable-debugger or --disable-debugger was given.
|
|
if test "${enable_debugger+set}" = set; then
|
|
enableval="$enable_debugger"
|
|
--- 2862,2868 ----
|
|
|
|
|
|
echo $ac_n "checking for Bochs internal debugger support""... $ac_c" 1>&6
|
|
! echo "configure:2866: checking for Bochs internal debugger support" >&5
|
|
# Check whether --enable-debugger or --disable-debugger was given.
|
|
if test "${enable_debugger+set}" = set; then
|
|
enableval="$enable_debugger"
|
|
***************
|
|
*** 2510,2515 ****
|
|
--- 2873,2879 ----
|
|
EOF
|
|
|
|
DEBUGGER_VAR='$(DEBUGGER_LIB)'
|
|
+ bx_debugger=1
|
|
else
|
|
echo "$ac_t""no" 1>&6
|
|
cat >> confdefs.h <<\EOF
|
|
***************
|
|
*** 2517,2523 ****
|
|
--- 2881,2889 ----
|
|
EOF
|
|
|
|
DEBUGGER_VAR=''
|
|
+ bx_debugger=0
|
|
fi
|
|
+
|
|
else
|
|
|
|
echo "$ac_t""no" 1>&6
|
|
***************
|
|
*** 2526,2531 ****
|
|
--- 2892,2898 ----
|
|
EOF
|
|
|
|
DEBUGGER_VAR=''
|
|
+ bx_debugger=0
|
|
|
|
|
|
fi
|
|
***************
|
|
*** 2533,2539 ****
|
|
|
|
|
|
echo $ac_n "checking for disassembler support""... $ac_c" 1>&6
|
|
! echo "configure:2537: checking for disassembler support" >&5
|
|
# Check whether --enable-disasm or --disable-disasm was given.
|
|
if test "${enable_disasm+set}" = set; then
|
|
enableval="$enable_disasm"
|
|
--- 2900,2906 ----
|
|
|
|
|
|
echo $ac_n "checking for disassembler support""... $ac_c" 1>&6
|
|
! echo "configure:2904: checking for disassembler support" >&5
|
|
# Check whether --enable-disasm or --disable-disasm was given.
|
|
if test "${enable_disasm+set}" = set; then
|
|
enableval="$enable_disasm"
|
|
***************
|
|
*** 2546,2551 ****
|
|
--- 2913,2922 ----
|
|
DISASM_VAR='$(DISASM_LIB)'
|
|
else
|
|
echo "$ac_t""no" 1>&6
|
|
+ if test "$bx_debugger" = 1; then
|
|
+ echo "ERROR: debugger is enabled, so --enable-disasm is required"
|
|
+ exit 1
|
|
+ fi
|
|
cat >> confdefs.h <<\EOF
|
|
#define BX_DISASM 0
|
|
EOF
|
|
***************
|
|
*** 2554,2565 ****
|
|
fi
|
|
else
|
|
|
|
! echo "$ac_t""no" 1>&6
|
|
! cat >> confdefs.h <<\EOF
|
|
#define BX_DISASM 0
|
|
EOF
|
|
|
|
! DISASM_VAR=''
|
|
|
|
|
|
fi
|
|
--- 2925,2945 ----
|
|
fi
|
|
else
|
|
|
|
! if test "$bx_debugger" = 1; then
|
|
! echo "$ac_t""yes" 1>&6
|
|
! cat >> confdefs.h <<\EOF
|
|
! #define BX_DISASM 1
|
|
! EOF
|
|
!
|
|
! DISASM_VAR='$(DISASM_LIB)'
|
|
! else
|
|
! echo "$ac_t""no" 1>&6
|
|
! cat >> confdefs.h <<\EOF
|
|
#define BX_DISASM 0
|
|
EOF
|
|
|
|
! DISASM_VAR=''
|
|
! fi
|
|
|
|
|
|
fi
|
|
***************
|
|
*** 2567,2573 ****
|
|
|
|
|
|
echo $ac_n "checking for loader support""... $ac_c" 1>&6
|
|
! echo "configure:2571: checking for loader support" >&5
|
|
# Check whether --enable-loader or --disable-loader was given.
|
|
if test "${enable_loader+set}" = set; then
|
|
enableval="$enable_loader"
|
|
--- 2947,2953 ----
|
|
|
|
|
|
echo $ac_n "checking for loader support""... $ac_c" 1>&6
|
|
! echo "configure:2951: checking for loader support" >&5
|
|
# Check whether --enable-loader or --disable-loader was given.
|
|
if test "${enable_loader+set}" = set; then
|
|
enableval="$enable_loader"
|
|
***************
|
|
*** 2605,2611 ****
|
|
INSTRUMENT_DIR='instrument/stubs'
|
|
|
|
echo $ac_n "checking for instrumentation support""... $ac_c" 1>&6
|
|
! echo "configure:2609: checking for instrumentation support" >&5
|
|
# Check whether --enable-instrumentation or --disable-instrumentation was given.
|
|
if test "${enable_instrumentation+set}" = set; then
|
|
enableval="$enable_instrumentation"
|
|
--- 2985,2991 ----
|
|
INSTRUMENT_DIR='instrument/stubs'
|
|
|
|
echo $ac_n "checking for instrumentation support""... $ac_c" 1>&6
|
|
! echo "configure:2989: checking for instrumentation support" >&5
|
|
# Check whether --enable-instrumentation or --disable-instrumentation was given.
|
|
if test "${enable_instrumentation+set}" = set; then
|
|
enableval="$enable_instrumentation"
|
|
***************
|
|
*** 2740,2746 ****
|
|
|
|
|
|
echo $ac_n "checking for VGA emulation""... $ac_c" 1>&6
|
|
! echo "configure:2744: checking for VGA emulation" >&5
|
|
# Check whether --enable-vga or --disable-vga was given.
|
|
if test "${enable_vga+set}" = set; then
|
|
enableval="$enable_vga"
|
|
--- 3120,3126 ----
|
|
|
|
|
|
echo $ac_n "checking for VGA emulation""... $ac_c" 1>&6
|
|
! echo "configure:3124: checking for VGA emulation" >&5
|
|
# Check whether --enable-vga or --disable-vga was given.
|
|
if test "${enable_vga+set}" = set; then
|
|
enableval="$enable_vga"
|
|
***************
|
|
*** 2774,2780 ****
|
|
|
|
|
|
echo $ac_n "checking for FPU emulation""... $ac_c" 1>&6
|
|
! echo "configure:2778: checking for FPU emulation" >&5
|
|
FPU_VAR=''
|
|
FPU_GLUE_OBJ=''
|
|
# Check whether --enable-fpu or --disable-fpu was given.
|
|
--- 3154,3160 ----
|
|
|
|
|
|
echo $ac_n "checking for FPU emulation""... $ac_c" 1>&6
|
|
! echo "configure:3158: checking for FPU emulation" >&5
|
|
FPU_VAR=''
|
|
FPU_GLUE_OBJ=''
|
|
# Check whether --enable-fpu or --disable-fpu was given.
|
|
***************
|
|
*** 2816,2822 ****
|
|
|
|
|
|
echo $ac_n "checking for x86 debugger support""... $ac_c" 1>&6
|
|
! echo "configure:2820: checking for x86 debugger support" >&5
|
|
# Check whether --enable-x86-debugger or --disable-x86-debugger was given.
|
|
if test "${enable_x86_debugger+set}" = set; then
|
|
enableval="$enable_x86_debugger"
|
|
--- 3196,3202 ----
|
|
|
|
|
|
echo $ac_n "checking for x86 debugger support""... $ac_c" 1>&6
|
|
! echo "configure:3200: checking for x86 debugger support" >&5
|
|
# Check whether --enable-x86-debugger or --disable-x86-debugger was given.
|
|
if test "${enable_x86_debugger+set}" = set; then
|
|
enableval="$enable_x86_debugger"
|
|
***************
|
|
*** 2852,2858 ****
|
|
|
|
|
|
echo $ac_n "checking for CDROM support""... $ac_c" 1>&6
|
|
! echo "configure:2856: checking for CDROM support" >&5
|
|
# Check whether --enable-cdrom or --disable-cdrom was given.
|
|
if test "${enable_cdrom+set}" = set; then
|
|
enableval="$enable_cdrom"
|
|
--- 3232,3238 ----
|
|
|
|
|
|
echo $ac_n "checking for CDROM support""... $ac_c" 1>&6
|
|
! echo "configure:3236: checking for CDROM support" >&5
|
|
# Check whether --enable-cdrom or --disable-cdrom was given.
|
|
if test "${enable_cdrom+set}" = set; then
|
|
enableval="$enable_cdrom"
|
|
***************
|
|
*** 2894,2900 ****
|
|
|
|
|
|
echo $ac_n "checking for Sound Blaster 16 support""... $ac_c" 1>&6
|
|
! echo "configure:2898: checking for Sound Blaster 16 support" >&5
|
|
# Check whether --enable-sb16 or --disable-sb16 was given.
|
|
if test "${enable_sb16+set}" = set; then
|
|
enableval="$enable_sb16"
|
|
--- 3274,3280 ----
|
|
|
|
|
|
echo $ac_n "checking for Sound Blaster 16 support""... $ac_c" 1>&6
|
|
! echo "configure:3278: checking for Sound Blaster 16 support" >&5
|
|
# Check whether --enable-sb16 or --disable-sb16 was given.
|
|
if test "${enable_sb16+set}" = set; then
|
|
enableval="$enable_sb16"
|
|
***************
|
|
*** 3188,3194 ****
|
|
# Ultrix sh set writes to stderr and can't be redirected directly,
|
|
# and sets the high bit in the cache file unless we assign to the vars.
|
|
(set) 2>&1 |
|
|
! case `(ac_space=' '; set) 2>&1` in
|
|
*ac_space=\ *)
|
|
# `set' does not quote correctly, so add quotes (double-quote substitution
|
|
# turns \\\\ into \\, and sed turns \\ into \).
|
|
--- 3568,3574 ----
|
|
# Ultrix sh set writes to stderr and can't be redirected directly,
|
|
# and sets the high bit in the cache file unless we assign to the vars.
|
|
(set) 2>&1 |
|
|
! case `(ac_space=' '; set | grep ac_space) 2>&1` in
|
|
*ac_space=\ *)
|
|
# `set' does not quote correctly, so add quotes (double-quote substitution
|
|
# turns \\\\ into \\, and sed turns \\ into \).
|
|
***************
|
|
*** 3255,3261 ****
|
|
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
|
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
|
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
|
! echo "$CONFIG_STATUS generated by autoconf version 2.12"
|
|
exit 0 ;;
|
|
-help | --help | --hel | --he | --h)
|
|
echo "\$ac_cs_usage"; exit 0 ;;
|
|
--- 3635,3641 ----
|
|
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
|
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
|
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
|
! echo "$CONFIG_STATUS generated by autoconf version 2.13"
|
|
exit 0 ;;
|
|
-help | --help | --hel | --he | --h)
|
|
echo "\$ac_cs_usage"; exit 0 ;;
|
|
***************
|
|
*** 3277,3285 ****
|
|
--- 3657,3667 ----
|
|
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
|
$ac_vpsub
|
|
$extrasub
|
|
+ s%@SHELL@%$SHELL%g
|
|
s%@CFLAGS@%$CFLAGS%g
|
|
s%@CPPFLAGS@%$CPPFLAGS%g
|
|
s%@CXXFLAGS@%$CXXFLAGS%g
|
|
+ s%@FFLAGS@%$FFLAGS%g
|
|
s%@DEFS@%$DEFS%g
|
|
s%@LDFLAGS@%$LDFLAGS%g
|
|
s%@LIBS@%$LIBS%g
|
|
diff -crN bochs-clean-2000-03-25/configure.in portable1/configure.in
|
|
*** bochs-clean-2000-03-25/configure.in Tue Apr 3 15:19:42 2001
|
|
--- portable1/configure.in Tue Apr 3 17:31:10 2001
|
|
***************
|
|
*** 21,28 ****
|
|
--- 21,64 ----
|
|
AC_CHECK_SIZEOF(unsigned int)
|
|
AC_CHECK_SIZEOF(unsigned long)
|
|
AC_CHECK_SIZEOF(unsigned long long)
|
|
+ AC_CHECK_SIZEOF(int *)
|
|
AC_CHECK_FUNCS(select, AC_DEFINE(BX_HAVE_SELECT))
|
|
+ AC_CHECK_FUNCS(snprintf, AC_DEFINE(BX_HAVE_SNPRINTF))
|
|
+ AC_CHECK_FUNCS(strtoull, AC_DEFINE(BX_HAVE_STRTOULL))
|
|
|
|
+ AC_MSG_CHECKING(if compiler allows empty structs)
|
|
+ AC_TRY_COMPILE([], [typedef struct { } junk;],
|
|
+ AC_MSG_RESULT(yes),
|
|
+ [
|
|
+ AC_DEFINE(BX_NO_EMPTY_STRUCTS)
|
|
+ AC_MSG_RESULT(no)
|
|
+ ])
|
|
+
|
|
+ AC_MSG_CHECKING(if compiler allows __attribute__)
|
|
+ AC_TRY_COMPILE([], [typedef struct { } __attribute__ ((packed)) junk;],
|
|
+ AC_MSG_RESULT(yes),
|
|
+ [
|
|
+ AC_MSG_RESULT(no)
|
|
+ AC_DEFINE(BX_NO_ATTRIBUTES)
|
|
+ ])
|
|
+
|
|
+ AC_LANG_SAVE
|
|
+ AC_LANG_CPLUSPLUS
|
|
+ AC_MSG_CHECKING(for hash_map.h)
|
|
+ AC_TRY_COMPILE([#include <hash_map.h>], [],
|
|
+ [
|
|
+ AC_MSG_RESULT(yes)
|
|
+ AC_DEFINE(BX_HAVE_HASH_MAP)
|
|
+ ], AC_MSG_RESULT(no))
|
|
+
|
|
+ AC_MSG_CHECKING(if compiler allows blank labels)
|
|
+ AC_TRY_COMPILE([], [ { label1: } ],
|
|
+ AC_MSG_RESULT(yes),
|
|
+ [
|
|
+ AC_MSG_RESULT(no)
|
|
+ AC_DEFINE(BX_NO_BLANK_LABELS)
|
|
+ ])
|
|
+ AC_LANG_RESTORE
|
|
|
|
AC_MSG_CHECKING(for cpu level)
|
|
AC_ARG_ENABLE(cpu-level,
|
|
***************
|
|
*** 214,228 ****
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(BX_DEBUGGER, 1)
|
|
DEBUGGER_VAR='$(DEBUGGER_LIB)'
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
AC_DEFINE(BX_DEBUGGER, 0)
|
|
DEBUGGER_VAR=''
|
|
! fi],
|
|
[
|
|
AC_MSG_RESULT(no)
|
|
AC_DEFINE(BX_DEBUGGER, 0)
|
|
DEBUGGER_VAR=''
|
|
]
|
|
)
|
|
AC_SUBST(DEBUGGER_VAR)
|
|
--- 250,268 ----
|
|
AC_MSG_RESULT(yes)
|
|
AC_DEFINE(BX_DEBUGGER, 1)
|
|
DEBUGGER_VAR='$(DEBUGGER_LIB)'
|
|
+ bx_debugger=1
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
AC_DEFINE(BX_DEBUGGER, 0)
|
|
DEBUGGER_VAR=''
|
|
! bx_debugger=0
|
|
! fi
|
|
! ],
|
|
[
|
|
AC_MSG_RESULT(no)
|
|
AC_DEFINE(BX_DEBUGGER, 0)
|
|
DEBUGGER_VAR=''
|
|
+ bx_debugger=0
|
|
]
|
|
)
|
|
AC_SUBST(DEBUGGER_VAR)
|
|
***************
|
|
*** 236,248 ****
|
|
DISASM_VAR='$(DISASM_LIB)'
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
AC_DEFINE(BX_DISASM, 0)
|
|
DISASM_VAR=''
|
|
fi],
|
|
[
|
|
! AC_MSG_RESULT(no)
|
|
! AC_DEFINE(BX_DISASM, 0)
|
|
! DISASM_VAR=''
|
|
]
|
|
)
|
|
AC_SUBST(DISASM_VAR)
|
|
--- 276,298 ----
|
|
DISASM_VAR='$(DISASM_LIB)'
|
|
else
|
|
AC_MSG_RESULT(no)
|
|
+ if test "$bx_debugger" = 1; then
|
|
+ echo "ERROR: debugger is enabled, so --enable-disasm is required"
|
|
+ exit 1
|
|
+ fi
|
|
AC_DEFINE(BX_DISASM, 0)
|
|
DISASM_VAR=''
|
|
fi],
|
|
[
|
|
! if test "$bx_debugger" = 1; then
|
|
! AC_MSG_RESULT(yes)
|
|
! AC_DEFINE(BX_DISASM, 1)
|
|
! DISASM_VAR='$(DISASM_LIB)'
|
|
! else
|
|
! AC_MSG_RESULT(no)
|
|
! AC_DEFINE(BX_DISASM, 0)
|
|
! DISASM_VAR=''
|
|
! fi
|
|
]
|
|
)
|
|
AC_SUBST(DISASM_VAR)
|
|
diff -crN bochs-clean-2000-03-25/debug/dbg_main.cc portable1/debug/dbg_main.cc
|
|
*** bochs-clean-2000-03-25/debug/dbg_main.cc Tue Apr 3 15:19:42 2001
|
|
--- portable1/debug/dbg_main.cc Tue Apr 3 17:28:07 2001
|
|
***************
|
|
*** 950,956 ****
|
|
for (int i = 0; ; i++) {
|
|
Bit32u paddr;
|
|
Bit32u paddr_valid;
|
|
! Bit8u buf[0];
|
|
bx_dbg_callback[0].xlate_linear2phy(start_addr+i, &paddr, &paddr_valid);
|
|
if (paddr_valid) {
|
|
if (bx_dbg_callback[0].getphymem(paddr, 1, buf)) {
|
|
--- 950,956 ----
|
|
for (int i = 0; ; i++) {
|
|
Bit32u paddr;
|
|
Bit32u paddr_valid;
|
|
! Bit8u buf[1];
|
|
bx_dbg_callback[0].xlate_linear2phy(start_addr+i, &paddr, &paddr_valid);
|
|
if (paddr_valid) {
|
|
if (bx_dbg_callback[0].getphymem(paddr, 1, buf)) {
|
|
***************
|
|
*** 1137,1142 ****
|
|
--- 1137,1169 ----
|
|
}
|
|
}
|
|
|
|
+ #if !BX_HAVE_HASH_MAP
|
|
+
|
|
+ static char *BX_HAVE_HASH_MAP_ERR = "context not implemented because BX_HAVE_HASH_MAP=0\n";
|
|
+ char*
|
|
+ bx_dbg_symbolic_address(Bit32u context, Bit32u eip, Bit32u base)
|
|
+ {
|
|
+ static Boolean first = true;
|
|
+ if (first) {
|
|
+ fprintf (stderr, BX_HAVE_HASH_MAP_ERR);
|
|
+ first = false;
|
|
+ }
|
|
+ return "unknown context";
|
|
+ }
|
|
+
|
|
+ void
|
|
+ bx_dbg_symbol_command(char* filename, Boolean global, Bit32u offset)
|
|
+ {
|
|
+ fprintf (stderr, BX_HAVE_HASH_MAP_ERR);
|
|
+ }
|
|
+
|
|
+ #else /* if BX_HAVE_HASH_MAP == 1 */
|
|
+
|
|
+ /* Haven't figured out how to port this code to OSF1 cxx compiler.
|
|
+ Until a more portable solution is found, at least make it easy
|
|
+ to disable the template code: just set BX_HAVE_HASH_MAP=0
|
|
+ in config.h */
|
|
+
|
|
#include <hash_map.h>
|
|
#include <set.h>
|
|
|
|
***************
|
|
*** 1215,1221 ****
|
|
{
|
|
static char buf[80];
|
|
if (base != 0) {
|
|
! snprintf(buf, 80, "non-zero base");
|
|
return buf;
|
|
}
|
|
// Look up this context
|
|
--- 1242,1248 ----
|
|
{
|
|
static char buf[80];
|
|
if (base != 0) {
|
|
! bx_snprintf (buf, 80, "non-zero base");
|
|
return buf;
|
|
}
|
|
// Look up this context
|
|
***************
|
|
*** 1224,1240 ****
|
|
// Try global context
|
|
cntx = context_t::get_context(0);
|
|
if (!cntx) {
|
|
! snprintf(buf, 80, "unknown context");
|
|
return buf;
|
|
}
|
|
}
|
|
|
|
symbol_entry_t* entr = cntx->get_symbol_entry(eip);
|
|
if (!entr) {
|
|
! snprintf(buf, 80, "no symbol");
|
|
return buf;
|
|
}
|
|
! snprintf(buf, 80, "%s+%x", entr->name, eip - entr->start);
|
|
return buf;
|
|
}
|
|
|
|
--- 1251,1267 ----
|
|
// Try global context
|
|
cntx = context_t::get_context(0);
|
|
if (!cntx) {
|
|
! bx_snprintf (buf, 80, "unknown context");
|
|
return buf;
|
|
}
|
|
}
|
|
|
|
symbol_entry_t* entr = cntx->get_symbol_entry(eip);
|
|
if (!entr) {
|
|
! bx_snprintf (buf, 80, "no symbol");
|
|
return buf;
|
|
}
|
|
! bx_snprintf (buf, 80, "%s+%x", entr->name, eip - entr->start);
|
|
return buf;
|
|
}
|
|
|
|
***************
|
|
*** 1287,1292 ****
|
|
--- 1314,1320 ----
|
|
cntx->add_symbol(sym);
|
|
}
|
|
}
|
|
+ #endif
|
|
|
|
int num_write_watchpoints = 0;
|
|
int num_read_watchpoints = 0;
|
|
***************
|
|
*** 1295,1301 ****
|
|
Boolean watchpoint_continue = 0;
|
|
|
|
void
|
|
! bx_dbg_watch(Boolean read, Bit32u address)
|
|
{
|
|
if (read == -1) {
|
|
// print watch point info
|
|
--- 1323,1329 ----
|
|
Boolean watchpoint_continue = 0;
|
|
|
|
void
|
|
! bx_dbg_watch(int read, Bit32u address)
|
|
{
|
|
if (read == -1) {
|
|
// print watch point info
|
|
***************
|
|
*** 1333,1339 ****
|
|
}
|
|
|
|
void
|
|
! bx_dbg_unwatch(Boolean read, Bit32u address)
|
|
{
|
|
if (read == -1) {
|
|
// unwatch all
|
|
--- 1361,1367 ----
|
|
}
|
|
|
|
void
|
|
! bx_dbg_unwatch(int read, Bit32u address)
|
|
{
|
|
if (read == -1) {
|
|
// unwatch all
|
|
***************
|
|
*** 3030,3036 ****
|
|
res = data1+data2;
|
|
fprintf(stderr," %x + %x = %x ",data1,data2,res);
|
|
data1 = res;
|
|
! break;
|
|
case '-':
|
|
res = data1-data2;
|
|
fprintf(stderr," %x - %x = %x ",data1,data2,res);
|
|
--- 3058,3064 ----
|
|
res = data1+data2;
|
|
fprintf(stderr," %x + %x = %x ",data1,data2,res);
|
|
data1 = res;
|
|
! break;
|
|
case '-':
|
|
res = data1-data2;
|
|
fprintf(stderr," %x - %x = %x ",data1,data2,res);
|
|
***************
|
|
*** 3232,3241 ****
|
|
}
|
|
}
|
|
}
|
|
-
|
|
-
|
|
-
|
|
-
|
|
|
|
//
|
|
// Reports from various events
|
|
--- 3260,3265 ----
|
|
diff -crN bochs-clean-2000-03-25/debug/debug.h portable1/debug/debug.h
|
|
*** bochs-clean-2000-03-25/debug/debug.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/debug/debug.h Tue Apr 3 18:44:26 2001
|
|
***************
|
|
*** 24,29 ****
|
|
--- 24,30 ----
|
|
// if including from C parser, need basic types etc
|
|
#ifndef __cplusplus
|
|
#include "config.h"
|
|
+ #include "osdep.h"
|
|
#endif
|
|
|
|
#if BX_USE_LOADER
|
|
***************
|
|
*** 87,94 ****
|
|
void bx_dbg_show_command(char*); /* BW */
|
|
void enter_playback_entry();
|
|
void bx_dbg_print_stack_command(int nwords);
|
|
! void bx_dbg_watch(Boolean read, Bit32u address);
|
|
! void bx_dbg_unwatch(Boolean read, Bit32u address);
|
|
void bx_dbg_continue_command(void);
|
|
void bx_dbg_stepN_command(bx_dbg_icount_t count);
|
|
void bx_dbg_set_command(char *p1, char *p2, char *p3);
|
|
--- 88,95 ----
|
|
void bx_dbg_show_command(char*); /* BW */
|
|
void enter_playback_entry();
|
|
void bx_dbg_print_stack_command(int nwords);
|
|
! void bx_dbg_watch(int read, Bit32u address);
|
|
! void bx_dbg_unwatch(int read, Bit32u address);
|
|
void bx_dbg_continue_command(void);
|
|
void bx_dbg_stepN_command(bx_dbg_icount_t count);
|
|
void bx_dbg_set_command(char *p1, char *p2, char *p3);
|
|
diff -crN bochs-clean-2000-03-25/debug/lexer.c portable1/debug/lexer.c
|
|
*** bochs-clean-2000-03-25/debug/lexer.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/debug/lexer.c Tue Apr 3 18:51:58 2001
|
|
***************
|
|
*** 19,25 ****
|
|
/* A lexical scanner generated by flex */
|
|
|
|
/* Scanner skeleton version:
|
|
! * $Header: /home/volker/Archiv/bochs-cvs-rsync-20110222/bochs/patches/patch.portable1,v 1.1 2001-04-10 02:22:14 bdenney Exp $
|
|
*/
|
|
|
|
#define FLEX_SCANNER
|
|
--- 19,25 ----
|
|
/* A lexical scanner generated by flex */
|
|
|
|
/* Scanner skeleton version:
|
|
! * $Header: /home/volker/Archiv/bochs-cvs-rsync-20110222/bochs/patches/patch.portable1,v 1.1 2001-04-10 02:22:14 bdenney Exp $
|
|
*/
|
|
|
|
#define FLEX_SCANNER
|
|
***************
|
|
*** 739,745 ****
|
|
YY_DECL
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
! register char *yy_cp, *yy_bp;
|
|
register int yy_act;
|
|
|
|
#line 16 "lexer.l"
|
|
--- 739,745 ----
|
|
YY_DECL
|
|
{
|
|
register yy_state_type yy_current_state;
|
|
! register char *yy_cp = NULL, *yy_bp = NULL;
|
|
register int yy_act;
|
|
|
|
#line 16 "lexer.l"
|
|
***************
|
|
*** 1272,1278 ****
|
|
case 92:
|
|
YY_RULE_SETUP
|
|
#line 108 "lexer.l"
|
|
! { bxlval.ulval = strtoull(bxtext, NULL, 10); return(BX_TOKEN_LONG_NUMERIC); }
|
|
YY_BREAK
|
|
case 93:
|
|
YY_RULE_SETUP
|
|
--- 1272,1278 ----
|
|
case 92:
|
|
YY_RULE_SETUP
|
|
#line 108 "lexer.l"
|
|
! { bxlval.ulval = bx_strtoull(bxtext, NULL, 10); return(BX_TOKEN_LONG_NUMERIC); }
|
|
YY_BREAK
|
|
case 93:
|
|
YY_RULE_SETUP
|
|
diff -crN bochs-clean-2000-03-25/debug/lexer.l portable1/debug/lexer.l
|
|
*** bochs-clean-2000-03-25/debug/lexer.l Tue Apr 3 15:19:42 2001
|
|
--- portable1/debug/lexer.l Tue Apr 3 18:39:44 2001
|
|
***************
|
|
*** 105,111 ****
|
|
\/[0-9]+ { bxlval.sval = strdup(bxtext); return(BX_TOKEN_XFORMAT); }
|
|
0x[0-9a-fA-F]+ { bxlval.uval = strtoul(bxtext+2, NULL, 16); return(BX_TOKEN_NUMERIC); }
|
|
0[0-7]+ { bxlval.uval = strtoul(bxtext+1, NULL, 8); return(BX_TOKEN_NUMERIC); }
|
|
! [0-9]+L { bxlval.ulval = strtoull(bxtext, NULL, 10); return(BX_TOKEN_LONG_NUMERIC); }
|
|
[0-9]+ { bxlval.uval = strtoul(bxtext, NULL, 10); return(BX_TOKEN_NUMERIC); }
|
|
$[a-zA-Z_][a-zA-Z0-9_]* { bxlval.sval = strdup(bxtext); return(BX_TOKEN_SYMBOLNAME); }
|
|
\n { return('\n'); }
|
|
--- 105,111 ----
|
|
\/[0-9]+ { bxlval.sval = strdup(bxtext); return(BX_TOKEN_XFORMAT); }
|
|
0x[0-9a-fA-F]+ { bxlval.uval = strtoul(bxtext+2, NULL, 16); return(BX_TOKEN_NUMERIC); }
|
|
0[0-7]+ { bxlval.uval = strtoul(bxtext+1, NULL, 8); return(BX_TOKEN_NUMERIC); }
|
|
! [0-9]+L { bxlval.ulval = bx_strtoull(bxtext, NULL, 10); return(BX_TOKEN_LONG_NUMERIC); }
|
|
[0-9]+ { bxlval.uval = strtoul(bxtext, NULL, 10); return(BX_TOKEN_NUMERIC); }
|
|
$[a-zA-Z_][a-zA-Z0-9_]* { bxlval.sval = strdup(bxtext); return(BX_TOKEN_SYMBOLNAME); }
|
|
\n { return('\n'); }
|
|
diff -crN bochs-clean-2000-03-25/fpu/control_w.h portable1/fpu/control_w.h
|
|
*** bochs-clean-2000-03-25/fpu/control_w.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/control_w.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 42,45 ****
|
|
/* FULL_PRECISION simulates all exceptions masked */
|
|
#define FULL_PRECISION (PR_64_BITS | RC_RND | 0x3f)
|
|
|
|
! #endif _CONTROLW_H_
|
|
--- 42,45 ----
|
|
/* FULL_PRECISION simulates all exceptions masked */
|
|
#define FULL_PRECISION (PR_64_BITS | RC_RND | 0x3f)
|
|
|
|
! #endif /* _CONTROLW_H_ */
|
|
diff -crN bochs-clean-2000-03-25/fpu/div_Xsig.S portable1/fpu/div_Xsig.S
|
|
*** bochs-clean-2000-03-25/fpu/div_Xsig.S Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/div_Xsig.S Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 70,76 ****
|
|
.long 0
|
|
FPU_result_1:
|
|
.long 0
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
|
|
.text
|
|
--- 70,76 ----
|
|
.long 0
|
|
FPU_result_1:
|
|
.long 0
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
|
|
.text
|
|
***************
|
|
*** 79,85 ****
|
|
movl %esp,%ebp
|
|
#ifndef NON_REENTRANT_FPU
|
|
subl $28,%esp
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
pushl %esi
|
|
pushl %edi
|
|
--- 79,85 ----
|
|
movl %esp,%ebp
|
|
#ifndef NON_REENTRANT_FPU
|
|
subl $28,%esp
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
pushl %esi
|
|
pushl %edi
|
|
***************
|
|
*** 91,97 ****
|
|
#ifdef PARANOID
|
|
testl $0x80000000, XsigH(%ebx) /* Divisor */
|
|
je L_bugged
|
|
! #endif PARANOID
|
|
|
|
|
|
/*---------------------------------------------------------------------------+
|
|
--- 91,97 ----
|
|
#ifdef PARANOID
|
|
testl $0x80000000, XsigH(%ebx) /* Divisor */
|
|
je L_bugged
|
|
! #endif /* PARANOID */
|
|
|
|
|
|
/*---------------------------------------------------------------------------+
|
|
***************
|
|
*** 164,170 ****
|
|
|
|
#ifdef PARANOID
|
|
jb L_bugged_1
|
|
! #endif PARANOID
|
|
|
|
/* need to subtract another once of the denom */
|
|
incl FPU_result_3 /* Correct the answer */
|
|
--- 164,170 ----
|
|
|
|
#ifdef PARANOID
|
|
jb L_bugged_1
|
|
! #endif /* PARANOID */
|
|
|
|
/* need to subtract another once of the denom */
|
|
incl FPU_result_3 /* Correct the answer */
|
|
***************
|
|
*** 177,183 ****
|
|
#ifdef PARANOID
|
|
sbbl $0,FPU_accum_3
|
|
jne L_bugged_1 /* Must check for non-zero result here */
|
|
! #endif PARANOID
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
/* Half of the main problem is done, there is just a reduced numerator
|
|
--- 177,183 ----
|
|
#ifdef PARANOID
|
|
sbbl $0,FPU_accum_3
|
|
jne L_bugged_1 /* Must check for non-zero result here */
|
|
! #endif /* PARANOID */
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
/* Half of the main problem is done, there is just a reduced numerator
|
|
***************
|
|
*** 207,213 ****
|
|
|
|
#ifdef PARANOID
|
|
je L_bugged_2 /* Can't bump the result to 1.0 */
|
|
! #endif PARANOID
|
|
|
|
LDo_2nd_div:
|
|
cmpl $0,%ecx /* augmented denom msw */
|
|
--- 207,213 ----
|
|
|
|
#ifdef PARANOID
|
|
je L_bugged_2 /* Can't bump the result to 1.0 */
|
|
! #endif /* PARANOID */
|
|
|
|
LDo_2nd_div:
|
|
cmpl $0,%ecx /* augmented denom msw */
|
|
***************
|
|
*** 230,236 ****
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
movl FPU_result_2,%eax /* Get the result back */
|
|
mull XsigL(%ebx) /* now mul the ls dw of the denom */
|
|
--- 230,236 ----
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
movl FPU_result_2,%eax /* Get the result back */
|
|
mull XsigL(%ebx) /* now mul the ls dw of the denom */
|
|
***************
|
|
*** 241,254 ****
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
jz LDo_3rd_32_bits
|
|
|
|
#ifdef PARANOID
|
|
cmpl $1,FPU_accum_2
|
|
jne L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
/* need to subtract another once of the denom */
|
|
movl XsigL(%ebx),%eax
|
|
--- 241,254 ----
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
jz LDo_3rd_32_bits
|
|
|
|
#ifdef PARANOID
|
|
cmpl $1,FPU_accum_2
|
|
jne L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
/* need to subtract another once of the denom */
|
|
movl XsigL(%ebx),%eax
|
|
***************
|
|
*** 260,273 ****
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
jne L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
addl $1,FPU_result_2 /* Correct the answer */
|
|
adcl $0,FPU_result_3
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2 /* Must check for non-zero result here */
|
|
! #endif PARANOID
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
/* The division is essentially finished here, we just need to perform
|
|
--- 260,273 ----
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
jne L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
addl $1,FPU_result_2 /* Correct the answer */
|
|
adcl $0,FPU_result_3
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2 /* Must check for non-zero result here */
|
|
! #endif /* PARANOID */
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
/* The division is essentially finished here, we just need to perform
|
|
***************
|
|
*** 362,365 ****
|
|
call EXCEPTION
|
|
pop %ebx
|
|
jmp L_exit
|
|
! #endif PARANOID
|
|
--- 362,365 ----
|
|
call EXCEPTION
|
|
pop %ebx
|
|
jmp L_exit
|
|
! #endif /* PARANOID */
|
|
diff -crN bochs-clean-2000-03-25/fpu/errors.c portable1/fpu/errors.c
|
|
*** bochs-clean-2000-03-25/fpu/errors.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/errors.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 316,322 ****
|
|
#ifdef PRINT_MESSAGES
|
|
/* My message from the sponsor */
|
|
printk(FPU_VERSION" "__DATE__" (C) W. Metzenthen.\n");
|
|
! #endif PRINT_MESSAGES
|
|
|
|
/* Get a name string for error reporting */
|
|
for (i=0; exception_names[i].type; i++)
|
|
--- 316,322 ----
|
|
#ifdef PRINT_MESSAGES
|
|
/* My message from the sponsor */
|
|
printk(FPU_VERSION" "__DATE__" (C) W. Metzenthen.\n");
|
|
! #endif /* PRINT_MESSAGES */
|
|
|
|
/* Get a name string for error reporting */
|
|
for (i=0; exception_names[i].type; i++)
|
|
***************
|
|
*** 327,333 ****
|
|
{
|
|
#ifdef PRINT_MESSAGES
|
|
printk("FP Exception: %s!\n", exception_names[i].name);
|
|
! #endif PRINT_MESSAGES
|
|
}
|
|
else
|
|
printk("FPU emulator: Unknown Exception: 0x%04x!\n", n);
|
|
--- 327,333 ----
|
|
{
|
|
#ifdef PRINT_MESSAGES
|
|
printk("FP Exception: %s!\n", exception_names[i].name);
|
|
! #endif /* PRINT_MESSAGES */
|
|
}
|
|
else
|
|
printk("FPU emulator: Unknown Exception: 0x%04x!\n", n);
|
|
***************
|
|
*** 340,346 ****
|
|
#ifdef PRINT_MESSAGES
|
|
else
|
|
FPU_printall();
|
|
! #endif PRINT_MESSAGES
|
|
|
|
/*
|
|
* The 80486 generates an interrupt on the next non-control FPU
|
|
--- 340,346 ----
|
|
#ifdef PRINT_MESSAGES
|
|
else
|
|
FPU_printall();
|
|
! #endif /* PRINT_MESSAGES */
|
|
|
|
/*
|
|
* The 80486 generates an interrupt on the next non-control FPU
|
|
***************
|
|
*** 455,461 ****
|
|
else
|
|
#ifdef PARANOID
|
|
if (tagb == TW_NaN)
|
|
! #endif PARANOID
|
|
{
|
|
signalling = !(b->sigh & 0x40000000);
|
|
x = b;
|
|
--- 455,461 ----
|
|
else
|
|
#ifdef PARANOID
|
|
if (tagb == TW_NaN)
|
|
! #endif /* PARANOID */
|
|
{
|
|
signalling = !(b->sigh & 0x40000000);
|
|
x = b;
|
|
***************
|
|
*** 467,473 ****
|
|
EXCEPTION(EX_INTERNAL|0x113);
|
|
x = &CONST_QNaN;
|
|
}
|
|
! #endif PARANOID
|
|
|
|
if ( (!signalling) || (control_word & CW_Invalid) )
|
|
{
|
|
--- 467,473 ----
|
|
EXCEPTION(EX_INTERNAL|0x113);
|
|
x = &CONST_QNaN;
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
if ( (!signalling) || (control_word & CW_Invalid) )
|
|
{
|
|
diff -crN bochs-clean-2000-03-25/fpu/exception.h portable1/fpu/exception.h
|
|
*** bochs-clean-2000-03-25/fpu/exception.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/exception.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 18,24 ****
|
|
|
|
#ifndef SW_C1
|
|
#include "fpu_emu.h"
|
|
! #endif SW_C1
|
|
|
|
#define FPU_BUSY Const_(0x8000) /* FPU busy bit (8087 compatibility) */
|
|
#define EX_ErrorSummary Const_(0x0080) /* Error summary status */
|
|
--- 18,24 ----
|
|
|
|
#ifndef SW_C1
|
|
#include "fpu_emu.h"
|
|
! #endif /* SW_C1 */
|
|
|
|
#define FPU_BUSY Const_(0x8000) /* FPU busy bit (8087 compatibility) */
|
|
#define EX_ErrorSummary Const_(0x0080) /* Error summary status */
|
|
***************
|
|
*** 43,48 ****
|
|
|
|
#define EXCEPTION(x) FPU_exception(x)
|
|
|
|
! #endif __ASSEMBLY__
|
|
|
|
! #endif _EXCEPTION_H_
|
|
--- 43,48 ----
|
|
|
|
#define EXCEPTION(x) FPU_exception(x)
|
|
|
|
! #endif /* __ASSEMBLY__ */
|
|
|
|
! #endif /* _EXCEPTION_H_ */
|
|
diff -crN bochs-clean-2000-03-25/fpu/fpu_arith.c portable1/fpu/fpu_arith.c
|
|
*** bochs-clean-2000-03-25/fpu/fpu_arith.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/fpu_arith.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 39,45 ****
|
|
{
|
|
/* fsub st,st(i) */
|
|
clear_C1();
|
|
! FPU_sub(0, FPU_rm, control_word);
|
|
}
|
|
|
|
|
|
--- 39,45 ----
|
|
{
|
|
/* fsub st,st(i) */
|
|
clear_C1();
|
|
! FPU_sub(0, REGNO2PTR(FPU_rm), control_word);
|
|
}
|
|
|
|
|
|
***************
|
|
*** 47,53 ****
|
|
{
|
|
/* fsubr st,st(i) */
|
|
clear_C1();
|
|
! FPU_sub(REV, FPU_rm, control_word);
|
|
}
|
|
|
|
|
|
--- 47,53 ----
|
|
{
|
|
/* fsubr st,st(i) */
|
|
clear_C1();
|
|
! FPU_sub(REV, REGNO2PTR(FPU_rm), control_word);
|
|
}
|
|
|
|
|
|
***************
|
|
*** 55,61 ****
|
|
{
|
|
/* fdiv st,st(i) */
|
|
clear_C1();
|
|
! FPU_div(0, FPU_rm, control_word);
|
|
}
|
|
|
|
|
|
--- 55,61 ----
|
|
{
|
|
/* fdiv st,st(i) */
|
|
clear_C1();
|
|
! FPU_div(0, REGNO2PTR(FPU_rm), control_word);
|
|
}
|
|
|
|
|
|
***************
|
|
*** 63,69 ****
|
|
{
|
|
/* fdivr st,st(i) */
|
|
clear_C1();
|
|
! FPU_div(REV, FPU_rm, control_word);
|
|
}
|
|
|
|
|
|
--- 63,69 ----
|
|
{
|
|
/* fdivr st,st(i) */
|
|
clear_C1();
|
|
! FPU_div(REV, REGNO2PTR(FPU_rm), control_word);
|
|
}
|
|
|
|
|
|
***************
|
|
*** 89,95 ****
|
|
{
|
|
/* fsubr st(i),st */
|
|
clear_C1();
|
|
! FPU_sub(DEST_RM, FPU_rm, control_word);
|
|
}
|
|
|
|
|
|
--- 89,95 ----
|
|
{
|
|
/* fsubr st(i),st */
|
|
clear_C1();
|
|
! FPU_sub(DEST_RM, REGNO2PTR(FPU_rm), control_word);
|
|
}
|
|
|
|
|
|
***************
|
|
*** 97,103 ****
|
|
{
|
|
/* fsub st(i),st */
|
|
clear_C1();
|
|
! FPU_sub(REV|DEST_RM, FPU_rm, control_word);
|
|
}
|
|
|
|
|
|
--- 97,103 ----
|
|
{
|
|
/* fsub st(i),st */
|
|
clear_C1();
|
|
! FPU_sub(REV|DEST_RM, REGNO2PTR(FPU_rm), control_word);
|
|
}
|
|
|
|
|
|
***************
|
|
*** 105,111 ****
|
|
{
|
|
/* fdivr st(i),st */
|
|
clear_C1();
|
|
! FPU_div(DEST_RM, FPU_rm, control_word);
|
|
}
|
|
|
|
|
|
--- 105,111 ----
|
|
{
|
|
/* fdivr st(i),st */
|
|
clear_C1();
|
|
! FPU_div(DEST_RM, REGNO2PTR(FPU_rm), control_word);
|
|
}
|
|
|
|
|
|
***************
|
|
*** 113,119 ****
|
|
{
|
|
/* fdiv st(i),st */
|
|
clear_C1();
|
|
! FPU_div(REV|DEST_RM, FPU_rm, control_word);
|
|
}
|
|
|
|
|
|
--- 113,119 ----
|
|
{
|
|
/* fdiv st(i),st */
|
|
clear_C1();
|
|
! FPU_div(REV|DEST_RM, REGNO2PTR(FPU_rm), control_word);
|
|
}
|
|
|
|
|
|
***************
|
|
*** 142,148 ****
|
|
{
|
|
/* fsubrp st(i),st */
|
|
clear_C1();
|
|
! if ( FPU_sub(DEST_RM, FPU_rm, control_word) >= 0 )
|
|
FPU_pop();
|
|
}
|
|
|
|
--- 142,148 ----
|
|
{
|
|
/* fsubrp st(i),st */
|
|
clear_C1();
|
|
! if ( FPU_sub(DEST_RM, REGNO2PTR(FPU_rm), control_word) >= 0 )
|
|
FPU_pop();
|
|
}
|
|
|
|
***************
|
|
*** 151,157 ****
|
|
{
|
|
/* fsubp st(i),st */
|
|
clear_C1();
|
|
! if ( FPU_sub(REV|DEST_RM, FPU_rm, control_word) >= 0 )
|
|
FPU_pop();
|
|
}
|
|
|
|
--- 151,157 ----
|
|
{
|
|
/* fsubp st(i),st */
|
|
clear_C1();
|
|
! if ( FPU_sub(REV|DEST_RM, REGNO2PTR(FPU_rm), control_word) >= 0 )
|
|
FPU_pop();
|
|
}
|
|
|
|
***************
|
|
*** 160,166 ****
|
|
{
|
|
/* fdivrp st(i),st */
|
|
clear_C1();
|
|
! if ( FPU_div(DEST_RM, FPU_rm, control_word) >= 0 )
|
|
FPU_pop();
|
|
}
|
|
|
|
--- 160,166 ----
|
|
{
|
|
/* fdivrp st(i),st */
|
|
clear_C1();
|
|
! if ( FPU_div(DEST_RM, REGNO2PTR(FPU_rm), control_word) >= 0 )
|
|
FPU_pop();
|
|
}
|
|
|
|
***************
|
|
*** 169,174 ****
|
|
{
|
|
/* fdivp st(i),st */
|
|
clear_C1();
|
|
! if ( FPU_div(REV|DEST_RM, FPU_rm, control_word) >= 0 )
|
|
FPU_pop();
|
|
}
|
|
--- 169,174 ----
|
|
{
|
|
/* fdivp st(i),st */
|
|
clear_C1();
|
|
! if ( FPU_div(REV|DEST_RM, REGNO2PTR(FPU_rm), control_word) >= 0 )
|
|
FPU_pop();
|
|
}
|
|
diff -crN bochs-clean-2000-03-25/fpu/fpu_asm.h portable1/fpu/fpu_asm.h
|
|
*** bochs-clean-2000-03-25/fpu/fpu_asm.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/fpu_asm.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 29,32 ****
|
|
#define SIGL(x) SIGL_OFFSET##(x)
|
|
#define SIGH(x) 4(x)
|
|
|
|
! #endif _FPU_ASM_H_
|
|
--- 29,32 ----
|
|
#define SIGL(x) SIGL_OFFSET##(x)
|
|
#define SIGH(x) 4(x)
|
|
|
|
! #endif /* _FPU_ASM_H_ */
|
|
diff -crN bochs-clean-2000-03-25/fpu/fpu_emu.h portable1/fpu/fpu_emu.h
|
|
*** bochs-clean-2000-03-25/fpu/fpu_emu.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/fpu_emu.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 89,95 ****
|
|
#else
|
|
# define RE_ENTRANT_CHECK_OFF
|
|
# define RE_ENTRANT_CHECK_ON
|
|
! #endif RE_ENTRANT_CHECKING
|
|
|
|
#define FWAIT_OPCODE 0x9b
|
|
#define OP_SIZE_PREFIX 0x66
|
|
--- 89,95 ----
|
|
#else
|
|
# define RE_ENTRANT_CHECK_OFF
|
|
# define RE_ENTRANT_CHECK_ON
|
|
! #endif /* ifdef RE_ENTRANT_CHECKING */
|
|
|
|
#define FWAIT_OPCODE 0x9b
|
|
#define OP_SIZE_PREFIX 0x66
|
|
***************
|
|
*** 122,128 ****
|
|
u32 opcode:11;
|
|
u32 empty:5;
|
|
#endif
|
|
! } __attribute__ ((packed));
|
|
|
|
struct fpu__reg {
|
|
#ifdef EMU_BIG_ENDIAN
|
|
--- 122,128 ----
|
|
u32 opcode:11;
|
|
u32 empty:5;
|
|
#endif
|
|
! } GCC_ATTRIBUTE((packed));
|
|
|
|
struct fpu__reg {
|
|
#ifdef EMU_BIG_ENDIAN
|
|
***************
|
|
*** 134,140 ****
|
|
u32 sigh;
|
|
s16 exp; /* Signed quantity used in internal arithmetic. */
|
|
#endif
|
|
! } __attribute__ ((aligned(16), packed));
|
|
|
|
#ifdef EMU_BIG_ENDIAN
|
|
#define MAKE_REG(s,e,l,h) { h, l, \
|
|
--- 134,140 ----
|
|
u32 sigh;
|
|
s16 exp; /* Signed quantity used in internal arithmetic. */
|
|
#endif
|
|
! } GCC_ATTRIBUTE((aligned(16), packed));
|
|
|
|
#ifdef EMU_BIG_ENDIAN
|
|
#define MAKE_REG(s,e,l,h) { h, l, \
|
|
***************
|
|
*** 148,157 ****
|
|
typedef struct fpu__reg FPU_REG;
|
|
typedef void (*FUNC_ST0)(FPU_REG *st0_ptr, u_char st0_tag);
|
|
typedef struct { u_char address_size, operand_size, segment; }
|
|
! __attribute__ ((packed)) overrides;
|
|
/* This structure is 32 bits: */
|
|
typedef struct { overrides override;
|
|
! u_char default_mode; } __attribute__ ((packed)) fpu_addr_modes;
|
|
/* PROTECTED has a restricted meaning in the emulator; it is used
|
|
to signal that the emulator needs to do special things to ensure
|
|
that protection is respected in a segmented model. */
|
|
--- 148,158 ----
|
|
typedef struct fpu__reg FPU_REG;
|
|
typedef void (*FUNC_ST0)(FPU_REG *st0_ptr, u_char st0_tag);
|
|
typedef struct { u_char address_size, operand_size, segment; }
|
|
! GCC_ATTRIBUTE((packed)) overrides;
|
|
/* This structure is 32 bits: */
|
|
typedef struct { overrides override;
|
|
! u_char default_mode; }
|
|
! GCC_ATTRIBUTE((packed)) fpu_addr_modes;
|
|
/* PROTECTED has a restricted meaning in the emulator; it is used
|
|
to signal that the emulator needs to do special things to ensure
|
|
that protection is respected in a segmented model. */
|
|
***************
|
|
*** 239,244 ****
|
|
#include "fpu_proto.h"
|
|
#endif
|
|
|
|
! #endif __ASSEMBLY__
|
|
|
|
! #endif _FPU_EMU_H_
|
|
--- 240,245 ----
|
|
#include "fpu_proto.h"
|
|
#endif
|
|
|
|
! #endif /* defined __ASSEMBLY__ */
|
|
|
|
! #endif /* !defined _FPU_EMU_H_ */
|
|
diff -crN bochs-clean-2000-03-25/fpu/fpu_entry.c portable1/fpu/fpu_entry.c
|
|
*** bochs-clean-2000-03-25/fpu/fpu_entry.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/fpu_entry.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 24,40 ****
|
|
| entry points for wm-FPU-emu. |
|
|
+---------------------------------------------------------------------------*/
|
|
|
|
- #include <linux/signal.h>
|
|
-
|
|
- #include <asm/uaccess.h>
|
|
- #include <asm/desc.h>
|
|
-
|
|
#include "fpu_system.h"
|
|
#include "fpu_emu.h"
|
|
#include "exception.h"
|
|
#include "control_w.h"
|
|
#include "status_w.h"
|
|
|
|
#define __BAD__ FPU_illegal /* Illegal on an 80486, causes SIGILL */
|
|
|
|
#ifndef NO_UNDOC_CODE /* Un-documented FPU op-codes supported by default. */
|
|
--- 24,41 ----
|
|
| entry points for wm-FPU-emu. |
|
|
+---------------------------------------------------------------------------*/
|
|
|
|
#include "fpu_system.h"
|
|
#include "fpu_emu.h"
|
|
#include "exception.h"
|
|
#include "control_w.h"
|
|
#include "status_w.h"
|
|
|
|
+ #include <linux/signal.h>
|
|
+
|
|
+ #include <asm/uaccess.h>
|
|
+ #include <asm/desc.h>
|
|
+
|
|
+
|
|
#define __BAD__ FPU_illegal /* Illegal on an 80486, causes SIGILL */
|
|
|
|
#ifndef NO_UNDOC_CODE /* Un-documented FPU op-codes supported by default. */
|
|
***************
|
|
*** 78,84 ****
|
|
fdivr_, FPU_trigb, __BAD__, __BAD__, fdiv_i, __BAD__, fdivp_, __BAD__,
|
|
};
|
|
|
|
! #endif NO_UNDOC_CODE
|
|
|
|
|
|
#define _NONE_ 0 /* Take no special action */
|
|
--- 79,85 ----
|
|
fdivr_, FPU_trigb, __BAD__, __BAD__, fdiv_i, __BAD__, fdivp_, __BAD__,
|
|
};
|
|
|
|
! #endif /* NO_UNDOC_CODE */
|
|
|
|
|
|
#define _NONE_ 0 /* Take no special action */
|
|
***************
|
|
*** 120,126 ****
|
|
_REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_
|
|
};
|
|
|
|
! #endif NO_UNDOC_CODE
|
|
|
|
|
|
#ifndef USE_WITH_CPU_SIM
|
|
--- 121,127 ----
|
|
_REGI_, _NONE_, _null_, _null_, _REGIi, _null_, _REGIp, _null_
|
|
};
|
|
|
|
! #endif /* NO_UNDOC_CODE */
|
|
|
|
|
|
#ifndef USE_WITH_CPU_SIM
|
|
***************
|
|
*** 128,134 ****
|
|
|
|
#ifdef RE_ENTRANT_CHECKING
|
|
u_char emulating=0;
|
|
! #endif RE_ENTRANT_CHECKING
|
|
|
|
static int valid_prefix(u_char *Byte, u_char **fpu_eip,
|
|
overrides *override);
|
|
--- 129,135 ----
|
|
|
|
#ifdef RE_ENTRANT_CHECKING
|
|
u_char emulating=0;
|
|
! #endif /* RE_ENTRANT_CHECKING */
|
|
|
|
static int valid_prefix(u_char *Byte, u_char **fpu_eip,
|
|
overrides *override);
|
|
***************
|
|
*** 155,161 ****
|
|
printk("ERROR: wm-FPU-emu is not RE-ENTRANT!\n");
|
|
}
|
|
RE_ENTRANT_CHECK_ON;
|
|
! #endif RE_ENTRANT_CHECKING
|
|
|
|
if (!current->used_math)
|
|
{
|
|
--- 156,162 ----
|
|
printk("ERROR: wm-FPU-emu is not RE-ENTRANT!\n");
|
|
}
|
|
RE_ENTRANT_CHECK_ON;
|
|
! #endif /* RE_ENTRANT_CHECKING */
|
|
|
|
if (!current->used_math)
|
|
{
|
|
***************
|
|
*** 254,260 ****
|
|
#ifdef PARANOID
|
|
EXCEPTION(EX_INTERNAL|0x128);
|
|
math_abort(FPU_info,SIGILL);
|
|
! #endif PARANOID
|
|
}
|
|
|
|
RE_ENTRANT_CHECK_OFF;
|
|
--- 255,261 ----
|
|
#ifdef PARANOID
|
|
EXCEPTION(EX_INTERNAL|0x128);
|
|
math_abort(FPU_info,SIGILL);
|
|
! #endif /* PARANOID */
|
|
}
|
|
|
|
RE_ENTRANT_CHECK_OFF;
|
|
***************
|
|
*** 344,350 ****
|
|
unmasked &= ~0xff;
|
|
break;
|
|
case 1:
|
|
! loaded_tag = FPU_load_int32((u32 *)data_address, &loaded_data);
|
|
break;
|
|
case 2:
|
|
unmasked = FPU_load_double((double *)data_address,
|
|
--- 345,351 ----
|
|
unmasked &= ~0xff;
|
|
break;
|
|
case 1:
|
|
! loaded_tag = FPU_load_int32((s32 *)data_address, &loaded_data); // bad: was (u32*)
|
|
break;
|
|
case 2:
|
|
unmasked = FPU_load_double((double *)data_address,
|
|
***************
|
|
*** 389,395 ****
|
|
/* fdiv or fsub */
|
|
real_2op_NaN(&loaded_data, loaded_tag, 0, &loaded_data);
|
|
else
|
|
! #endif PECULIAR_486
|
|
/* fadd, fdivr, fmul, or fsubr */
|
|
real_2op_NaN(&loaded_data, loaded_tag, 0, st0_ptr);
|
|
}
|
|
--- 390,396 ----
|
|
/* fdiv or fsub */
|
|
real_2op_NaN(&loaded_data, loaded_tag, 0, &loaded_data);
|
|
else
|
|
! #endif /* PECULIAR_486 */
|
|
/* fadd, fdivr, fmul, or fsubr */
|
|
real_2op_NaN(&loaded_data, loaded_tag, 0, st0_ptr);
|
|
}
|
|
***************
|
|
*** 444,465 ****
|
|
break;
|
|
case 4: /* fsub */
|
|
clear_C1();
|
|
! FPU_sub(LOADED|loaded_tag, (int)&loaded_data, control_word);
|
|
break;
|
|
case 5: /* fsubr */
|
|
clear_C1();
|
|
! FPU_sub(REV|LOADED|loaded_tag, (int)&loaded_data, control_word);
|
|
break;
|
|
case 6: /* fdiv */
|
|
clear_C1();
|
|
! FPU_div(LOADED|loaded_tag, (int)&loaded_data, control_word);
|
|
break;
|
|
case 7: /* fdivr */
|
|
clear_C1();
|
|
if ( st0_tag == TAG_Zero )
|
|
partial_status = status1; /* Undo any denorm tag,
|
|
zero-divide has priority. */
|
|
! FPU_div(REV|LOADED|loaded_tag, (int)&loaded_data, control_word);
|
|
break;
|
|
}
|
|
}
|
|
--- 445,469 ----
|
|
break;
|
|
case 4: /* fsub */
|
|
clear_C1();
|
|
! // bbd: loaded_data used to be typecast to an int, but
|
|
! // this corrupted the pointer on 64-bit machines.
|
|
! // Now FPU_sub and similar take a FPU_REG* here instead.
|
|
! FPU_sub(LOADED|loaded_tag, &loaded_data, control_word);
|
|
break;
|
|
case 5: /* fsubr */
|
|
clear_C1();
|
|
! FPU_sub(REV|LOADED|loaded_tag, &loaded_data, control_word);
|
|
break;
|
|
case 6: /* fdiv */
|
|
clear_C1();
|
|
! FPU_div(LOADED|loaded_tag, &loaded_data, control_word);
|
|
break;
|
|
case 7: /* fdivr */
|
|
clear_C1();
|
|
if ( st0_tag == TAG_Zero )
|
|
partial_status = status1; /* Undo any denorm tag,
|
|
zero-divide has priority. */
|
|
! FPU_div(REV|LOADED|loaded_tag, &loaded_data, control_word);
|
|
break;
|
|
}
|
|
}
|
|
***************
|
|
*** 500,506 ****
|
|
to do this: */
|
|
operand_address.offset = 0;
|
|
operand_address.selector = FPU_DS;
|
|
! #endif PECULIAR_486
|
|
|
|
st0_ptr = &st(0);
|
|
st0_tag = FPU_gettag0();
|
|
--- 504,510 ----
|
|
to do this: */
|
|
operand_address.offset = 0;
|
|
operand_address.selector = FPU_DS;
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
st0_ptr = &st(0);
|
|
st0_tag = FPU_gettag0();
|
|
***************
|
|
*** 666,672 ****
|
|
__asm__("movl %0,%%esp ; ret": :"g" (((long) info)-4));
|
|
#ifdef PARANOID
|
|
printk("ERROR: wm-FPU-emu math_abort failed!\n");
|
|
! #endif PARANOID
|
|
}
|
|
|
|
|
|
--- 670,676 ----
|
|
__asm__("movl %0,%%esp ; ret": :"g" (((long) info)-4));
|
|
#ifdef PARANOID
|
|
printk("ERROR: wm-FPU-emu math_abort failed!\n");
|
|
! #endif /* PARANOID */
|
|
}
|
|
|
|
|
|
***************
|
|
*** 736,742 ****
|
|
S387->twd |= 0xffff0000;
|
|
S387->fcs &= ~0xf8000000;
|
|
S387->fos |= 0xffff0000;
|
|
! #endif PECULIAR_486
|
|
__copy_to_user(d, &S387->cwd, 7*4);
|
|
RE_ENTRANT_CHECK_ON;
|
|
|
|
--- 740,746 ----
|
|
S387->twd |= 0xffff0000;
|
|
S387->fcs &= ~0xf8000000;
|
|
S387->fos |= 0xffff0000;
|
|
! #endif /* PECULIAR_486 */
|
|
__copy_to_user(d, &S387->cwd, 7*4);
|
|
RE_ENTRANT_CHECK_ON;
|
|
|
|
***************
|
|
*** 848,854 ****
|
|
unmasked &= ~0xff;
|
|
break;
|
|
case 1:
|
|
! loaded_tag = FPU_load_int32((u32 *)data_address, &loaded_data);
|
|
break;
|
|
case 2:
|
|
unmasked = FPU_load_double((double *)data_address,
|
|
--- 852,858 ----
|
|
unmasked &= ~0xff;
|
|
break;
|
|
case 1:
|
|
! loaded_tag = FPU_load_int32((s32 *)data_address, &loaded_data); // bbd: was (u32 *)
|
|
break;
|
|
case 2:
|
|
unmasked = FPU_load_double((double *)data_address,
|
|
***************
|
|
*** 893,899 ****
|
|
/* fdiv or fsub */
|
|
real_2op_NaN(&loaded_data, loaded_tag, 0, &loaded_data);
|
|
else
|
|
! #endif PECULIAR_486
|
|
/* fadd, fdivr, fmul, or fsubr */
|
|
real_2op_NaN(&loaded_data, loaded_tag, 0, st0_ptr);
|
|
}
|
|
--- 897,903 ----
|
|
/* fdiv or fsub */
|
|
real_2op_NaN(&loaded_data, loaded_tag, 0, &loaded_data);
|
|
else
|
|
! #endif /* PECULIAR_486 */
|
|
/* fadd, fdivr, fmul, or fsubr */
|
|
real_2op_NaN(&loaded_data, loaded_tag, 0, st0_ptr);
|
|
}
|
|
***************
|
|
*** 942,969 ****
|
|
FPU_compare_st_data(&loaded_data, loaded_tag);
|
|
break;
|
|
case 3: /* fcomp */
|
|
if ( !FPU_compare_st_data(&loaded_data, loaded_tag)
|
|
&& !unmasked )
|
|
FPU_pop();
|
|
break;
|
|
case 4: /* fsub */
|
|
clear_C1();
|
|
! FPU_sub(LOADED|loaded_tag, (int)&loaded_data, control_word);
|
|
break;
|
|
case 5: /* fsubr */
|
|
clear_C1();
|
|
! FPU_sub(REV|LOADED|loaded_tag, (int)&loaded_data, control_word);
|
|
break;
|
|
case 6: /* fdiv */
|
|
clear_C1();
|
|
! FPU_div(LOADED|loaded_tag, (int)&loaded_data, control_word);
|
|
break;
|
|
case 7: /* fdivr */
|
|
clear_C1();
|
|
if ( st0_tag == TAG_Zero )
|
|
partial_status = status1; /* Undo any denorm tag,
|
|
zero-divide has priority. */
|
|
! FPU_div(REV|LOADED|loaded_tag, (int)&loaded_data, control_word);
|
|
break;
|
|
}
|
|
}
|
|
--- 946,975 ----
|
|
FPU_compare_st_data(&loaded_data, loaded_tag);
|
|
break;
|
|
case 3: /* fcomp */
|
|
+ // bbd: used to typecase to int first, but this corrupted the
|
|
+ // pointer on 64 bit machines.
|
|
if ( !FPU_compare_st_data(&loaded_data, loaded_tag)
|
|
&& !unmasked )
|
|
FPU_pop();
|
|
break;
|
|
case 4: /* fsub */
|
|
clear_C1();
|
|
! FPU_sub(LOADED|loaded_tag, &loaded_data, control_word);
|
|
break;
|
|
case 5: /* fsubr */
|
|
clear_C1();
|
|
! FPU_sub(REV|LOADED|loaded_tag, &loaded_data, control_word);
|
|
break;
|
|
case 6: /* fdiv */
|
|
clear_C1();
|
|
! FPU_div(LOADED|loaded_tag, &loaded_data, control_word);
|
|
break;
|
|
case 7: /* fdivr */
|
|
clear_C1();
|
|
if ( st0_tag == TAG_Zero )
|
|
partial_status = status1; /* Undo any denorm tag,
|
|
zero-divide has priority. */
|
|
! FPU_div(REV|LOADED|loaded_tag, &loaded_data, control_word);
|
|
break;
|
|
}
|
|
}
|
|
***************
|
|
*** 1001,1007 ****
|
|
to do this: */
|
|
operand_address.offset = 0;
|
|
operand_address.selector = FPU_DS;
|
|
! #endif PECULIAR_486
|
|
|
|
st0_ptr = &st(0);
|
|
st0_tag = FPU_gettag0();
|
|
--- 1007,1013 ----
|
|
to do this: */
|
|
operand_address.offset = 0;
|
|
operand_address.selector = FPU_DS;
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
st0_ptr = &st(0);
|
|
st0_tag = FPU_gettag0();
|
|
***************
|
|
*** 1059,1065 ****
|
|
|
|
#ifdef DEBUG
|
|
FPU_printall();
|
|
! #endif DEBUG
|
|
}
|
|
|
|
#endif /* #ifndef USE_WITH_CPU_SIM */
|
|
--- 1065,1074 ----
|
|
|
|
#ifdef DEBUG
|
|
FPU_printall();
|
|
! #endif /* DEBUG */
|
|
! #ifdef BX_NO_BLANK_LABELS
|
|
! if(0);
|
|
! #endif
|
|
}
|
|
|
|
#endif /* #ifndef USE_WITH_CPU_SIM */
|
|
diff -crN bochs-clean-2000-03-25/fpu/fpu_etc.c portable1/fpu/fpu_etc.c
|
|
*** bochs-clean-2000-03-25/fpu/fpu_etc.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/fpu_etc.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 68,74 ****
|
|
/* This is weird! */
|
|
if (getsign(st0_ptr) == SIGN_POS)
|
|
setcc(SW_C3);
|
|
! #endif PECULIAR_486
|
|
return;
|
|
}
|
|
break;
|
|
--- 68,74 ----
|
|
/* This is weird! */
|
|
if (getsign(st0_ptr) == SIGN_POS)
|
|
setcc(SW_C3);
|
|
! #endif /* PECULIAR_486 */
|
|
return;
|
|
}
|
|
break;
|
|
diff -crN bochs-clean-2000-03-25/fpu/fpu_proto.h portable1/fpu/fpu_proto.h
|
|
*** bochs-clean-2000-03-25/fpu/fpu_proto.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/fpu_proto.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 101,107 ****
|
|
extern void poly_tan(FPU_REG *st0_ptr, int flag);
|
|
/* reg_add_sub.c */
|
|
extern int FPU_add(FPU_REG const *b, u_char tagb, int destrnr, u16 control_w);
|
|
! extern int FPU_sub(int flags, int rm, u16 control_w);
|
|
/* reg_compare.c */
|
|
extern int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag);
|
|
extern void fcom_st(void);
|
|
--- 101,107 ----
|
|
extern void poly_tan(FPU_REG *st0_ptr, int flag);
|
|
/* reg_add_sub.c */
|
|
extern int FPU_add(FPU_REG const *b, u_char tagb, int destrnr, u16 control_w);
|
|
! extern int FPU_sub(int flags, FPU_REG *rm, u16 control_w); // bbd: changed arg2 from int to FPU_REG*
|
|
/* reg_compare.c */
|
|
extern int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag);
|
|
extern void fcom_st(void);
|
|
***************
|
|
*** 137,143 ****
|
|
/* reg_mul.c */
|
|
extern int FPU_mul(FPU_REG const *b, u_char tagb, int deststnr, int control_w);
|
|
|
|
! extern int FPU_div(int flags, int regrm, int control_w);
|
|
/* reg_convert.c */
|
|
extern int FPU_to_exp16(FPU_REG const *a, FPU_REG *x);
|
|
#endif /* _FPU_PROTO_H */
|
|
--- 137,143 ----
|
|
/* reg_mul.c */
|
|
extern int FPU_mul(FPU_REG const *b, u_char tagb, int deststnr, int control_w);
|
|
|
|
! extern int FPU_div(int flags, FPU_REG *regrm, int control_w); // bbd: changed arg2 from int to FPU_REG*
|
|
/* reg_convert.c */
|
|
extern int FPU_to_exp16(FPU_REG const *a, FPU_REG *x);
|
|
#endif /* _FPU_PROTO_H */
|
|
diff -crN bochs-clean-2000-03-25/fpu/fpu_system.h portable1/fpu/fpu_system.h
|
|
*** bochs-clean-2000-03-25/fpu/fpu_system.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/fpu_system.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 95,105 ****
|
|
* rather than a kernel (ported by Kevin Lawton)
|
|
* ------------------------------------------------------------ */
|
|
|
|
- #include <linux/kernel.h>
|
|
- #include <linux/mm.h>
|
|
- #include <asm/math_emu.h>
|
|
- #include <linux/types.h>
|
|
-
|
|
/* Get data sizes from config.h generated from simulator's
|
|
* configure script
|
|
*/
|
|
--- 95,100 ----
|
|
***************
|
|
*** 113,118 ****
|
|
--- 108,119 ----
|
|
typedef Bit64u u64;
|
|
typedef Bit64s s64;
|
|
|
|
+ /* bbd: include ported linux headers after config.h for GCC_ATTRIBUTE macro */
|
|
+ #include <linux/kernel.h>
|
|
+ #include <linux/mm.h>
|
|
+ #include <asm/math_emu.h>
|
|
+ #include <linux/types.h>
|
|
+
|
|
#ifndef WORDS_BIGENDIAN
|
|
#error "WORDS_BIGENDIAN not defined in config.h"
|
|
#elif WORDS_BIGENDIAN == 1
|
|
***************
|
|
*** 135,140 ****
|
|
--- 136,144 ----
|
|
#ifndef __ASSEMBLY__
|
|
|
|
struct info {
|
|
+ #ifdef BX_NO_EMPTY_STRUCTS
|
|
+ unsigned char donotindexme;
|
|
+ #endif
|
|
};
|
|
|
|
#define FPU_info ((struct info *) NULL)
|
|
***************
|
|
*** 159,165 ****
|
|
unsigned char no_update;
|
|
unsigned char rm;
|
|
unsigned char alimit;
|
|
! } __attribute__ ((aligned(16), packed)) soft;
|
|
} i387_t;
|
|
|
|
extern i387_t i387;
|
|
--- 163,169 ----
|
|
unsigned char no_update;
|
|
unsigned char rm;
|
|
unsigned char alimit;
|
|
! } GCC_ATTRIBUTE((aligned(16), packed)) soft;
|
|
} i387_t;
|
|
|
|
extern i387_t i387;
|
|
***************
|
|
*** 198,202 ****
|
|
--- 202,218 ----
|
|
#define FPU_DS (fpu_get_ds())
|
|
|
|
#endif /* USE_WITH_CPU_SIM */
|
|
+
|
|
+ // bbd: Change a pointer to an int, with type conversions that make it legal.
|
|
+ // First make it a void pointer, then convert to an integer of the same
|
|
+ // size as the pointer. Otherwise, on machines with 64-bit pointers,
|
|
+ // compilers complain when you typecast a 64-bit pointer into a 32-bit integer.
|
|
+ #define PTR2INT(x) ((bx_ptr_equiv_t)(void *)(x))
|
|
+
|
|
+ // bbd: Change an int to a pointer, with type conversions that make it legal.
|
|
+ // Same strategy as PTR2INT: change to bx_ptr_equiv_t which is an integer
|
|
+ // type of the same size as FPU_REG*. Then the conversion to pointer
|
|
+ // is legal.
|
|
+ #define REGNO2PTR(x) ((FPU_REG*)((bx_ptr_equiv_t)(x)))
|
|
|
|
#endif
|
|
diff -crN bochs-clean-2000-03-25/fpu/fpu_trig.c portable1/fpu/fpu_trig.c
|
|
*** bochs-clean-2000-03-25/fpu/fpu_trig.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/fpu_trig.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 75,81 ****
|
|
|
|
if ( ((flags & FCOS) && !(q & 1)) || (!(flags & FCOS) && (q & 1)) )
|
|
{
|
|
! st0_tag = FPU_sub(REV|LOADED|TAG_Valid, (int)&CONST_PI2, FULL_PRECISION);
|
|
|
|
#ifdef BETTER_THAN_486
|
|
/* So far, the results are exact but based upon a 64 bit
|
|
--- 75,81 ----
|
|
|
|
if ( ((flags & FCOS) && !(q & 1)) || (!(flags & FCOS) && (q & 1)) )
|
|
{
|
|
! st0_tag = FPU_sub(REV|LOADED|TAG_Valid, &CONST_PI2, FULL_PRECISION); //bbd: arg2 used to typecast to (int)
|
|
|
|
#ifdef BETTER_THAN_486
|
|
/* So far, the results are exact but based upon a 64 bit
|
|
***************
|
|
*** 109,115 ****
|
|
q++;
|
|
}
|
|
}
|
|
! #endif BETTER_THAN_486
|
|
}
|
|
#ifdef BETTER_THAN_486
|
|
else
|
|
--- 109,115 ----
|
|
q++;
|
|
}
|
|
}
|
|
! #endif /* BETTER_THAN_486 */
|
|
}
|
|
#ifdef BETTER_THAN_486
|
|
else
|
|
***************
|
|
*** 135,141 ****
|
|
SIGN_POS,
|
|
exponent(&CONST_PI2extra) + exponent(&tmp));
|
|
setsign(&tmp, getsign(&CONST_PI2extra));
|
|
! st0_tag = FPU_sub(LOADED|(tmptag & 0x0f), (int)&tmp,
|
|
FULL_PRECISION);
|
|
if ( (exponent(st0_ptr) == exponent(&CONST_PI2)) &&
|
|
((st0_ptr->sigh > CONST_PI2.sigh)
|
|
--- 135,141 ----
|
|
SIGN_POS,
|
|
exponent(&CONST_PI2extra) + exponent(&tmp));
|
|
setsign(&tmp, getsign(&CONST_PI2extra));
|
|
! st0_tag = FPU_sub(LOADED|(tmptag & 0x0f), &tmp,
|
|
FULL_PRECISION);
|
|
if ( (exponent(st0_ptr) == exponent(&CONST_PI2)) &&
|
|
((st0_ptr->sigh > CONST_PI2.sigh)
|
|
***************
|
|
*** 146,159 ****
|
|
subtraction can be larger than pi/2. This means
|
|
that the argument is actually in a different quadrant.
|
|
The correction is always < pi/2, so it can't overflow
|
|
! into yet another quadrant. */
|
|
! st0_tag = FPU_sub(REV|LOADED|TAG_Valid, (int)&CONST_PI2,
|
|
FULL_PRECISION);
|
|
q++;
|
|
}
|
|
}
|
|
}
|
|
! #endif BETTER_THAN_486
|
|
|
|
FPU_settag0(st0_tag);
|
|
control_word = old_cw;
|
|
--- 146,161 ----
|
|
subtraction can be larger than pi/2. This means
|
|
that the argument is actually in a different quadrant.
|
|
The correction is always < pi/2, so it can't overflow
|
|
! into yet another quadrant.
|
|
! bbd: arg2 used to typecast to (int), corrupting 64-bit ptrs
|
|
! */
|
|
! st0_tag = FPU_sub(REV|LOADED|TAG_Valid, &CONST_PI2,
|
|
FULL_PRECISION);
|
|
q++;
|
|
}
|
|
}
|
|
}
|
|
! #endif /* BETTER_THAN_486 */
|
|
|
|
FPU_settag0(st0_tag);
|
|
control_word = old_cw;
|
|
***************
|
|
*** 209,215 ****
|
|
#ifdef PARANOID
|
|
else
|
|
EXCEPTION(EX_INTERNAL|0x0112);
|
|
! #endif PARANOID
|
|
}
|
|
|
|
|
|
--- 211,217 ----
|
|
#ifdef PARANOID
|
|
else
|
|
EXCEPTION(EX_INTERNAL|0x0112);
|
|
! #endif /* PARANOID */
|
|
}
|
|
|
|
|
|
***************
|
|
*** 255,261 ****
|
|
#ifdef PARANOID
|
|
default:
|
|
EXCEPTION(EX_INTERNAL|0x0112);
|
|
! #endif PARANOID
|
|
}
|
|
}
|
|
|
|
--- 257,263 ----
|
|
#ifdef PARANOID
|
|
default:
|
|
EXCEPTION(EX_INTERNAL|0x0112);
|
|
! #endif /* PARANOID */
|
|
}
|
|
}
|
|
|
|
***************
|
|
*** 487,493 ****
|
|
#ifdef PARANOID
|
|
else
|
|
EXCEPTION(EX_INTERNAL | 0x119);
|
|
! #endif PARANOID
|
|
}
|
|
|
|
|
|
--- 489,495 ----
|
|
#ifdef PARANOID
|
|
else
|
|
EXCEPTION(EX_INTERNAL | 0x119);
|
|
! #endif /* PARANOID */
|
|
}
|
|
|
|
|
|
***************
|
|
*** 742,748 ****
|
|
set_precision_flag_down(); /* 80486 appears to do this. */
|
|
#else
|
|
set_precision_flag_up(); /* Must be up. */
|
|
! #endif PECULIAR_486
|
|
return 0;
|
|
}
|
|
}
|
|
--- 744,750 ----
|
|
set_precision_flag_down(); /* 80486 appears to do this. */
|
|
#else
|
|
set_precision_flag_up(); /* Must be up. */
|
|
! #endif /* PECULIAR_486 */
|
|
return 0;
|
|
}
|
|
}
|
|
***************
|
|
*** 1052,1058 ****
|
|
setcc(SW_C2);
|
|
#else
|
|
setcc(0);
|
|
! #endif PECULIAR_486
|
|
return;
|
|
}
|
|
cc = SW_C2;
|
|
--- 1054,1060 ----
|
|
setcc(SW_C2);
|
|
#else
|
|
setcc(0);
|
|
! #endif /* PECULIAR_486 */
|
|
return;
|
|
}
|
|
cc = SW_C2;
|
|
***************
|
|
*** 1158,1164 ****
|
|
#ifdef PARANOID
|
|
if ( (st0_tag != TW_NaN) && (st1_tag != TW_NaN) )
|
|
EXCEPTION(EX_INTERNAL | 0x118);
|
|
! #endif PARANOID
|
|
|
|
real_2op_NaN(st1_ptr, st1_tag, 0, st1_ptr);
|
|
|
|
--- 1160,1166 ----
|
|
#ifdef PARANOID
|
|
if ( (st0_tag != TW_NaN) && (st1_tag != TW_NaN) )
|
|
EXCEPTION(EX_INTERNAL | 0x118);
|
|
! #endif /* PARANOID */
|
|
|
|
real_2op_NaN(st1_ptr, st1_tag, 0, st1_ptr);
|
|
|
|
***************
|
|
*** 1359,1365 ****
|
|
sign = getsign(st1_ptr);
|
|
if ( FPU_divide_by_zero(1, sign) < 0 )
|
|
return;
|
|
! #endif PECULIAR_486
|
|
|
|
changesign(st1_ptr);
|
|
}
|
|
--- 1361,1367 ----
|
|
sign = getsign(st1_ptr);
|
|
if ( FPU_divide_by_zero(1, sign) < 0 )
|
|
return;
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
changesign(st1_ptr);
|
|
}
|
|
***************
|
|
*** 1495,1501 ****
|
|
#ifdef PARANOID
|
|
else
|
|
EXCEPTION(EX_INTERNAL | 0x125);
|
|
! #endif PARANOID
|
|
|
|
FPU_pop();
|
|
set_precision_flag_up(); /* We do not really know if up or down */
|
|
--- 1497,1503 ----
|
|
#ifdef PARANOID
|
|
else
|
|
EXCEPTION(EX_INTERNAL | 0x125);
|
|
! #endif /* PARANOID */
|
|
|
|
FPU_pop();
|
|
set_precision_flag_up(); /* We do not really know if up or down */
|
|
***************
|
|
*** 1586,1592 ****
|
|
#ifdef PARANOID
|
|
EXCEPTION(EX_INTERNAL | 0x116);
|
|
return;
|
|
! #endif PARANOID
|
|
}
|
|
}
|
|
else if ( (st0_tag == TAG_Valid) || (st0_tag == TW_Denormal) )
|
|
--- 1588,1594 ----
|
|
#ifdef PARANOID
|
|
EXCEPTION(EX_INTERNAL | 0x116);
|
|
return;
|
|
! #endif /* PARANOID */
|
|
}
|
|
}
|
|
else if ( (st0_tag == TAG_Valid) || (st0_tag == TW_Denormal) )
|
|
***************
|
|
*** 1604,1610 ****
|
|
#else
|
|
if ( arith_invalid(1) < 0 )
|
|
return;
|
|
! #endif PECULIAR_486
|
|
}
|
|
else if ( (st0_tag == TW_Denormal) && (denormal_operand() < 0) )
|
|
return;
|
|
--- 1606,1612 ----
|
|
#else
|
|
if ( arith_invalid(1) < 0 )
|
|
return;
|
|
! #endif /* PECULIAR_486 */
|
|
}
|
|
else if ( (st0_tag == TW_Denormal) && (denormal_operand() < 0) )
|
|
return;
|
|
***************
|
|
*** 1627,1633 ****
|
|
changesign(st1_ptr);
|
|
#else
|
|
if ( arith_invalid(1) < 0 ) return;
|
|
! #endif PECULIAR_486
|
|
}
|
|
else if ( (st0_tag == TW_Denormal) && (denormal_operand() < 0) )
|
|
return;
|
|
--- 1629,1635 ----
|
|
changesign(st1_ptr);
|
|
#else
|
|
if ( arith_invalid(1) < 0 ) return;
|
|
! #endif /* PECULIAR_486 */
|
|
}
|
|
else if ( (st0_tag == TW_Denormal) && (denormal_operand() < 0) )
|
|
return;
|
|
***************
|
|
*** 1662,1675 ****
|
|
/* This should have higher priority than denormals, but... */
|
|
if ( arith_invalid(1) < 0 ) /* log(-infinity) */
|
|
return;
|
|
! #endif PECULIAR_486
|
|
if ( (st1_tag == TW_Denormal) && (denormal_operand() < 0) )
|
|
return;
|
|
#ifdef PECULIAR_486
|
|
/* Denormal operands actually get higher priority */
|
|
if ( arith_invalid(1) < 0 ) /* log(-infinity) */
|
|
return;
|
|
! #endif PECULIAR_486
|
|
}
|
|
else if ( st1_tag == TAG_Zero )
|
|
{
|
|
--- 1664,1677 ----
|
|
/* This should have higher priority than denormals, but... */
|
|
if ( arith_invalid(1) < 0 ) /* log(-infinity) */
|
|
return;
|
|
! #endif /* PECULIAR_486 */
|
|
if ( (st1_tag == TW_Denormal) && (denormal_operand() < 0) )
|
|
return;
|
|
#ifdef PECULIAR_486
|
|
/* Denormal operands actually get higher priority */
|
|
if ( arith_invalid(1) < 0 ) /* log(-infinity) */
|
|
return;
|
|
! #endif /* PECULIAR_486 */
|
|
}
|
|
else if ( st1_tag == TAG_Zero )
|
|
{
|
|
***************
|
|
*** 1698,1704 ****
|
|
EXCEPTION(EX_INTERNAL | 0x117);
|
|
return;
|
|
}
|
|
! #endif PARANOID
|
|
|
|
FPU_pop();
|
|
return;
|
|
--- 1700,1706 ----
|
|
EXCEPTION(EX_INTERNAL | 0x117);
|
|
return;
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
FPU_pop();
|
|
return;
|
|
diff -crN bochs-clean-2000-03-25/fpu/get_address.c portable1/fpu/get_address.c
|
|
*** bochs-clean-2000-03-25/fpu/get_address.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/get_address.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 143,149 ****
|
|
EXCEPTION(EX_INTERNAL|0x130);
|
|
math_abort(FPU_info,SIGSEGV);
|
|
}
|
|
! #endif PARANOID
|
|
addr->selector = VM86_REG_(segment);
|
|
return (u32)VM86_REG_(segment) << 4;
|
|
}
|
|
--- 143,149 ----
|
|
EXCEPTION(EX_INTERNAL|0x130);
|
|
math_abort(FPU_info,SIGSEGV);
|
|
}
|
|
! #endif /* PARANOID */
|
|
addr->selector = VM86_REG_(segment);
|
|
return (u32)VM86_REG_(segment) << 4;
|
|
}
|
|
***************
|
|
*** 165,171 ****
|
|
EXCEPTION(EX_INTERNAL|0x132);
|
|
math_abort(FPU_info,SIGSEGV);
|
|
}
|
|
! #endif PARANOID
|
|
|
|
switch ( segment )
|
|
{
|
|
--- 165,171 ----
|
|
EXCEPTION(EX_INTERNAL|0x132);
|
|
math_abort(FPU_info,SIGSEGV);
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
switch ( segment )
|
|
{
|
|
diff -crN bochs-clean-2000-03-25/fpu/load_store.c portable1/fpu/load_store.c
|
|
*** bochs-clean-2000-03-25/fpu/load_store.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/load_store.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 85,91 ****
|
|
#ifdef PARANOID
|
|
else
|
|
EXCEPTION(EX_INTERNAL|0x140);
|
|
! #endif PARANOID
|
|
}
|
|
|
|
switch ( type_table[type] )
|
|
--- 85,91 ----
|
|
#ifdef PARANOID
|
|
else
|
|
EXCEPTION(EX_INTERNAL|0x140);
|
|
! #endif /* PARANOID */
|
|
}
|
|
|
|
switch ( type_table[type] )
|
|
***************
|
|
*** 112,118 ****
|
|
default:
|
|
EXCEPTION(EX_INTERNAL|0x141);
|
|
return 0;
|
|
! #endif PARANOID
|
|
}
|
|
|
|
switch ( type )
|
|
--- 112,118 ----
|
|
default:
|
|
EXCEPTION(EX_INTERNAL|0x141);
|
|
return 0;
|
|
! #endif /* PARANOID */
|
|
}
|
|
|
|
switch ( type )
|
|
***************
|
|
*** 217,223 ****
|
|
partial_status &= ~(SW_Summary | SW_Backward);
|
|
#ifdef PECULIAR_486
|
|
control_word |= 0x40; /* An 80486 appears to always set this bit */
|
|
! #endif PECULIAR_486
|
|
return 1;
|
|
case 025: /* fld m80real */
|
|
clear_C1();
|
|
--- 217,223 ----
|
|
partial_status &= ~(SW_Summary | SW_Backward);
|
|
#ifdef PECULIAR_486
|
|
control_word |= 0x40; /* An 80486 appears to always set this bit */
|
|
! #endif /* PECULIAR_486 */
|
|
return 1;
|
|
case 025: /* fld m80real */
|
|
clear_C1();
|
|
diff -crN bochs-clean-2000-03-25/fpu/poly.h portable1/fpu/poly.h
|
|
*** bochs-clean-2000-03-25/fpu/poly.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/poly.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 30,36 ****
|
|
u32 midw;
|
|
u32 msw;
|
|
#endif
|
|
! } __attribute__ ((packed)) Xsig;
|
|
|
|
asmlinkage void mul64(u64 const *a, u64 const *b,
|
|
u64 *result);
|
|
--- 30,36 ----
|
|
u32 midw;
|
|
u32 msw;
|
|
#endif
|
|
! } GCC_ATTRIBUTE((packed)) Xsig;
|
|
|
|
asmlinkage void mul64(u64 const *a, u64 const *b,
|
|
u64 *result);
|
|
***************
|
|
*** 74,81 ****
|
|
*/
|
|
|
|
/* Multiply two fixed-point 32 bit numbers, producing a 32 bit result.
|
|
! The answer is the ms word of the product. */
|
|
! extern inline u32 mul_32_32(const u32 arg1, const u32 arg2)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
return (((u64)arg1) * arg2) >> 32;
|
|
--- 74,87 ----
|
|
*/
|
|
|
|
/* Multiply two fixed-point 32 bit numbers, producing a 32 bit result.
|
|
! The answer is the ms word of the product.
|
|
!
|
|
! bbd: this and all other inline functions in this file used to be
|
|
! declared extern inline. But if the compiler does not inline the function,
|
|
! each .c declares its own external symbol for the function, leading to
|
|
! symbol conflicts. static inline seems to be safe in either case.
|
|
! */
|
|
! static inline u32 mul_32_32(const u32 arg1, const u32 arg2)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
return (((u64)arg1) * arg2) >> 32;
|
|
***************
|
|
*** 94,100 ****
|
|
|
|
|
|
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */
|
|
! extern inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
dest->lsw += x2->lsw;
|
|
--- 100,106 ----
|
|
|
|
|
|
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */
|
|
! static inline void add_Xsig_Xsig(Xsig *dest, const Xsig *x2)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
dest->lsw += x2->lsw;
|
|
***************
|
|
*** 122,128 ****
|
|
|
|
|
|
/* Add the 12 byte Xsig x2 to Xsig dest, adjust exp if overflow occurs. */
|
|
! extern inline void add_two_Xsig(Xsig *dest, const Xsig *x2, s32 *exp)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
int ovfl = 0;
|
|
--- 128,134 ----
|
|
|
|
|
|
/* Add the 12 byte Xsig x2 to Xsig dest, adjust exp if overflow occurs. */
|
|
! static inline void add_two_Xsig(Xsig *dest, const Xsig *x2, s32 *exp)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
int ovfl = 0;
|
|
***************
|
|
*** 182,188 ****
|
|
|
|
|
|
/* Negate the 12 byte Xsig */
|
|
! extern inline void negate_Xsig(Xsig *x)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
x->lsw = ~x->lsw;
|
|
--- 188,194 ----
|
|
|
|
|
|
/* Negate the 12 byte Xsig */
|
|
! static inline void negate_Xsig(Xsig *x)
|
|
{
|
|
#ifdef NO_ASSEMBLER
|
|
x->lsw = ~x->lsw;
|
|
***************
|
|
*** 208,211 ****
|
|
}
|
|
|
|
|
|
! #endif _POLY_H
|
|
--- 214,217 ----
|
|
}
|
|
|
|
|
|
! #endif /* _POLY_H */
|
|
diff -crN bochs-clean-2000-03-25/fpu/poly_2xm1.c portable1/fpu/poly_2xm1.c
|
|
*** bochs-clean-2000-03-25/fpu/poly_2xm1.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/poly_2xm1.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 67,73 ****
|
|
EXCEPTION(EX_INTERNAL|0x127);
|
|
return 1;
|
|
}
|
|
! #endif PARANOID
|
|
|
|
argSignif.lsw = 0;
|
|
XSIG_LL(argSignif) = Xll = significand(arg);
|
|
--- 67,73 ----
|
|
EXCEPTION(EX_INTERNAL|0x127);
|
|
return 1;
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
argSignif.lsw = 0;
|
|
XSIG_LL(argSignif) = Xll = significand(arg);
|
|
diff -crN bochs-clean-2000-03-25/fpu/poly_atan.c portable1/fpu/poly_atan.c
|
|
*** bochs-clean-2000-03-25/fpu/poly_atan.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/poly_atan.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 123,129 ****
|
|
EXCEPTION(EX_INTERNAL|0x104); /* There must be a logic error */
|
|
return;
|
|
}
|
|
! #endif PARANOID
|
|
argSignif.msw = 0; /* Make the transformed arg -> 0.0 */
|
|
}
|
|
else
|
|
--- 123,129 ----
|
|
EXCEPTION(EX_INTERNAL|0x104); /* There must be a logic error */
|
|
return;
|
|
}
|
|
! #endif /* PARANOID */
|
|
argSignif.msw = 0; /* Make the transformed arg -> 0.0 */
|
|
}
|
|
else
|
|
diff -crN bochs-clean-2000-03-25/fpu/poly_l2.c portable1/fpu/poly_l2.c
|
|
*** bochs-clean-2000-03-25/fpu/poly_l2.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/poly_l2.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 157,163 ****
|
|
#else
|
|
if ( arith_invalid(1) < 0 )
|
|
return 1;
|
|
! #endif PECULIAR_486
|
|
}
|
|
|
|
/* 80486 appears to do this */
|
|
--- 157,163 ----
|
|
#else
|
|
if ( arith_invalid(1) < 0 )
|
|
return 1;
|
|
! #endif /* PECULIAR_486 */
|
|
}
|
|
|
|
/* 80486 appears to do this */
|
|
***************
|
|
*** 243,249 ****
|
|
/* The argument is too large */
|
|
}
|
|
}
|
|
! #endif PECULIAR_486
|
|
|
|
arg_signif.lsw = argSignif.lsw; XSIG_LL(arg_signif) = XSIG_LL(argSignif);
|
|
adj = norm_Xsig(&argSignif);
|
|
--- 243,249 ----
|
|
/* The argument is too large */
|
|
}
|
|
}
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
arg_signif.lsw = argSignif.lsw; XSIG_LL(arg_signif) = XSIG_LL(argSignif);
|
|
adj = norm_Xsig(&argSignif);
|
|
diff -crN bochs-clean-2000-03-25/fpu/poly_sin.c portable1/fpu/poly_sin.c
|
|
*** bochs-clean-2000-03-25/fpu/poly_sin.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/poly_sin.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 199,205 ****
|
|
{
|
|
EXCEPTION(EX_INTERNAL|0x150);
|
|
}
|
|
! #endif PARANOID
|
|
|
|
}
|
|
|
|
--- 199,205 ----
|
|
{
|
|
EXCEPTION(EX_INTERNAL|0x150);
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
}
|
|
|
|
***************
|
|
*** 224,230 ****
|
|
FPU_copy_to_reg0(&CONST_QNaN, TAG_Special);
|
|
return;
|
|
}
|
|
! #endif PARANOID
|
|
|
|
exponent = exponent(st0_ptr);
|
|
|
|
--- 224,230 ----
|
|
FPU_copy_to_reg0(&CONST_QNaN, TAG_Special);
|
|
return;
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
exponent = exponent(st0_ptr);
|
|
|
|
***************
|
|
*** 392,397 ****
|
|
{
|
|
EXCEPTION(EX_INTERNAL|0x151);
|
|
}
|
|
! #endif PARANOID
|
|
|
|
}
|
|
--- 392,397 ----
|
|
{
|
|
EXCEPTION(EX_INTERNAL|0x151);
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
}
|
|
diff -crN bochs-clean-2000-03-25/fpu/poly_tan.c portable1/fpu/poly_tan.c
|
|
*** bochs-clean-2000-03-25/fpu/poly_tan.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/poly_tan.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 66,72 ****
|
|
#ifdef PARANOID
|
|
if ( signnegative(st0_ptr) ) /* Can't hack a number < 0.0 */
|
|
{ arith_invalid(0); return; } /* Need a positive number */
|
|
! #endif PARANOID
|
|
|
|
if ( (exponent >= 0)
|
|
|| ((exponent == -1) && (st0_ptr->sigh > 0xc90fdaa2)) )
|
|
--- 66,72 ----
|
|
#ifdef PARANOID
|
|
if ( signnegative(st0_ptr) ) /* Can't hack a number < 0.0 */
|
|
{ arith_invalid(0); return; } /* Need a positive number */
|
|
! #endif /* PARANOID */
|
|
|
|
if ( (exponent >= 0)
|
|
|| ((exponent == -1) && (st0_ptr->sigh > 0xc90fdaa2)) )
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_add_sub.c portable1/fpu/reg_add_sub.c
|
|
*** bochs-clean-2000-03-25/fpu/reg_add_sub.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_add_sub.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 134,141 ****
|
|
}
|
|
|
|
|
|
! /* Subtract b from a. (a-b) -> dest */
|
|
! int FPU_sub(int flags, int rm, u16 control_w)
|
|
{
|
|
FPU_REG const *a, *b;
|
|
FPU_REG *dest;
|
|
--- 134,146 ----
|
|
}
|
|
|
|
|
|
! /* Subtract b from a. (a-b) -> dest
|
|
! bbd: arg2 used to be int type, but sometimes pointers were forced
|
|
! in with typecasts. On Alphas pointers are 64 bits and ints are 32,
|
|
! so when rm was cast back to a pointer...SEGFAULT. Pass the pointers
|
|
! around instead, since they are always larger precision than the
|
|
! register numbers. */
|
|
! int FPU_sub(int flags, FPU_REG *rm, u16 control_w)
|
|
{
|
|
FPU_REG const *a, *b;
|
|
FPU_REG *dest;
|
|
***************
|
|
*** 148,163 ****
|
|
deststnr = 0;
|
|
if ( flags & LOADED )
|
|
{
|
|
! b = (FPU_REG *)rm;
|
|
tagb = flags & 0x0f;
|
|
}
|
|
else
|
|
{
|
|
! b = &st(rm);
|
|
! tagb = FPU_gettagi(rm);
|
|
|
|
if ( flags & DEST_RM )
|
|
! deststnr = rm;
|
|
}
|
|
|
|
signa = getsign(a);
|
|
--- 153,169 ----
|
|
deststnr = 0;
|
|
if ( flags & LOADED )
|
|
{
|
|
! b = rm;
|
|
tagb = flags & 0x0f;
|
|
}
|
|
else
|
|
{
|
|
! int rmint = (int)rm;
|
|
! b = &st(rmint);
|
|
! tagb = FPU_gettagi(rmint);
|
|
|
|
if ( flags & DEST_RM )
|
|
! deststnr = rmint;
|
|
}
|
|
|
|
signa = getsign(a);
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_compare.c portable1/fpu/reg_compare.c
|
|
*** bochs-clean-2000-03-25/fpu/reg_compare.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_compare.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 136,142 ****
|
|
#ifdef PARANOID
|
|
if (!(st0_ptr->sigh & 0x80000000)) EXCEPTION(EX_Invalid);
|
|
if (!(b->sigh & 0x80000000)) EXCEPTION(EX_Invalid);
|
|
! #endif PARANOID
|
|
|
|
diff = exp0 - expb;
|
|
if ( diff == 0 )
|
|
--- 136,142 ----
|
|
#ifdef PARANOID
|
|
if (!(st0_ptr->sigh & 0x80000000)) EXCEPTION(EX_Invalid);
|
|
if (!(b->sigh & 0x80000000)) EXCEPTION(EX_Invalid);
|
|
! #endif /* PARANOID */
|
|
|
|
diff = exp0 - expb;
|
|
if ( diff == 0 )
|
|
***************
|
|
*** 203,209 ****
|
|
EXCEPTION(EX_INTERNAL|0x121);
|
|
f = SW_C3 | SW_C2 | SW_C0;
|
|
break;
|
|
! #endif PARANOID
|
|
}
|
|
setcc(f);
|
|
if (c & COMP_Denormal)
|
|
--- 203,209 ----
|
|
EXCEPTION(EX_INTERNAL|0x121);
|
|
f = SW_C3 | SW_C2 | SW_C0;
|
|
break;
|
|
! #endif /* PARANOID */
|
|
}
|
|
setcc(f);
|
|
if (c & COMP_Denormal)
|
|
***************
|
|
*** 255,261 ****
|
|
EXCEPTION(EX_INTERNAL|0x122);
|
|
f = SW_C3 | SW_C2 | SW_C0;
|
|
break;
|
|
! #endif PARANOID
|
|
}
|
|
setcc(f);
|
|
if (c & COMP_Denormal)
|
|
--- 255,261 ----
|
|
EXCEPTION(EX_INTERNAL|0x122);
|
|
f = SW_C3 | SW_C2 | SW_C0;
|
|
break;
|
|
! #endif /* PARANOID */
|
|
}
|
|
setcc(f);
|
|
if (c & COMP_Denormal)
|
|
***************
|
|
*** 312,318 ****
|
|
EXCEPTION(EX_INTERNAL|0x123);
|
|
f = SW_C3 | SW_C2 | SW_C0;
|
|
break;
|
|
! #endif PARANOID
|
|
}
|
|
setcc(f);
|
|
if (c & COMP_Denormal)
|
|
--- 312,318 ----
|
|
EXCEPTION(EX_INTERNAL|0x123);
|
|
f = SW_C3 | SW_C2 | SW_C0;
|
|
break;
|
|
! #endif /* PARANOID */
|
|
}
|
|
setcc(f);
|
|
if (c & COMP_Denormal)
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_constant.c portable1/fpu/reg_constant.c
|
|
*** bochs-clean-2000-03-25/fpu/reg_constant.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_constant.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 24,30 ****
|
|
FPU_REG const CONST_L2T = MAKE_REG(POS, 1, 0xcd1b8afe, 0xd49a784b);
|
|
FPU_REG const CONST_L2E = MAKE_REG(POS, 0, 0x5c17f0bc, 0xb8aa3b29);
|
|
FPU_REG const CONST_PI = MAKE_REG(POS, 1, 0x2168c235, 0xc90fdaa2);
|
|
! FPU_REG const CONST_PI2 = MAKE_REG(POS, 0, 0x2168c235, 0xc90fdaa2);
|
|
FPU_REG const CONST_PI4 = MAKE_REG(POS, -1, 0x2168c235, 0xc90fdaa2);
|
|
FPU_REG const CONST_LG2 = MAKE_REG(POS, -2, 0xfbcff799, 0x9a209a84);
|
|
FPU_REG const CONST_LN2 = MAKE_REG(POS, -1, 0xd1cf79ac, 0xb17217f7);
|
|
--- 24,33 ----
|
|
FPU_REG const CONST_L2T = MAKE_REG(POS, 1, 0xcd1b8afe, 0xd49a784b);
|
|
FPU_REG const CONST_L2E = MAKE_REG(POS, 0, 0x5c17f0bc, 0xb8aa3b29);
|
|
FPU_REG const CONST_PI = MAKE_REG(POS, 1, 0x2168c235, 0xc90fdaa2);
|
|
! // bbd: make CONST_PI2 non-const so that you can write "&CONST_PI2" when
|
|
! // calling a function. Otherwise you get const warnings. Surely there's
|
|
! // a better way.
|
|
! FPU_REG CONST_PI2 = MAKE_REG(POS, 0, 0x2168c235, 0xc90fdaa2);
|
|
FPU_REG const CONST_PI4 = MAKE_REG(POS, -1, 0x2168c235, 0xc90fdaa2);
|
|
FPU_REG const CONST_LG2 = MAKE_REG(POS, -2, 0xfbcff799, 0x9a209a84);
|
|
FPU_REG const CONST_LN2 = MAKE_REG(POS, -1, 0xd1cf79ac, 0xb17217f7);
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_constant.h portable1/fpu/reg_constant.h
|
|
*** bochs-clean-2000-03-25/fpu/reg_constant.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_constant.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 17,23 ****
|
|
extern FPU_REG const CONST_L2T;
|
|
extern FPU_REG const CONST_L2E;
|
|
extern FPU_REG const CONST_PI;
|
|
! extern FPU_REG const CONST_PI2;
|
|
extern FPU_REG const CONST_PI2extra;
|
|
extern FPU_REG const CONST_PI4;
|
|
extern FPU_REG const CONST_LG2;
|
|
--- 17,26 ----
|
|
extern FPU_REG const CONST_L2T;
|
|
extern FPU_REG const CONST_L2E;
|
|
extern FPU_REG const CONST_PI;
|
|
! // bbd: make CONST_PI2 non-const so that you can write "&CONST_PI2" when
|
|
! // calling a function. Otherwise you get const warnings. Surely there's
|
|
! // a better way.
|
|
! extern FPU_REG CONST_PI2;
|
|
extern FPU_REG const CONST_PI2extra;
|
|
extern FPU_REG const CONST_PI4;
|
|
extern FPU_REG const CONST_LG2;
|
|
***************
|
|
*** 28,31 ****
|
|
extern FPU_REG const CONST_MINF;
|
|
extern FPU_REG const CONST_QNaN;
|
|
|
|
! #endif _REG_CONSTANT_H_
|
|
--- 31,34 ----
|
|
extern FPU_REG const CONST_MINF;
|
|
extern FPU_REG const CONST_QNaN;
|
|
|
|
! #endif /* _REG_CONSTANT_H_ */
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_divide.c portable1/fpu/reg_divide.c
|
|
*** bochs-clean-2000-03-25/fpu/reg_divide.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_divide.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 23,39 ****
|
|
|
|
/*
|
|
Divide one register by another and put the result into a third register.
|
|
*/
|
|
! int FPU_div(int flags, int rm, int control_w)
|
|
{
|
|
FPU_REG x, y;
|
|
FPU_REG const *a, *b, *st0_ptr, *st_ptr;
|
|
FPU_REG *dest;
|
|
u_char taga, tagb, signa, signb, sign, saved_sign;
|
|
int tag, deststnr;
|
|
|
|
if ( flags & DEST_RM )
|
|
! deststnr = rm;
|
|
else
|
|
deststnr = 0;
|
|
|
|
--- 23,41 ----
|
|
|
|
/*
|
|
Divide one register by another and put the result into a third register.
|
|
+ bbd: arg2 used to be an int, see comments on FPU_sub.
|
|
*/
|
|
! int FPU_div(int flags, FPU_REG *rm, int control_w)
|
|
{
|
|
FPU_REG x, y;
|
|
FPU_REG const *a, *b, *st0_ptr, *st_ptr;
|
|
FPU_REG *dest;
|
|
u_char taga, tagb, signa, signb, sign, saved_sign;
|
|
int tag, deststnr;
|
|
+ int rmint = (int)rm;
|
|
|
|
if ( flags & DEST_RM )
|
|
! deststnr = rmint;
|
|
else
|
|
deststnr = 0;
|
|
|
|
***************
|
|
*** 44,57 ****
|
|
tagb = FPU_gettag0();
|
|
if ( flags & LOADED )
|
|
{
|
|
! a = (FPU_REG *)rm;
|
|
taga = flags & 0x0f;
|
|
}
|
|
else
|
|
{
|
|
! a = &st(rm);
|
|
st_ptr = a;
|
|
! taga = FPU_gettagi(rm);
|
|
}
|
|
}
|
|
else
|
|
--- 46,59 ----
|
|
tagb = FPU_gettag0();
|
|
if ( flags & LOADED )
|
|
{
|
|
! a = rm;
|
|
taga = flags & 0x0f;
|
|
}
|
|
else
|
|
{
|
|
! a = &st(rmint);
|
|
st_ptr = a;
|
|
! taga = FPU_gettagi(rmint);
|
|
}
|
|
}
|
|
else
|
|
***************
|
|
*** 61,74 ****
|
|
taga = FPU_gettag0();
|
|
if ( flags & LOADED )
|
|
{
|
|
! b = (FPU_REG *)rm;
|
|
tagb = flags & 0x0f;
|
|
}
|
|
else
|
|
{
|
|
! b = &st(rm);
|
|
st_ptr = b;
|
|
! tagb = FPU_gettagi(rm);
|
|
}
|
|
}
|
|
|
|
--- 63,76 ----
|
|
taga = FPU_gettag0();
|
|
if ( flags & LOADED )
|
|
{
|
|
! b = rm;
|
|
tagb = flags & 0x0f;
|
|
}
|
|
else
|
|
{
|
|
! b = &st(rmint);
|
|
st_ptr = b;
|
|
! tagb = FPU_gettagi(rmint);
|
|
}
|
|
}
|
|
|
|
***************
|
|
*** 154,168 ****
|
|
tag = FPU_gettag0();
|
|
if ( tag == TAG_Special )
|
|
tag = FPU_Special(st0_ptr);
|
|
! return real_2op_NaN(st0_ptr, tag, rm, (flags & REV) ? st0_ptr : &st(rm));
|
|
}
|
|
else
|
|
{
|
|
int tag;
|
|
! tag = FPU_gettagi(rm);
|
|
if ( tag == TAG_Special )
|
|
! tag = FPU_Special(&st(rm));
|
|
! return real_2op_NaN(&st(rm), tag, 0, (flags & REV) ? st0_ptr : &st(rm));
|
|
}
|
|
}
|
|
else if (taga == TW_Infinity)
|
|
--- 156,170 ----
|
|
tag = FPU_gettag0();
|
|
if ( tag == TAG_Special )
|
|
tag = FPU_Special(st0_ptr);
|
|
! return real_2op_NaN(st0_ptr, tag, rmint, (flags & REV) ? st0_ptr : &st(rmint));
|
|
}
|
|
else
|
|
{
|
|
int tag;
|
|
! tag = FPU_gettagi(rmint);
|
|
if ( tag == TAG_Special )
|
|
! tag = FPU_Special(&st(rmint));
|
|
! return real_2op_NaN(&st(rmint), tag, 0, (flags & REV) ? st0_ptr : &st(rmint));
|
|
}
|
|
}
|
|
else if (taga == TW_Infinity)
|
|
***************
|
|
*** 201,206 ****
|
|
EXCEPTION(EX_INTERNAL|0x102);
|
|
return FPU_Exception;
|
|
}
|
|
! #endif PARANOID
|
|
|
|
}
|
|
--- 203,208 ----
|
|
EXCEPTION(EX_INTERNAL|0x102);
|
|
return FPU_Exception;
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
}
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_ld_str.c portable1/fpu/reg_ld_str.c
|
|
*** bochs-clean-2000-03-25/fpu/reg_ld_str.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_ld_str.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 455,461 ****
|
|
converts to decide underflow. */
|
|
if ( !((tmp.sigh == 0x00100000) && (tmp.sigl == 0) &&
|
|
(st0_ptr->sigl & 0x000007ff)) )
|
|
! #endif PECULIAR_486
|
|
{
|
|
EXCEPTION(EX_Underflow);
|
|
/* This is a special case: see sec 16.2.5.1 of
|
|
--- 455,461 ----
|
|
converts to decide underflow. */
|
|
if ( !((tmp.sigh == 0x00100000) && (tmp.sigl == 0) &&
|
|
(st0_ptr->sigl & 0x000007ff)) )
|
|
! #endif /* PECULIAR_486 */
|
|
{
|
|
EXCEPTION(EX_Underflow);
|
|
/* This is a special case: see sec 16.2.5.1 of
|
|
***************
|
|
*** 575,581 ****
|
|
/* Underflow has priority. */
|
|
if ( control_word & CW_Underflow )
|
|
denormal_operand();
|
|
! #endif PECULIAR_486
|
|
reg_copy(st0_ptr, &tmp);
|
|
goto denormal_arg;
|
|
}
|
|
--- 575,581 ----
|
|
/* Underflow has priority. */
|
|
if ( control_word & CW_Underflow )
|
|
denormal_operand();
|
|
! #endif /* PECULIAR_486 */
|
|
reg_copy(st0_ptr, &tmp);
|
|
goto denormal_arg;
|
|
}
|
|
***************
|
|
*** 675,681 ****
|
|
converts to decide underflow. */
|
|
if ( !((tmp.sigl == 0x00800000) &&
|
|
((st0_ptr->sigh & 0x000000ff) || st0_ptr->sigl)) )
|
|
! #endif PECULIAR_486
|
|
{
|
|
EXCEPTION(EX_Underflow);
|
|
/* This is a special case: see sec 16.2.5.1 of
|
|
--- 675,681 ----
|
|
converts to decide underflow. */
|
|
if ( !((tmp.sigl == 0x00800000) &&
|
|
((st0_ptr->sigh & 0x000000ff) || st0_ptr->sigl)) )
|
|
! #endif /* PECULIAR_486 */
|
|
{
|
|
EXCEPTION(EX_Underflow);
|
|
/* This is a special case: see sec 16.2.5.1 of
|
|
***************
|
|
*** 792,798 ****
|
|
/* Underflow has priority. */
|
|
if ( control_word & CW_Underflow )
|
|
denormal_operand();
|
|
! #endif PECULIAR_486
|
|
goto denormal_arg;
|
|
}
|
|
else if (st0_tag == TW_Infinity)
|
|
--- 792,798 ----
|
|
/* Underflow has priority. */
|
|
if ( control_word & CW_Underflow )
|
|
denormal_operand();
|
|
! #endif /* PECULIAR_486 */
|
|
goto denormal_arg;
|
|
}
|
|
else if (st0_tag == TW_Infinity)
|
|
***************
|
|
*** 1251,1257 ****
|
|
|
|
#ifdef PECULIAR_486
|
|
control_word &= ~0xe080;
|
|
! #endif PECULIAR_486
|
|
|
|
top = (partial_status >> SW_Top_Shift) & 7;
|
|
|
|
--- 1251,1257 ----
|
|
|
|
#ifdef PECULIAR_486
|
|
control_word &= ~0xe080;
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
top = (partial_status >> SW_Top_Shift) & 7;
|
|
|
|
***************
|
|
*** 1358,1364 ****
|
|
FPU_put_user(control_word & ~0xe080, (u32 *) d);
|
|
#else
|
|
FPU_put_user(control_word, (u16 *) d);
|
|
! #endif PECULIAR_486
|
|
FPU_put_user(status_word(), (u16 *) (d+2));
|
|
FPU_put_user(fpu_tag_word, (u16 *) (d+4));
|
|
FPU_put_user(instruction_address.offset, (u16 *) (d+6));
|
|
--- 1358,1364 ----
|
|
FPU_put_user(control_word & ~0xe080, (u32 *) d);
|
|
#else
|
|
FPU_put_user(control_word, (u16 *) d);
|
|
! #endif /* PECULIAR_486 */
|
|
FPU_put_user(status_word(), (u16 *) (d+2));
|
|
FPU_put_user(fpu_tag_word, (u16 *) (d+4));
|
|
FPU_put_user(instruction_address.offset, (u16 *) (d+6));
|
|
***************
|
|
*** 1390,1396 ****
|
|
fpu_tag_word |= 0xffff0000;
|
|
I387.soft.fcs &= ~0xf8000000;
|
|
I387.soft.fos |= 0xffff0000;
|
|
! #endif PECULIAR_486
|
|
#ifndef USE_WITH_CPU_SIM
|
|
__copy_to_user(d, &control_word, 7*4);
|
|
#else
|
|
--- 1390,1396 ----
|
|
fpu_tag_word |= 0xffff0000;
|
|
I387.soft.fcs &= ~0xf8000000;
|
|
I387.soft.fos |= 0xffff0000;
|
|
! #endif /* PECULIAR_486 */
|
|
#ifndef USE_WITH_CPU_SIM
|
|
__copy_to_user(d, &control_word, 7*4);
|
|
#else
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_mul.c portable1/fpu/reg_mul.c
|
|
*** bochs-clean-2000-03-25/fpu/reg_mul.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_mul.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 126,131 ****
|
|
EXCEPTION(EX_INTERNAL|0x102);
|
|
return FPU_Exception;
|
|
}
|
|
! #endif PARANOID
|
|
|
|
}
|
|
--- 126,131 ----
|
|
EXCEPTION(EX_INTERNAL|0x102);
|
|
return FPU_Exception;
|
|
}
|
|
! #endif /* PARANOID */
|
|
|
|
}
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_round.S portable1/fpu/reg_round.S
|
|
*** bochs-clean-2000-03-25/fpu/reg_round.S Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_round.S Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 100,106 ****
|
|
.byte 0
|
|
FPU_denormal:
|
|
.byte 0
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
|
|
.text
|
|
--- 100,106 ----
|
|
.byte 0
|
|
FPU_denormal:
|
|
.byte 0
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
|
|
.text
|
|
***************
|
|
*** 126,138 ****
|
|
|
|
#ifndef NON_REENTRANT_FPU
|
|
pushl %ebx /* adjust the stack pointer */
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
#ifdef PARANOID
|
|
/* Cannot use this here yet */
|
|
/* orl %eax,%eax */
|
|
/* jns L_entry_bugged */
|
|
! #endif PARANOID
|
|
|
|
cmpw EXP_UNDER,EXP(%edi)
|
|
jle L_Make_denorm /* The number is a de-normal */
|
|
--- 126,138 ----
|
|
|
|
#ifndef NON_REENTRANT_FPU
|
|
pushl %ebx /* adjust the stack pointer */
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
#ifdef PARANOID
|
|
/* Cannot use this here yet */
|
|
/* orl %eax,%eax */
|
|
/* jns L_entry_bugged */
|
|
! #endif /* PARANOID */
|
|
|
|
cmpw EXP_UNDER,EXP(%edi)
|
|
jle L_Make_denorm /* The number is a de-normal */
|
|
***************
|
|
*** 160,171 ****
|
|
je LRound_To_64
|
|
#ifdef PARANOID
|
|
jmp L_bugged_denorm_486
|
|
! #endif PARANOID
|
|
#else
|
|
#ifdef PARANOID
|
|
jmp L_bugged_denorm /* There is no bug, just a bad control word */
|
|
! #endif PARANOID
|
|
! #endif PECULIAR_486
|
|
|
|
|
|
/* Round etc to 24 bit precision */
|
|
--- 160,171 ----
|
|
je LRound_To_64
|
|
#ifdef PARANOID
|
|
jmp L_bugged_denorm_486
|
|
! #endif /* PARANOID */
|
|
#else
|
|
#ifdef PARANOID
|
|
jmp L_bugged_denorm /* There is no bug, just a bad control word */
|
|
! #endif /* PARANOID */
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
|
|
/* Round etc to 24 bit precision */
|
|
***************
|
|
*** 186,192 ****
|
|
|
|
#ifdef PARANOID
|
|
jmp L_bugged_round24
|
|
! #endif PARANOID
|
|
|
|
LUp_24:
|
|
cmpb SIGN_POS,PARAM5
|
|
--- 186,192 ----
|
|
|
|
#ifdef PARANOID
|
|
jmp L_bugged_round24
|
|
! #endif /* PARANOID */
|
|
|
|
LUp_24:
|
|
cmpb SIGN_POS,PARAM5
|
|
***************
|
|
*** 266,272 ****
|
|
|
|
#ifdef PARANOID
|
|
jmp L_bugged_round53
|
|
! #endif PARANOID
|
|
|
|
LUp_53:
|
|
cmpb SIGN_POS,PARAM5
|
|
--- 266,272 ----
|
|
|
|
#ifdef PARANOID
|
|
jmp L_bugged_round53
|
|
! #endif /* PARANOID */
|
|
|
|
LUp_53:
|
|
cmpb SIGN_POS,PARAM5
|
|
***************
|
|
*** 340,346 ****
|
|
|
|
#ifdef PARANOID
|
|
jmp L_bugged_round64
|
|
! #endif PARANOID
|
|
|
|
LUp_64:
|
|
cmpb SIGN_POS,PARAM5
|
|
--- 340,346 ----
|
|
|
|
#ifdef PARANOID
|
|
jmp L_bugged_round64
|
|
! #endif /* PARANOID */
|
|
|
|
LUp_64:
|
|
cmpb SIGN_POS,PARAM5
|
|
***************
|
|
*** 430,436 ****
|
|
|
|
#ifndef NON_REENTRANT_FPU
|
|
popl %ebx /* adjust the stack pointer */
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
fpu_Arith_exit:
|
|
popl %ebx
|
|
--- 430,436 ----
|
|
|
|
#ifndef NON_REENTRANT_FPU
|
|
popl %ebx /* adjust the stack pointer */
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
fpu_Arith_exit:
|
|
popl %ebx
|
|
***************
|
|
*** 570,576 ****
|
|
/* But check it... just in case. */
|
|
cmpw EXP_UNDER+1,EXP(%edi)
|
|
jne L_norm_bugged
|
|
! #endif PARANOID
|
|
|
|
#ifdef PECULIAR_486
|
|
/*
|
|
--- 570,576 ----
|
|
/* But check it... just in case. */
|
|
cmpw EXP_UNDER+1,EXP(%edi)
|
|
jne L_norm_bugged
|
|
! #endif /* PARANOID */
|
|
|
|
#ifdef PECULIAR_486
|
|
/*
|
|
***************
|
|
*** 586,592 ****
|
|
#else
|
|
orl %eax,%eax /* ms bits */
|
|
js L_Normalised /* No longer a denormal */
|
|
! #endif PECULIAR_486
|
|
|
|
jnz LDenormal_adj_exponent
|
|
|
|
--- 586,592 ----
|
|
#else
|
|
orl %eax,%eax /* ms bits */
|
|
js L_Normalised /* No longer a denormal */
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
jnz LDenormal_adj_exponent
|
|
|
|
***************
|
|
*** 674,680 ****
|
|
call EXCEPTION
|
|
popl %ebx
|
|
jmp L_exception_exit
|
|
! #endif PECULIAR_486
|
|
|
|
L_bugged_round24:
|
|
pushl EX_INTERNAL|0x231
|
|
--- 674,680 ----
|
|
call EXCEPTION
|
|
popl %ebx
|
|
jmp L_exception_exit
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
L_bugged_round24:
|
|
pushl EX_INTERNAL|0x231
|
|
***************
|
|
*** 707,710 ****
|
|
L_exception_exit:
|
|
mov $-1,%eax
|
|
jmp fpu_reg_round_special_exit
|
|
! #endif PARANOID
|
|
--- 707,710 ----
|
|
L_exception_exit:
|
|
mov $-1,%eax
|
|
jmp fpu_reg_round_special_exit
|
|
! #endif /* PARANOID */
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_u_add.S portable1/fpu/reg_u_add.S
|
|
*** bochs-clean-2000-03-25/fpu/reg_u_add.S Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_u_add.S Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 72,78 ****
|
|
|
|
testl $0x80000000,SIGH(%esi)
|
|
je L_bugged
|
|
! #endif PARANOID
|
|
|
|
/* The number to be shifted is in %eax:%ebx:%edx */
|
|
cmpw $32,%cx /* shrd only works for 0..31 bits */
|
|
--- 72,78 ----
|
|
|
|
testl $0x80000000,SIGH(%esi)
|
|
je L_bugged
|
|
! #endif /* PARANOID */
|
|
|
|
/* The number to be shifted is in %eax:%ebx:%edx */
|
|
cmpw $32,%cx /* shrd only works for 0..31 bits */
|
|
***************
|
|
*** 164,167 ****
|
|
popl %esi
|
|
leave
|
|
ret
|
|
! #endif PARANOID
|
|
--- 164,167 ----
|
|
popl %esi
|
|
leave
|
|
ret
|
|
! #endif /* PARANOID */
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_u_add.c portable1/fpu/reg_u_add.c
|
|
*** bochs-clean-2000-03-25/fpu/reg_u_add.c Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_u_add.c Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 32,38 ****
|
|
{
|
|
const FPU_REG *rtmp;
|
|
FPU_REG shifted;
|
|
! u32 extent;
|
|
int ediff = expa - expb, ed2, eflag, ovfl, carry;
|
|
|
|
if ( ediff < 0 )
|
|
--- 32,38 ----
|
|
{
|
|
const FPU_REG *rtmp;
|
|
FPU_REG shifted;
|
|
! u32 extent = 0;
|
|
int ediff = expa - expb, ed2, eflag, ovfl, carry;
|
|
|
|
if ( ediff < 0 )
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_u_div.S portable1/fpu/reg_u_div.S
|
|
*** bochs-clean-2000-03-25/fpu/reg_u_div.S Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_u_div.S Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 67,73 ****
|
|
.long 0
|
|
FPU_ovfl_flag:
|
|
.byte 0
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
#define REGA PARAM1
|
|
#define REGB PARAM2
|
|
--- 67,73 ----
|
|
.long 0
|
|
FPU_ovfl_flag:
|
|
.byte 0
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
#define REGA PARAM1
|
|
#define REGB PARAM2
|
|
***************
|
|
*** 79,85 ****
|
|
movl %esp,%ebp
|
|
#ifndef NON_REENTRANT_FPU
|
|
subl $28,%esp
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
pushl %esi
|
|
pushl %edi
|
|
--- 79,85 ----
|
|
movl %esp,%ebp
|
|
#ifndef NON_REENTRANT_FPU
|
|
subl $28,%esp
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
pushl %esi
|
|
pushl %edi
|
|
***************
|
|
*** 112,118 ****
|
|
/* je L_bugged */
|
|
testl $0x80000000, SIGH(%ebx) /* Divisor */
|
|
je L_bugged
|
|
! #endif PARANOID
|
|
|
|
/* Check if the divisor can be treated as having just 32 bits */
|
|
cmpl $0,SIGL(%ebx)
|
|
--- 112,118 ----
|
|
/* je L_bugged */
|
|
testl $0x80000000, SIGH(%ebx) /* Divisor */
|
|
je L_bugged
|
|
! #endif /* PARANOID */
|
|
|
|
/* Check if the divisor can be treated as having just 32 bits */
|
|
cmpl $0,SIGL(%ebx)
|
|
***************
|
|
*** 248,254 ****
|
|
|
|
#ifdef PARANOID
|
|
jb L_bugged_1
|
|
! #endif PARANOID
|
|
|
|
/* need to subtract another once of the denom */
|
|
incl FPU_result_2 /* Correct the answer */
|
|
--- 248,254 ----
|
|
|
|
#ifdef PARANOID
|
|
jb L_bugged_1
|
|
! #endif /* PARANOID */
|
|
|
|
/* need to subtract another once of the denom */
|
|
incl FPU_result_2 /* Correct the answer */
|
|
***************
|
|
*** 261,267 ****
|
|
#ifdef PARANOID
|
|
sbbl $0,FPU_accum_3
|
|
jne L_bugged_1 /* Must check for non-zero result here */
|
|
! #endif PARANOID
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
/* Half of the main problem is done, there is just a reduced numerator
|
|
--- 261,267 ----
|
|
#ifdef PARANOID
|
|
sbbl $0,FPU_accum_3
|
|
jne L_bugged_1 /* Must check for non-zero result here */
|
|
! #endif /* PARANOID */
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
/* Half of the main problem is done, there is just a reduced numerator
|
|
***************
|
|
*** 291,297 ****
|
|
|
|
#ifdef PARANOID
|
|
je L_bugged_2 /* Can't bump the result to 1.0 */
|
|
! #endif PARANOID
|
|
|
|
LDo_2nd_div:
|
|
cmpl $0,%ecx /* augmented denom msw */
|
|
--- 291,297 ----
|
|
|
|
#ifdef PARANOID
|
|
je L_bugged_2 /* Can't bump the result to 1.0 */
|
|
! #endif /* PARANOID */
|
|
|
|
LDo_2nd_div:
|
|
cmpl $0,%ecx /* augmented denom msw */
|
|
***************
|
|
*** 314,320 ****
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
movl FPU_result_1,%eax /* Get the result back */
|
|
mull SIGL(%ebx) /* now mul the ls dw of the denom */
|
|
--- 314,320 ----
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
movl FPU_result_1,%eax /* Get the result back */
|
|
mull SIGL(%ebx) /* now mul the ls dw of the denom */
|
|
***************
|
|
*** 325,338 ****
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
jz LDo_3rd_32_bits
|
|
|
|
#ifdef PARANOID
|
|
cmpl $1,FPU_accum_2
|
|
jne L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
/* need to subtract another once of the denom */
|
|
movl SIGL(%ebx),%eax
|
|
--- 325,338 ----
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
jz LDo_3rd_32_bits
|
|
|
|
#ifdef PARANOID
|
|
cmpl $1,FPU_accum_2
|
|
jne L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
/* need to subtract another once of the denom */
|
|
movl SIGL(%ebx),%eax
|
|
***************
|
|
*** 344,357 ****
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
jne L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
addl $1,FPU_result_1 /* Correct the answer */
|
|
adcl $0,FPU_result_2
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2 /* Must check for non-zero result here */
|
|
! #endif PARANOID
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
/* The division is essentially finished here, we just need to perform
|
|
--- 344,357 ----
|
|
#ifdef PARANOID
|
|
jc L_bugged_2
|
|
jne L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
addl $1,FPU_result_1 /* Correct the answer */
|
|
adcl $0,FPU_result_2
|
|
|
|
#ifdef PARANOID
|
|
jc L_bugged_2 /* Must check for non-zero result here */
|
|
! #endif /* PARANOID */
|
|
|
|
/*----------------------------------------------------------------------*/
|
|
/* The division is essentially finished here, we just need to perform
|
|
***************
|
|
*** 470,473 ****
|
|
|
|
leave
|
|
ret
|
|
! #endif PARANOID
|
|
--- 470,473 ----
|
|
|
|
leave
|
|
ret
|
|
! #endif /* PARANOID */
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_u_mul.S portable1/fpu/reg_u_mul.S
|
|
*** bochs-clean-2000-03-25/fpu/reg_u_mul.S Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_u_mul.S Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 40,46 ****
|
|
.long 0
|
|
FPU_accum_1:
|
|
.long 0
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
|
|
.text
|
|
--- 40,46 ----
|
|
.long 0
|
|
FPU_accum_1:
|
|
.long 0
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
|
|
.text
|
|
***************
|
|
*** 49,55 ****
|
|
movl %esp,%ebp
|
|
#ifndef NON_REENTRANT_FPU
|
|
subl $8,%esp
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
pushl %esi
|
|
pushl %edi
|
|
--- 49,55 ----
|
|
movl %esp,%ebp
|
|
#ifndef NON_REENTRANT_FPU
|
|
subl $8,%esp
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
pushl %esi
|
|
pushl %edi
|
|
***************
|
|
*** 63,69 ****
|
|
jz L_bugged
|
|
testl $0x80000000,SIGH(%edi)
|
|
jz L_bugged
|
|
! #endif PARANOID
|
|
|
|
xorl %ecx,%ecx
|
|
xorl %ebx,%ebx
|
|
--- 63,69 ----
|
|
jz L_bugged
|
|
testl $0x80000000,SIGH(%edi)
|
|
jz L_bugged
|
|
! #endif /* PARANOID */
|
|
|
|
xorl %ecx,%ecx
|
|
xorl %ebx,%ebx
|
|
***************
|
|
*** 144,148 ****
|
|
popl %esi
|
|
leave
|
|
ret
|
|
! #endif PARANOID
|
|
|
|
--- 144,148 ----
|
|
popl %esi
|
|
leave
|
|
ret
|
|
! #endif /* PARANOID */
|
|
|
|
diff -crN bochs-clean-2000-03-25/fpu/reg_u_sub.S portable1/fpu/reg_u_sub.S
|
|
*** bochs-clean-2000-03-25/fpu/reg_u_sub.S Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/reg_u_sub.S Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 54,60 ****
|
|
|
|
testl $0x80000000,SIGH(%esi)
|
|
je L_bugged_2
|
|
! #endif PARANOID
|
|
|
|
/*--------------------------------------+
|
|
| Form a register holding the |
|
|
--- 54,60 ----
|
|
|
|
testl $0x80000000,SIGH(%esi)
|
|
je L_bugged_2
|
|
! #endif /* PARANOID */
|
|
|
|
/*--------------------------------------+
|
|
| Form a register holding the |
|
|
***************
|
|
*** 165,171 ****
|
|
#ifdef PARANOID
|
|
/* We can never get a borrow */
|
|
jc L_bugged
|
|
! #endif PARANOID
|
|
|
|
/*--------------------------------------+
|
|
| Normalize the result |
|
|
--- 165,171 ----
|
|
#ifdef PARANOID
|
|
/* We can never get a borrow */
|
|
jc L_bugged
|
|
! #endif /* PARANOID */
|
|
|
|
/*--------------------------------------+
|
|
| Normalize the result |
|
|
***************
|
|
*** 199,205 ****
|
|
#ifdef PARANOID
|
|
orl %edx,%edx
|
|
jnz L_bugged_3
|
|
! #endif PARANOID
|
|
|
|
/* The result is zero */
|
|
movw $0,EXP(%edi) /* exponent */
|
|
--- 199,205 ----
|
|
#ifdef PARANOID
|
|
orl %edx,%edx
|
|
jnz L_bugged_3
|
|
! #endif /* PARANOID */
|
|
|
|
/* The result is zero */
|
|
movw $0,EXP(%edi) /* exponent */
|
|
***************
|
|
*** 262,268 ****
|
|
L_error_exit:
|
|
movl $-1,%eax
|
|
|
|
! #endif PARANOID
|
|
|
|
L_exit:
|
|
popl %ebx
|
|
--- 262,268 ----
|
|
L_error_exit:
|
|
movl $-1,%eax
|
|
|
|
! #endif /* PARANOID */
|
|
|
|
L_exit:
|
|
popl %ebx
|
|
diff -crN bochs-clean-2000-03-25/fpu/status_w.h portable1/fpu/status_w.h
|
|
*** bochs-clean-2000-03-25/fpu/status_w.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/status_w.h Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 48,56 ****
|
|
|
|
#define status_word() \
|
|
((partial_status & ~SW_Top & 0xffff) | ((top << SW_Top_Shift) & SW_Top))
|
|
! #define setcc(cc) ({ \
|
|
partial_status &= ~(SW_C0|SW_C1|SW_C2|SW_C3); \
|
|
! partial_status |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3); })
|
|
|
|
#ifdef PECULIAR_486
|
|
/* Default, this conveys no information, but an 80486 does it. */
|
|
--- 48,58 ----
|
|
|
|
#define status_word() \
|
|
((partial_status & ~SW_Top & 0xffff) | ((top << SW_Top_Shift) & SW_Top))
|
|
! // bbd: use do {...} while (0) structure instead of using curly brackets
|
|
! // inside parens, which most compilers do not like.
|
|
! #define setcc(cc) do { \
|
|
partial_status &= ~(SW_C0|SW_C1|SW_C2|SW_C3); \
|
|
! partial_status |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3); } while(0)
|
|
|
|
#ifdef PECULIAR_486
|
|
/* Default, this conveys no information, but an 80486 does it. */
|
|
***************
|
|
*** 58,65 ****
|
|
# define clear_C1() { partial_status &= ~SW_C1; }
|
|
# else
|
|
# define clear_C1()
|
|
! #endif PECULIAR_486
|
|
|
|
! #endif __ASSEMBLY__
|
|
|
|
! #endif _STATUS_H_
|
|
--- 60,67 ----
|
|
# define clear_C1() { partial_status &= ~SW_C1; }
|
|
# else
|
|
# define clear_C1()
|
|
! #endif /* PECULIAR_486 */
|
|
|
|
! #endif /* __ASSEMBLY__ */
|
|
|
|
! #endif /* _STATUS_H_ */
|
|
diff -crN bochs-clean-2000-03-25/fpu/stubs/asm/desc.h portable1/fpu/stubs/asm/desc.h
|
|
*** bochs-clean-2000-03-25/fpu/stubs/asm/desc.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/stubs/asm/desc.h Tue Apr 3 17:24:58 2001
|
|
***************
|
|
*** 10,16 ****
|
|
|
|
struct Xgt_desc_struct {
|
|
unsigned short size;
|
|
! unsigned long address __attribute__((packed));
|
|
};
|
|
|
|
#define idt_descr (*(struct Xgt_desc_struct *)((char *)&idt - 2))
|
|
--- 10,16 ----
|
|
|
|
struct Xgt_desc_struct {
|
|
unsigned short size;
|
|
! unsigned long address GCC_ATTRIBUTE((packed));
|
|
};
|
|
|
|
#define idt_descr (*(struct Xgt_desc_struct *)((char *)&idt - 2))
|
|
diff -crN bochs-clean-2000-03-25/fpu/stubs/asm/sigcontext.h portable1/fpu/stubs/asm/sigcontext.h
|
|
*** bochs-clean-2000-03-25/fpu/stubs/asm/sigcontext.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/stubs/asm/sigcontext.h Tue Apr 3 17:24:58 2001
|
|
***************
|
|
*** 26,31 ****
|
|
--- 26,34 ----
|
|
unsigned long status;
|
|
};
|
|
|
|
+ #if 0
|
|
+ /* sigcontext is not needed by bochs, and it conflicts with some other
|
|
+ machine types (DEC OSF1) */
|
|
struct sigcontext {
|
|
unsigned short gs, __gsh;
|
|
unsigned short fs, __fsh;
|
|
***************
|
|
*** 50,55 ****
|
|
--- 53,59 ----
|
|
unsigned long oldmask;
|
|
unsigned long cr2;
|
|
};
|
|
+ #endif
|
|
|
|
|
|
#endif
|
|
diff -crN bochs-clean-2000-03-25/fpu/stubs/linux/kernel.h portable1/fpu/stubs/linux/kernel.h
|
|
*** bochs-clean-2000-03-25/fpu/stubs/linux/kernel.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/stubs/linux/kernel.h Tue Apr 3 17:25:00 2001
|
|
***************
|
|
*** 2,7 ****
|
|
#define _LINUX_KERNEL_H
|
|
|
|
int printk(const char * fmt, ...)
|
|
! __attribute__ ((format (printf, 1, 2)));
|
|
|
|
#endif
|
|
--- 2,7 ----
|
|
#define _LINUX_KERNEL_H
|
|
|
|
int printk(const char * fmt, ...)
|
|
! GCC_ATTRIBUTE((format (printf, 1, 2)));
|
|
|
|
#endif
|
|
diff -crN bochs-clean-2000-03-25/fpu/stubs/linux/linkage.h portable1/fpu/stubs/linux/linkage.h
|
|
*** bochs-clean-2000-03-25/fpu/stubs/linux/linkage.h Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/stubs/linux/linkage.h Tue Apr 3 17:25:00 2001
|
|
***************
|
|
*** 8,14 ****
|
|
#endif
|
|
|
|
#if defined __i386__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 7)
|
|
! #define asmlinkage CPP_ASMLINKAGE __attribute__((regparm(0)))
|
|
#else
|
|
#define asmlinkage CPP_ASMLINKAGE
|
|
#endif
|
|
--- 8,14 ----
|
|
#endif
|
|
|
|
#if defined __i386__ && (__GNUC__ > 2 || __GNUC_MINOR__ > 7)
|
|
! #define asmlinkage CPP_ASMLINKAGE GCC_ATTRIBUTE((regparm(0)))
|
|
#else
|
|
#define asmlinkage CPP_ASMLINKAGE
|
|
#endif
|
|
diff -crN bochs-clean-2000-03-25/fpu/wmFPUemu_glue.cc portable1/fpu/wmFPUemu_glue.cc
|
|
*** bochs-clean-2000-03-25/fpu/wmFPUemu_glue.cc Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/wmFPUemu_glue.cc Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 143,154 ****
|
|
seg = &BX_CPU_THIS_PTR sregs[fpu_iptr->seg];
|
|
|
|
if (what == VERIFY_READ) {
|
|
! BX_CPU.read_virtual_checks(seg, (Bit32u) ptr, n);
|
|
}
|
|
else { // VERIFY_WRITE
|
|
! BX_CPU.write_virtual_checks(seg, (Bit32u) ptr, n);
|
|
}
|
|
! //fprintf(stderr, "verify_area: 0x%x\n", (Bit32u) ptr);
|
|
}
|
|
|
|
|
|
--- 143,154 ----
|
|
seg = &BX_CPU_THIS_PTR sregs[fpu_iptr->seg];
|
|
|
|
if (what == VERIFY_READ) {
|
|
! BX_CPU.read_virtual_checks(seg, PTR2INT(ptr), n);
|
|
}
|
|
else { // VERIFY_WRITE
|
|
! BX_CPU.write_virtual_checks(seg, PTR2INT(ptr), n);
|
|
}
|
|
! //fprintf(stderr, "verify_area: 0x%x\n", PTR2INT(ptr));
|
|
}
|
|
|
|
|
|
***************
|
|
*** 168,182 ****
|
|
|
|
switch (len) {
|
|
case 1:
|
|
! BX_CPU.read_virtual_byte(fpu_iptr->seg, (Bit32u) ptr, &val8);
|
|
val32 = val8;
|
|
break;
|
|
case 2:
|
|
! BX_CPU.read_virtual_word(fpu_iptr->seg, (Bit32u) ptr, &val16);
|
|
val32 = val16;
|
|
break;
|
|
case 4:
|
|
! BX_CPU.read_virtual_dword(fpu_iptr->seg, (Bit32u) ptr, &val32);
|
|
break;
|
|
default:
|
|
bx_panic("fpu_get_user: len=%u\n", len);
|
|
--- 168,182 ----
|
|
|
|
switch (len) {
|
|
case 1:
|
|
! BX_CPU.read_virtual_byte(fpu_iptr->seg, PTR2INT(ptr), &val8);
|
|
val32 = val8;
|
|
break;
|
|
case 2:
|
|
! BX_CPU.read_virtual_word(fpu_iptr->seg, PTR2INT(ptr), &val16);
|
|
val32 = val16;
|
|
break;
|
|
case 4:
|
|
! BX_CPU.read_virtual_dword(fpu_iptr->seg, PTR2INT(ptr), &val32);
|
|
break;
|
|
default:
|
|
bx_panic("fpu_get_user: len=%u\n", len);
|
|
***************
|
|
*** 194,208 ****
|
|
switch (len) {
|
|
case 1:
|
|
val8 = val;
|
|
! BX_CPU.write_virtual_byte(fpu_iptr->seg, (Bit32u) ptr, &val8);
|
|
break;
|
|
case 2:
|
|
val16 = val;
|
|
! BX_CPU.write_virtual_word(fpu_iptr->seg, (Bit32u) ptr, &val16);
|
|
break;
|
|
case 4:
|
|
val32 = val;
|
|
! BX_CPU.write_virtual_dword(fpu_iptr->seg, (Bit32u) ptr, &val32);
|
|
break;
|
|
default:
|
|
bx_panic("fpu_put_user: len=%u\n", len);
|
|
--- 194,208 ----
|
|
switch (len) {
|
|
case 1:
|
|
val8 = val;
|
|
! BX_CPU.write_virtual_byte(fpu_iptr->seg, PTR2INT(ptr), &val8);
|
|
break;
|
|
case 2:
|
|
val16 = val;
|
|
! BX_CPU.write_virtual_word(fpu_iptr->seg, PTR2INT(ptr), &val16);
|
|
break;
|
|
case 4:
|
|
val32 = val;
|
|
! BX_CPU.write_virtual_dword(fpu_iptr->seg, PTR2INT(ptr), &val32);
|
|
break;
|
|
default:
|
|
bx_panic("fpu_put_user: len=%u\n", len);
|
|
diff -crN bochs-clean-2000-03-25/fpu/wm_sqrt.S portable1/fpu/wm_sqrt.S
|
|
*** bochs-clean-2000-03-25/fpu/wm_sqrt.S Tue Apr 3 15:19:42 2001
|
|
--- portable1/fpu/wm_sqrt.S Tue Apr 3 17:24:57 2001
|
|
***************
|
|
*** 70,76 ****
|
|
.long 0
|
|
FPU_fsqrt_arg_0:
|
|
.long 0 /* ls word, at most the ms bit is set */
|
|
! #endif NON_REENTRANT_FPU
|
|
|
|
|
|
.text
|
|
--- 70,76 ----
|
|
.long 0
|
|
FPU_fsqrt_arg_0:
|
|
.long 0 /* ls word, at most the ms bit is set */
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
|
|
|
|
.text
|
|
***************
|
|
*** 79,85 ****
|
|
movl %esp,%ebp
|
|
#ifndef NON_REENTRANT_FPU
|
|
subl $28,%esp
|
|
! #endif NON_REENTRANT_FPU
|
|
pushl %esi
|
|
pushl %edi
|
|
pushl %ebx
|
|
--- 79,85 ----
|
|
movl %esp,%ebp
|
|
#ifndef NON_REENTRANT_FPU
|
|
subl $28,%esp
|
|
! #endif /* NON_REENTRANT_FPU */
|
|
pushl %esi
|
|
pushl %edi
|
|
pushl %ebx
|
|
***************
|
|
*** 210,216 ****
|
|
/* It should be possible to get here only if the arg is ffff....ffff */
|
|
cmp $0xffffffff,FPU_fsqrt_arg_1
|
|
jnz sqrt_stage_2_error
|
|
! #endif PARANOID
|
|
|
|
/* The best rounded result. */
|
|
xorl %eax,%eax
|
|
--- 210,216 ----
|
|
/* It should be possible to get here only if the arg is ffff....ffff */
|
|
cmp $0xffffffff,FPU_fsqrt_arg_1
|
|
jnz sqrt_stage_2_error
|
|
! #endif /* PARANOID */
|
|
|
|
/* The best rounded result. */
|
|
xorl %eax,%eax
|
|
***************
|
|
*** 224,230 ****
|
|
sqrt_stage_2_error:
|
|
pushl EX_INTERNAL|0x213
|
|
call EXCEPTION
|
|
! #endif PARANOID
|
|
|
|
sqrt_stage_2_done:
|
|
|
|
--- 224,230 ----
|
|
sqrt_stage_2_error:
|
|
pushl EX_INTERNAL|0x213
|
|
call EXCEPTION
|
|
! #endif /* PARANOID */
|
|
|
|
sqrt_stage_2_done:
|
|
|
|
***************
|
|
*** 279,285 ****
|
|
call EXCEPTION
|
|
|
|
sqrt_stage_3_no_error:
|
|
! #endif PARANOID
|
|
|
|
movl FPU_accum_2,%edx
|
|
movl FPU_accum_1,%eax
|
|
--- 279,285 ----
|
|
call EXCEPTION
|
|
|
|
sqrt_stage_3_no_error:
|
|
! #endif /* PARANOID */
|
|
|
|
movl FPU_accum_2,%edx
|
|
movl FPU_accum_1,%eax
|
|
***************
|
|
*** 385,391 ****
|
|
call EXCEPTION
|
|
|
|
sqrt_near_exact_ok:
|
|
! #endif PARANOID
|
|
|
|
or %ebx,%ebx
|
|
js sqrt_near_exact_small
|
|
--- 385,391 ----
|
|
call EXCEPTION
|
|
|
|
sqrt_near_exact_ok:
|
|
! #endif /* PARANOID */
|
|
|
|
or %ebx,%ebx
|
|
js sqrt_near_exact_small
|
|
***************
|
|
*** 445,451 ****
|
|
call EXCEPTION
|
|
|
|
sqrt_more_prec_ok:
|
|
! #endif PARANOID
|
|
|
|
or %ebx,%ebx
|
|
js sqrt_more_prec_small
|
|
--- 445,451 ----
|
|
call EXCEPTION
|
|
|
|
sqrt_more_prec_ok:
|
|
! #endif /* PARANOID */
|
|
|
|
or %ebx,%ebx
|
|
js sqrt_more_prec_small
|
|
diff -crN bochs-clean-2000-03-25/gui/nogui.cc portable1/gui/nogui.cc
|
|
*** bochs-clean-2000-03-25/gui/nogui.cc Tue Apr 3 15:19:42 2001
|
|
--- portable1/gui/nogui.cc Tue Apr 3 17:52:59 2001
|
|
***************
|
|
*** 129,135 ****
|
|
|
|
void
|
|
bx_gui_c::text_update(Bit8u *old_text, Bit8u *new_text,
|
|
! unsigned long cursor_x, unsigned long cursor_y
|
|
unsigned nrows)
|
|
{
|
|
UNUSED(old_text);
|
|
--- 129,135 ----
|
|
|
|
void
|
|
bx_gui_c::text_update(Bit8u *old_text, Bit8u *new_text,
|
|
! unsigned long cursor_x, unsigned long cursor_y,
|
|
unsigned nrows)
|
|
{
|
|
UNUSED(old_text);
|
|
diff -crN bochs-clean-2000-03-25/osdep.h portable1/osdep.h
|
|
*** bochs-clean-2000-03-25/osdep.h Wed Dec 31 19:00:00 1969
|
|
--- portable1/osdep.h Tue Apr 3 18:47:14 2001
|
|
***************
|
|
*** 0 ****
|
|
--- 1,44 ----
|
|
+ //
|
|
+ // osdep.h
|
|
+ //
|
|
+ // Operating system dependent includes and defines for Bochs. This file
|
|
+ // can be included by C or C++., but it requires definition of size_t
|
|
+ // beforehand. This makes it difficult to place into either config.h or
|
|
+ // bochs.h. If in config.h, size_t is not always available yet. If in
|
|
+ // bochs.h, it can't be included by C programs so they lose.
|
|
+ //
|
|
+
|
|
+ #ifndef BX_OSDEP_H
|
|
+ #define BX_OSDEP_H
|
|
+
|
|
+ // This code recognizes the following preprocessor symbols for different
|
|
+ // operating systems:
|
|
+ // macintosh
|
|
+ // WIN32
|
|
+
|
|
+ #ifdef __cplusplus
|
|
+ extern "C" {
|
|
+ #endif /* __cplusplus */
|
|
+
|
|
+
|
|
+
|
|
+ #if BX_HAVE_SNPRINTF
|
|
+ #define bx_snprintf snprintf
|
|
+ #else
|
|
+ extern int bx_snprintf (char *s, size_t maxlen, const char *format, ...);
|
|
+ #endif
|
|
+
|
|
+
|
|
+ #if BX_HAVE_STRTOULL
|
|
+ #define bx_strtoull strtoull
|
|
+ #else
|
|
+ extern unsigned long long bx_strtoull (const char *nptr, char **endptr, int baseignore);
|
|
+ #endif
|
|
+
|
|
+
|
|
+
|
|
+ #ifdef __cplusplus
|
|
+ }
|
|
+ #endif /* __cplusplus */
|
|
+
|
|
+ #endif /* ifdef BX_OSDEP_H */
|
|
diff -crN bochs-clean-2000-03-25/snprintf.cc portable1/snprintf.cc
|
|
*** bochs-clean-2000-03-25/snprintf.cc Wed Dec 31 19:00:00 1969
|
|
--- portable1/snprintf.cc Tue Apr 3 17:32:10 2001
|
|
***************
|
|
*** 0 ****
|
|
--- 1,25 ----
|
|
+ //
|
|
+ // snprintf.cc
|
|
+ //
|
|
+ // Provide definition of snprintf, since it's sometimes not in libc.
|
|
+ // This could have been a .c file, but then you have to do all your
|
|
+ // includes conditional on each OS having them. Easier to just let
|
|
+ // bochs.h do it.
|
|
+ //
|
|
+
|
|
+ #include "bochs.h"
|
|
+
|
|
+ #if !BX_HAVE_SNPRINTF
|
|
+ /* if they don't have snprintf, just use sprintf */
|
|
+ int bx_snprintf (char *s, size_t maxlen, const char *format, ...)
|
|
+ {
|
|
+ va_list arg;
|
|
+ int done;
|
|
+
|
|
+ va_start (arg, format);
|
|
+ done = vsprintf (s, format, arg);
|
|
+ va_end (arg);
|
|
+
|
|
+ return done;
|
|
+ }
|
|
+ #endif /* !BX_HAVE_SNPRINTF */
|
|
diff -crN bochs-clean-2000-03-25/strtoull.cc portable1/strtoull.cc
|
|
*** bochs-clean-2000-03-25/strtoull.cc Wed Dec 31 19:00:00 1969
|
|
--- portable1/strtoull.cc Tue Apr 3 17:32:10 2001
|
|
***************
|
|
*** 0 ****
|
|
--- 1,156 ----
|
|
+ //
|
|
+ // strtoull.cc
|
|
+ //
|
|
+ // Provide definition of strtoull, since it's sometimes not in libc.
|
|
+ // This could have been a .c file, but then you have to do all your
|
|
+ // includes conditional on each OS having them. Easier to just let
|
|
+ // bochs.h do it.
|
|
+ //
|
|
+
|
|
+ #include "bochs.h"
|
|
+
|
|
+ #if !BX_HAVE_STRTOULL
|
|
+ /* taken from glibc-2.2.2: strtod.c, and stripped down a lot. There are
|
|
+ still a few leftover references to decimal points and exponents,
|
|
+ but it seems to work for bases 10 and 16 */
|
|
+
|
|
+ #define RETURN(val,end) \
|
|
+ do { if (endptr != NULL) *endptr = (char *) (end); \
|
|
+ return val; } while (0)
|
|
+
|
|
+ unsigned long long bx_strtoull
|
|
+ (const char *nptr, char **endptr, int baseignore)
|
|
+ {
|
|
+ int negative; /* The sign of the number. */
|
|
+ int exponent; /* Exponent of the number. */
|
|
+
|
|
+ /* Numbers starting `0X' or `0x' have to be processed with base 16. */
|
|
+ int base = 10;
|
|
+
|
|
+ /* Number of bits currently in result value. */
|
|
+ int bits;
|
|
+
|
|
+ /* Running pointer after the last character processed in the string. */
|
|
+ const char *cp, *tp;
|
|
+ /* Start of significant part of the number. */
|
|
+ const char *startp, *start_of_digits;
|
|
+ /* Total number of digit and number of digits in integer part. */
|
|
+ int dig_no;
|
|
+ /* Contains the last character read. */
|
|
+ char c;
|
|
+
|
|
+ long long n = 0;
|
|
+ char const *p;
|
|
+
|
|
+ /* Prepare number representation. */
|
|
+ exponent = 0;
|
|
+ negative = 0;
|
|
+ bits = 0;
|
|
+
|
|
+ /* Parse string to get maximal legal prefix. We need the number of
|
|
+ characters of the integer part, the fractional part and the exponent. */
|
|
+ cp = nptr - 1;
|
|
+ /* Ignore leading white space. */
|
|
+ do
|
|
+ c = *++cp;
|
|
+ while (isspace (c));
|
|
+
|
|
+ /* Get sign of the result. */
|
|
+ if (c == '-')
|
|
+ {
|
|
+ negative = 1;
|
|
+ c = *++cp;
|
|
+ }
|
|
+ else if (c == '+')
|
|
+ c = *++cp;
|
|
+
|
|
+ if (c < '0' || c > '9')
|
|
+ {
|
|
+ /* It is really a text we do not recognize. */
|
|
+ RETURN (0, nptr);
|
|
+ }
|
|
+
|
|
+ /* First look whether we are faced with a hexadecimal number. */
|
|
+ if (c == '0' && tolower (cp[1]) == 'x')
|
|
+ {
|
|
+ /* Okay, it is a hexa-decimal number. Remember this and skip
|
|
+ the characters. BTW: hexadecimal numbers must not be
|
|
+ grouped. */
|
|
+ base = 16;
|
|
+ cp += 2;
|
|
+ c = *cp;
|
|
+ }
|
|
+
|
|
+ /* Record the start of the digits, in case we will check their grouping. */
|
|
+ start_of_digits = startp = cp;
|
|
+
|
|
+ /* Ignore leading zeroes. This helps us to avoid useless computations. */
|
|
+ while (c == '0')
|
|
+ c = *++cp;
|
|
+
|
|
+ /* If no other digit but a '0' is found the result is 0.0.
|
|
+ Return current read pointer. */
|
|
+ if ((c < '0' || c > '9')
|
|
+ && (base == 16 && (c < tolower ('a') || c > tolower ('f')))
|
|
+ && (base == 16 && (cp == start_of_digits || tolower (c) != 'p'))
|
|
+ && (base != 16 && tolower (c) != 'e'))
|
|
+ {
|
|
+ tp = start_of_digits;
|
|
+ /* If TP is at the start of the digits, there was no correctly
|
|
+ grouped prefix of the string; so no number found. */
|
|
+ RETURN (0, tp == start_of_digits ? (base == 16 ? cp - 1 : nptr) : tp);
|
|
+ }
|
|
+
|
|
+ /* Remember first significant digit and read following characters until the
|
|
+ decimal point, exponent character or any non-FP number character. */
|
|
+ startp = cp;
|
|
+ dig_no = 0;
|
|
+ while (1)
|
|
+ {
|
|
+ if ((c >= '0' && c <= '9')
|
|
+ || (base == 16 && tolower (c) >= 'a' && tolower (c) <= 'f'))
|
|
+ ++dig_no;
|
|
+ else
|
|
+ break;
|
|
+ c = *++cp;
|
|
+ }
|
|
+
|
|
+ /* The whole string is parsed. Store the address of the next character. */
|
|
+ if (endptr)
|
|
+ *endptr = (char *) cp;
|
|
+
|
|
+ if (dig_no == 0)
|
|
+ return 0;
|
|
+
|
|
+ for (p=start_of_digits; p!=cp; p++) {
|
|
+ n = n * (long long)base;
|
|
+ c = tolower (*p);
|
|
+ c = (c >= 'a') ? (10+c-'a') : c-'0';
|
|
+ n = n + (long long)c;
|
|
+ //printf ("after shifting in digit %c, n is %lld\n", *p, n);
|
|
+ }
|
|
+ return negative? -n : n;
|
|
+ }
|
|
+
|
|
+ #if BX_TEST_STRTOULL
|
|
+ /* test driver for strtoull */
|
|
+ int main (int argc, char **argv)
|
|
+ {
|
|
+ char buf[256], *endbuf;
|
|
+ long l;
|
|
+ long long ll;
|
|
+ while (1) {
|
|
+ printf ("Enter a long int: ");
|
|
+ gets (buf);
|
|
+ l = strtoul (buf, &endbuf, 10);
|
|
+ printf ("As a long, %ld\n", l);
|
|
+ printf ("Endbuf is at buf[%d]\n", endbuf-buf);
|
|
+ ll = bx_strtoull (buf, &endbuf, 10);
|
|
+ printf ("As a long long, %lld\n", ll);
|
|
+ printf ("Endbuf is at buf[%d]\n", endbuf-buf);
|
|
+ }
|
|
+ return 0;
|
|
+ }
|
|
+ #endif /* defined BX_TEST_STRTOULL */
|
|
+
|
|
+ #endif /* !BX_HAVE_STRTOULL */
|