- removed all patches that are already applied in bugfix2, and ones

that have been rejected.
This commit is contained in:
Bryce Denney 2001-05-02 03:12:55 +00:00
parent 5cd42037a1
commit 8643d4fc9f
18 changed files with 0 additions and 15609 deletions

View File

@ -1,895 +0,0 @@
----------------------------------------------------------------------
For compilers (such as Microsoft VC++) which don't allow "LL" after a
constant to make it 64-bit, this patch declares all such constants as
BX_CONST64(value). Then in config.in, a switch called
BX_64BIT_CONSTANTS_USE_LL controls whether the macro puts the
LL's in or not. Configure sets the macro, if you're on a platform
that can run such things.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
diff -cr clean-portable1/config.h.in 64bit-constant/config.h.in
*** clean-portable1/config.h.in Wed Apr 4 18:52:18 2001
--- 64bit-constant/config.h.in Wed Apr 4 18:41:05 2001
***************
*** 264,269 ****
--- 264,277 ----
#define SIZEOF_UNSIGNED_LONG_LONG 0
#define SIZEOF_INT_P 0
+ #define BX_64BIT_CONSTANTS_USE_LL 1
+ #if BX_64BIT_CONSTANTS_USE_LL
+ // doesn't work on Microsoft Visual C++, maybe others
+ #define BX_CONST64(x) (x##LL)
+ #else
+ #define BX_CONST64(x) (x)
+ #endif
+
#if BX_WITH_WIN32
typedef unsigned char Bit8u;
typedef signed char Bit8s;
diff -cr clean-portable1/configure 64bit-constant/configure
*** clean-portable1/configure Wed Apr 4 18:52:18 2001
--- 64bit-constant/configure Wed Apr 4 18:45:11 2001
***************
*** 2582,2589 ****
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"
--- 2582,2617 ----
cross_compiling=$ac_cv_prog_cc_cross
+ echo $ac_n "checking if compiler allows LL for 64-bit constants""... $ac_c" 1>&6
+ echo "configure:2587: checking if compiler allows LL for 64-bit constants" >&5
+ cat > conftest.$ac_ext <<EOF
+ #line 2589 "configure"
+ #include "confdefs.h"
+
+ int main() {
+ { 42LL; }
+ ; return 0; }
+ EOF
+ if { (eval echo configure:2596: \"$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_64BIT_CONSTANTS_USE_LL 0
+ EOF
+
+
+ fi
+ rm -f conftest*
+
+
echo $ac_n "checking for cpu level""... $ac_c" 1>&6
! echo "configure:2615: 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"
***************
*** 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"
--- 2674,2680 ----
echo $ac_n "checking for dynamic translation support""... $ac_c" 1>&6
! echo "configure:2678: 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"
***************
*** 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"
--- 2747,2753 ----
echo $ac_n "checking for NE2000 support""... $ac_c" 1>&6
! echo "configure:2751: checking for NE2000 support" >&5
# Check whether --enable-ne2000 or --disable-ne2000 was given.
if test "${enable_ne2000+set}" = set; then
enableval="$enable_ne2000"
***************
*** 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"
--- 2782,2788 ----
echo $ac_n "checking for i440FX PCI support""... $ac_c" 1>&6
! echo "configure:2786: 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"
***************
*** 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"
--- 2817,2823 ----
echo $ac_n "checking for port e9 hack""... $ac_c" 1>&6
! echo "configure:2821: 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"
***************
*** 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"
--- 2848,2854 ----
echo $ac_n "checking for use of .cpp as suffix""... $ac_c" 1>&6
! echo "configure:2852: 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"
***************
*** 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"
--- 2890,2896 ----
echo $ac_n "checking for Bochs internal debugger support""... $ac_c" 1>&6
! echo "configure:2894: 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"
***************
*** 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"
--- 2928,2934 ----
echo $ac_n "checking for disassembler support""... $ac_c" 1>&6
! echo "configure:2932: checking for disassembler support" >&5
# Check whether --enable-disasm or --disable-disasm was given.
if test "${enable_disasm+set}" = set; then
enableval="$enable_disasm"
***************
*** 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"
--- 2975,2981 ----
echo $ac_n "checking for loader support""... $ac_c" 1>&6
! echo "configure:2979: checking for loader support" >&5
# Check whether --enable-loader or --disable-loader was given.
if test "${enable_loader+set}" = set; then
enableval="$enable_loader"
***************
*** 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"
--- 3013,3019 ----
INSTRUMENT_DIR='instrument/stubs'
echo $ac_n "checking for instrumentation support""... $ac_c" 1>&6
! echo "configure:3017: checking for instrumentation support" >&5
# Check whether --enable-instrumentation or --disable-instrumentation was given.
if test "${enable_instrumentation+set}" = set; then
enableval="$enable_instrumentation"
***************
*** 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"
--- 3148,3154 ----
echo $ac_n "checking for VGA emulation""... $ac_c" 1>&6
! echo "configure:3152: checking for VGA emulation" >&5
# Check whether --enable-vga or --disable-vga was given.
if test "${enable_vga+set}" = set; then
enableval="$enable_vga"
***************
*** 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.
--- 3182,3188 ----
echo $ac_n "checking for FPU emulation""... $ac_c" 1>&6
! echo "configure:3186: checking for FPU emulation" >&5
FPU_VAR=''
FPU_GLUE_OBJ=''
# Check whether --enable-fpu or --disable-fpu was given.
***************
*** 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"
--- 3224,3230 ----
echo $ac_n "checking for x86 debugger support""... $ac_c" 1>&6
! echo "configure:3228: 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"
***************
*** 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"
--- 3260,3266 ----
echo $ac_n "checking for CDROM support""... $ac_c" 1>&6
! echo "configure:3264: checking for CDROM support" >&5
# Check whether --enable-cdrom or --disable-cdrom was given.
if test "${enable_cdrom+set}" = set; then
enableval="$enable_cdrom"
***************
*** 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"
--- 3302,3308 ----
echo $ac_n "checking for Sound Blaster 16 support""... $ac_c" 1>&6
! echo "configure:3306: 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"
diff -cr clean-portable1/configure.in 64bit-constant/configure.in
*** clean-portable1/configure.in Wed Apr 4 18:52:18 2001
--- 64bit-constant/configure.in Wed Apr 4 18:45:09 2001
***************
*** 60,65 ****
--- 60,74 ----
])
AC_LANG_RESTORE
+ AC_MSG_CHECKING(if compiler allows LL for 64-bit constants)
+ AC_TRY_COMPILE([], [ { 42LL; } ],
+ AC_MSG_RESULT(yes),
+ [
+ AC_MSG_RESULT(no)
+ AC_DEFINE(BX_64BIT_CONSTANTS_USE_LL, 0)
+ ])
+ AC_LANG_RESTORE
+
AC_MSG_CHECKING(for cpu level)
AC_ARG_ENABLE(cpu-level,
[ --enable-cpu-level select cpu level (3,4,5)],
diff -cr clean-portable1/fpu/errors.c 64bit-constant/fpu/errors.c
*** clean-portable1/fpu/errors.c Wed Apr 4 18:52:18 2001
--- 64bit-constant/fpu/errors.c Wed Apr 4 18:47:33 2001
***************
*** 18,25 ****
+---------------------------------------------------------------------------*/
#include <linux/signal.h>
-
#include <asm/uaccess.h>
#include "fpu_emu.h"
#include "fpu_system.h"
--- 18,25 ----
+---------------------------------------------------------------------------*/
#include <linux/signal.h>
#include <asm/uaccess.h>
+ #include <stdio.h>
#include "fpu_emu.h"
#include "fpu_system.h"
***************
*** 654,666 ****
{
case 01:
case PR_64_BITS:
! significand(dest) = 0xffffffffffffffffLL;
break;
case PR_53_BITS:
! significand(dest) = 0xfffffffffffff800LL;
break;
case PR_24_BITS:
! significand(dest) = 0xffffff0000000000LL;
break;
}
}
--- 654,666 ----
{
case 01:
case PR_64_BITS:
! significand(dest) = BX_CONST64(0xffffffffffffffff);
break;
case PR_53_BITS:
! significand(dest) = BX_CONST64(0xfffffffffffff800);
break;
case PR_24_BITS:
! significand(dest) = BX_CONST64(0xffffff0000000000);
break;
}
}
diff -cr clean-portable1/fpu/fpu_trig.c 64bit-constant/fpu/fpu_trig.c
*** clean-portable1/fpu/fpu_trig.c Wed Apr 4 18:52:18 2001
--- 64bit-constant/fpu/fpu_trig.c Wed Apr 4 18:14:35 2001
***************
*** 707,713 ****
{
if ( (exponent(st0_ptr) < 0)
|| ((exponent(st0_ptr) == 0)
! && (significand(st0_ptr) <= 0xc90fdaa22168c234LL)) )
{
poly_cos(st0_ptr);
--- 707,713 ----
{
if ( (exponent(st0_ptr) < 0)
|| ((exponent(st0_ptr) == 0)
! && (significand(st0_ptr) <= BX_CONST64(0xc90fdaa22168c234))) )
{
poly_cos(st0_ptr);
diff -cr clean-portable1/fpu/poly_2xm1.c 64bit-constant/fpu/poly_2xm1.c
*** clean-portable1/fpu/poly_2xm1.c Wed Apr 4 18:52:18 2001
--- 64bit-constant/fpu/poly_2xm1.c Wed Apr 4 18:14:35 2001
***************
*** 21,37 ****
#define HIPOWER 11
static const u64 lterms[HIPOWER] =
{
! 0x0000000000000000LL, /* This term done separately as 12 bytes */
! 0xf5fdeffc162c7543LL,
! 0x1c6b08d704a0bfa6LL,
! 0x0276556df749cc21LL,
! 0x002bb0ffcf14f6b8LL,
! 0x0002861225ef751cLL,
! 0x00001ffcbfcd5422LL,
! 0x00000162c005d5f1LL,
! 0x0000000da96ccb1bLL,
! 0x0000000078d1b897LL,
! 0x000000000422b029LL
};
static const Xsig hiterm = MK_XSIG(0xb17217f7, 0xd1cf79ab, 0xc8a39194);
--- 21,37 ----
#define HIPOWER 11
static const u64 lterms[HIPOWER] =
{
! BX_CONST64(0x0000000000000000), /* This term done separately as 12 bytes */
! BX_CONST64(0xf5fdeffc162c7543),
! BX_CONST64(0x1c6b08d704a0bfa6),
! BX_CONST64(0x0276556df749cc21),
! BX_CONST64(0x002bb0ffcf14f6b8),
! BX_CONST64(0x0002861225ef751c),
! BX_CONST64(0x00001ffcbfcd5422),
! BX_CONST64(0x00000162c005d5f1),
! BX_CONST64(0x0000000da96ccb1b),
! BX_CONST64(0x0000000078d1b897),
! BX_CONST64(0x000000000422b029)
};
static const Xsig hiterm = MK_XSIG(0xb17217f7, 0xd1cf79ab, 0xc8a39194);
diff -cr clean-portable1/fpu/poly_atan.c 64bit-constant/fpu/poly_atan.c
*** clean-portable1/fpu/poly_atan.c Wed Apr 4 18:52:18 2001
--- 64bit-constant/fpu/poly_atan.c Wed Apr 4 18:42:36 2001
***************
*** 21,47 ****
#define HIPOWERon 6 /* odd poly, negative terms */
static const u64 oddnegterms[HIPOWERon] =
{
! 0x0000000000000000LL, /* Dummy (not for - 1.0) */
! 0x015328437f756467LL,
! 0x0005dda27b73dec6LL,
! 0x0000226bf2bfb91aLL,
! 0x000000ccc439c5f7LL,
! 0x0000000355438407LL
} ;
#define HIPOWERop 6 /* odd poly, positive terms */
static const u64 oddplterms[HIPOWERop] =
{
! /* 0xaaaaaaaaaaaaaaabLL, transferred to fixedpterm[] */
! 0x0db55a71875c9ac2LL,
! 0x0029fce2d67880b0LL,
! 0x0000dfd3908b4596LL,
! 0x00000550fd61dab4LL,
! 0x0000001c9422b3f9LL,
! 0x000000003e3301e1LL
};
! static const u64 denomterm = 0xebd9b842c5c53a0eLL;
static const Xsig fixedpterm = MK_XSIG(0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa);
--- 21,47 ----
#define HIPOWERon 6 /* odd poly, negative terms */
static const u64 oddnegterms[HIPOWERon] =
{
! BX_CONST64(0x0000000000000000), /* Dummy (not for - 1.0) */
! BX_CONST64(0x015328437f756467),
! BX_CONST64(0x0005dda27b73dec6),
! BX_CONST64(0x0000226bf2bfb91a),
! BX_CONST64(0x000000ccc439c5f7),
! BX_CONST64(0x0000000355438407)
} ;
#define HIPOWERop 6 /* odd poly, positive terms */
static const u64 oddplterms[HIPOWERop] =
{
! /* BX_CONST64(0xaaaaaaaaaaaaaaab), transferred to fixedpterm[] */
! BX_CONST64(0x0db55a71875c9ac2),
! BX_CONST64(0x0029fce2d67880b0),
! BX_CONST64(0x0000dfd3908b4596),
! BX_CONST64(0x00000550fd61dab4),
! BX_CONST64(0x0000001c9422b3f9),
! BX_CONST64(0x000000003e3301e1)
};
! static const u64 denomterm = BX_CONST64(0xebd9b842c5c53a0e);
static const Xsig fixedpterm = MK_XSIG(0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa);
diff -cr clean-portable1/fpu/poly_l2.c 64bit-constant/fpu/poly_l2.c
*** clean-portable1/fpu/poly_l2.c Wed Apr 4 18:52:18 2001
--- 64bit-constant/fpu/poly_l2.c Wed Apr 4 18:14:35 2001
***************
*** 181,196 ****
#define HIPOWER 10
static const u64 logterms[HIPOWER] =
{
! 0x2a8eca5705fc2ef0LL,
! 0xf6384ee1d01febceLL,
! 0x093bb62877cdf642LL,
! 0x006985d8a9ec439bLL,
! 0x0005212c4f55a9c8LL,
! 0x00004326a16927f0LL,
! 0x0000038d1d80a0e7LL,
! 0x0000003141cc80c6LL,
! 0x00000002b1668c9fLL,
! 0x000000002c7a46aaLL
};
static const u32 leadterm = 0xb8000000;
--- 181,196 ----
#define HIPOWER 10
static const u64 logterms[HIPOWER] =
{
! BX_CONST64(0x2a8eca5705fc2ef0),
! BX_CONST64(0xf6384ee1d01febce),
! BX_CONST64(0x093bb62877cdf642),
! BX_CONST64(0x006985d8a9ec439b),
! BX_CONST64(0x0005212c4f55a9c8),
! BX_CONST64(0x00004326a16927f0),
! BX_CONST64(0x0000038d1d80a0e7),
! BX_CONST64(0x0000003141cc80c6),
! BX_CONST64(0x00000002b1668c9f),
! BX_CONST64(0x000000002c7a46aa)
};
static const u32 leadterm = 0xb8000000;
diff -cr clean-portable1/fpu/poly_sin.c 64bit-constant/fpu/poly_sin.c
*** clean-portable1/fpu/poly_sin.c Wed Apr 4 18:52:18 2001
--- 64bit-constant/fpu/poly_sin.c Wed Apr 4 18:50:11 2001
***************
*** 25,42 ****
static const u64 pos_terms_l[N_COEFF_P] =
{
! 0xaaaaaaaaaaaaaaabLL,
! 0x00d00d00d00cf906LL,
! 0x000006b99159a8bbLL,
! 0x000000000d7392e6LL
};
static const u64 neg_terms_l[N_COEFF_N] =
{
! 0x2222222222222167LL,
! 0x0002e3bc74aab624LL,
! 0x0000000b09229062LL,
! 0x00000000000c7973LL
};
--- 25,42 ----
static const u64 pos_terms_l[N_COEFF_P] =
{
! BX_CONST64(0xaaaaaaaaaaaaaaab),
! BX_CONST64(0x00d00d00d00cf906),
! BX_CONST64(0x000006b99159a8bb),
! BX_CONST64(0x000000000d7392e6)
};
static const u64 neg_terms_l[N_COEFF_N] =
{
! BX_CONST64(0x2222222222222167),
! BX_CONST64(0x0002e3bc74aab624),
! BX_CONST64(0x0000000b09229062),
! BX_CONST64(0x00000000000c7973)
};
***************
*** 45,62 ****
#define N_COEFF_NH 4
static const u64 pos_terms_h[N_COEFF_PH] =
{
! 0x0000000000000000LL,
! 0x05b05b05b05b0406LL,
! 0x000049f93edd91a9LL,
! 0x00000000c9c9ed62LL
};
static const u64 neg_terms_h[N_COEFF_NH] =
{
! 0xaaaaaaaaaaaaaa98LL,
! 0x001a01a01a019064LL,
! 0x0000008f76c68a77LL,
! 0x0000000000d58f5eLL
};
--- 45,62 ----
#define N_COEFF_NH 4
static const u64 pos_terms_h[N_COEFF_PH] =
{
! BX_CONST64(0x0000000000000000),
! BX_CONST64(0x05b05b05b05b0406),
! BX_CONST64(0x000049f93edd91a9),
! BX_CONST64(0x00000000c9c9ed62)
};
static const u64 neg_terms_h[N_COEFF_NH] =
{
! BX_CONST64(0xaaaaaaaaaaaaaa98),
! BX_CONST64(0x001a01a01a019064),
! BX_CONST64(0x0000008f76c68a77),
! BX_CONST64(0x0000000000d58f5e)
};
***************
*** 131,139 ****
fixed_arg <<= 1;
}
/* pi/2 in hex is: 1.921fb54442d18469 898CC51701B839A2 52049C1 */
! fixed_arg = 0x921fb54442d18469LL - fixed_arg;
/* There is a special case which arises due to rounding, to fix here. */
! if ( fixed_arg == 0xffffffffffffffffLL )
fixed_arg = 0;
XSIG_LL(argSqrd) = fixed_arg; argSqrd.lsw = 0;
--- 131,139 ----
fixed_arg <<= 1;
}
/* pi/2 in hex is: 1.921fb54442d18469 898CC51701B839A2 52049C1 */
! fixed_arg = BX_CONST64(0x921fb54442d18469) - fixed_arg;
/* There is a special case which arises due to rounding, to fix here. */
! if ( fixed_arg == BX_CONST64(0xffffffffffffffff))
fixed_arg = 0;
XSIG_LL(argSqrd) = fixed_arg; argSqrd.lsw = 0;
***************
*** 195,201 ****
#ifdef PARANOID
if ( (exponent(&result) >= 0)
! && (significand(&result) > 0x8000000000000000LL) )
{
EXCEPTION(EX_INTERNAL|0x150);
}
--- 195,201 ----
#ifdef PARANOID
if ( (exponent(&result) >= 0)
! && (significand(&result) > BX_CONST64(0x8000000000000000)) )
{
EXCEPTION(EX_INTERNAL|0x150);
}
***************
*** 218,224 ****
#ifdef PARANOID
if ( (exponent(st0_ptr) > 0)
|| ((exponent(st0_ptr) == 0)
! && (significand(st0_ptr) > 0xc90fdaa22168c234LL)) )
{
EXCEPTION(EX_Invalid);
FPU_copy_to_reg0(&CONST_QNaN, TAG_Special);
--- 218,224 ----
#ifdef PARANOID
if ( (exponent(st0_ptr) > 0)
|| ((exponent(st0_ptr) == 0)
! && (significand(st0_ptr) > BX_CONST64(0xc90fdaa22168c234))) )
{
EXCEPTION(EX_Invalid);
FPU_copy_to_reg0(&CONST_QNaN, TAG_Special);
***************
*** 300,308 ****
fixed_arg <<= 1;
}
/* pi/2 in hex is: 1.921fb54442d18469 898CC51701B839A2 52049C1 */
! fixed_arg = 0x921fb54442d18469LL - fixed_arg;
/* There is a special case which arises due to rounding, to fix here. */
! if ( fixed_arg == 0xffffffffffffffffLL )
fixed_arg = 0;
exponent = -1;
--- 300,308 ----
fixed_arg <<= 1;
}
/* pi/2 in hex is: 1.921fb54442d18469 898CC51701B839A2 52049C1 */
! fixed_arg = BX_CONST64(0x921fb54442d18469) - fixed_arg;
/* There is a special case which arises due to rounding, to fix here. */
! if ( fixed_arg == BX_CONST64(0xffffffffffffffff))
fixed_arg = 0;
exponent = -1;
***************
*** 360,366 ****
*/
/* This has an exponent of -65 */
! XSIG_LL(fix_up) = 0x898cc51701b839a2ll;
fix_up.lsw = 0;
/* The fix-up needs to be improved for larger args */
--- 360,366 ----
*/
/* This has an exponent of -65 */
! XSIG_LL(fix_up) = BX_CONST64(0x898cc51701b839a2);
fix_up.lsw = 0;
/* The fix-up needs to be improved for larger args */
***************
*** 388,394 ****
#ifdef PARANOID
if ( (exponent(&result) >= 0)
! && (significand(&result) > 0x8000000000000000LL) )
{
EXCEPTION(EX_INTERNAL|0x151);
}
--- 388,394 ----
#ifdef PARANOID
if ( (exponent(&result) >= 0)
! && (significand(&result) > BX_CONST64(0x8000000000000000)) )
{
EXCEPTION(EX_INTERNAL|0x151);
}
diff -cr clean-portable1/fpu/poly_tan.c 64bit-constant/fpu/poly_tan.c
*** clean-portable1/fpu/poly_tan.c Wed Apr 4 18:52:18 2001
--- 64bit-constant/fpu/poly_tan.c Wed Apr 4 18:42:54 2001
***************
*** 22,54 ****
#define HiPOWERop 3 /* odd poly, positive terms */
static const u64 oddplterm[HiPOWERop] =
{
! 0x0000000000000000LL,
! 0x0051a1cf08fca228LL,
! 0x0000000071284ff7LL
};
#define HiPOWERon 2 /* odd poly, negative terms */
static const u64 oddnegterm[HiPOWERon] =
{
! 0x1291a9a184244e80LL,
! 0x0000583245819c21LL
};
#define HiPOWERep 2 /* even poly, positive terms */
static const u64 evenplterm[HiPOWERep] =
{
! 0x0e848884b539e888LL,
! 0x00003c7f18b887daLL
};
#define HiPOWERen 2 /* even poly, negative terms */
static const u64 evennegterm[HiPOWERen] =
{
! 0xf1f0200fd51569ccLL,
! 0x003afb46105c4432LL
};
! static const u64 twothirds = 0xaaaaaaaaaaaaaaabLL;
/*--- poly_tan() ------------------------------------------------------------+
--- 22,54 ----
#define HiPOWERop 3 /* odd poly, positive terms */
static const u64 oddplterm[HiPOWERop] =
{
! BX_CONST64(0x0000000000000000),
! BX_CONST64(0x0051a1cf08fca228),
! BX_CONST64(0x0000000071284ff7)
};
#define HiPOWERon 2 /* odd poly, negative terms */
static const u64 oddnegterm[HiPOWERon] =
{
! BX_CONST64(0x1291a9a184244e80),
! BX_CONST64(0x0000583245819c21)
};
#define HiPOWERep 2 /* even poly, positive terms */
static const u64 evenplterm[HiPOWERep] =
{
! BX_CONST64(0x0e848884b539e888),
! BX_CONST64(0x00003c7f18b887da)
};
#define HiPOWERen 2 /* even poly, negative terms */
static const u64 evennegterm[HiPOWERen] =
{
! BX_CONST64(0xf1f0200fd51569cc),
! BX_CONST64(0x003afb46105c4432)
};
! static const u64 twothirds = BX_CONST64(0xaaaaaaaaaaaaaaab);
/*--- poly_tan() ------------------------------------------------------------+
***************
*** 121,127 ****
really doesn't matter what value we use because it will
have negligible effect in later calculations
*/
! XSIG_LL(accum) = 0x8000000000000000LL;
accum.lsw = 0;
}
else
--- 121,127 ----
really doesn't matter what value we use because it will
have negligible effect in later calculations
*/
! XSIG_LL(accum) = BX_CONST64(0x8000000000000000);
accum.lsw = 0;
}
else
diff -cr clean-portable1/fpu/reg_ld_str.c 64bit-constant/fpu/reg_ld_str.c
*** clean-portable1/fpu/reg_ld_str.c Wed Apr 4 18:52:18 2001
--- 64bit-constant/fpu/reg_ld_str.c Wed Apr 4 18:14:35 2001
***************
*** 913,919 ****
if ( control_word & EX_Invalid )
{
/* Produce something like QNaN "indefinite" */
! tll = 0x8000000000000000LL;
}
else
return 0;
--- 913,919 ----
if ( control_word & EX_Invalid )
{
/* Produce something like QNaN "indefinite" */
! tll = BX_CONST64(0x8000000000000000);
}
else
return 0;
diff -cr clean-portable1/fpu/reg_u_mul.c 64bit-constant/fpu/reg_u_mul.c
*** clean-portable1/fpu/reg_u_mul.c Sat Mar 17 01:10:57 2001
--- 64bit-constant/fpu/reg_u_mul.c Wed Apr 4 18:09:28 2001
***************
*** 72,81 ****
c->exp = expon;
! if ( ! (mu & 0x8000000000000000LL) )
{
mu <<= 1;
! if ( ml & 0x8000000000000000LL )
mu |= 1;
ml <<= 1;
c->exp --;
--- 72,81 ----
c->exp = expon;
! if ( ! (mu & BX_CONST64(0x8000000000000000)) )
{
mu <<= 1;
! if ( ml & BX_CONST64(0x8000000000000000) )
mu |= 1;
ml <<= 1;
c->exp --;
diff -cr clean-portable1/fpu/wm_sqrt.c 64bit-constant/fpu/wm_sqrt.c
*** clean-portable1/fpu/wm_sqrt.c Sat Mar 17 01:10:58 2001
--- 64bit-constant/fpu/wm_sqrt.c Wed Apr 4 18:11:10 2001
***************
*** 87,93 ****
work += ((u64)guess32) << 32;
if ( work == 0 ) /* This happens in one or two special cases */
! work = 0xffffffffffffffffLL;
guess = work;
--- 87,93 ----
work += ((u64)guess32) << 32;
if ( work == 0 ) /* This happens in one or two special cases */
! work = BX_CONST64(0xffffffffffffffff);
guess = work;

File diff suppressed because it is too large Load Diff

View File

@ -1,45 +0,0 @@
----------------------------------------------------------------------
The fpu code creates a static function called fabs, which unfortunately
is the same as the C library function fabs. Many compilers seem to
use the static one with no complaint, but others don't like it.
Just rename fabs, to eliminate the potential conflict.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** clean-portable1/fpu/fpu_etc.c Wed Apr 4 18:52:18 2001
--- psyon-win32/fpu/fpu_etc.c Wed Apr 4 19:46:58 2001
***************
*** 29,35 ****
}
! static void fabs(FPU_REG *st0_ptr, u_char st0tag)
{
if ( st0tag ^ TAG_Empty )
{
--- 29,35 ----
}
! static void fpu_fabs(FPU_REG *st0_ptr, u_char st0tag)
{
if ( st0tag ^ TAG_Empty )
{
***************
*** 133,139 ****
static FUNC_ST0 const fp_etc_table[] = {
! fchs, fabs, (FUNC_ST0)FPU_illegal, (FUNC_ST0)FPU_illegal,
ftst_, fxam, (FUNC_ST0)FPU_illegal, (FUNC_ST0)FPU_illegal
};
--- 133,139 ----
static FUNC_ST0 const fp_etc_table[] = {
! fchs, fpu_fabs, (FUNC_ST0)FPU_illegal, (FUNC_ST0)FPU_illegal,
ftst_, fxam, (FUNC_ST0)FPU_illegal, (FUNC_ST0)FPU_illegal
};

View File

@ -1,34 +0,0 @@
----------------------------------------------------------------------
By Greg Alexander, 12/22/2000
Implement aborts on a few SET FEATURE commands for ATA.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** bochs-2000_0325a/iodev/harddrv.cc Sat Mar 25 21:28:49 2000
--- iodev/harddrv.cc Fri Dec 22 11:53:53 2000
***************
*** 1413,1418 ****
--- 1413,1433 ----
}
break;
+ case 0xef: // set features
+ switch(BX_SELECTED_CONTROLLER.features) {
+ case 0x02: // Enable and
+ case 0x82: // Disable write cache.
+ case 0xAA: // Enable and
+ case 0x55: // Disable look-ahead cache.
+ bx_printf("disk: SET FEATURES subcommand not supported by disk.\n");
+ command_aborted(value);
+ break;
+
+ default:
+ bx_panic("disk: SET FEATURES with unknown subcommand: 0x%02x\n", (unsigned) BX_SELECTED_CONTROLLER.features );
+ }
+ break;
+
case 0x40: //
if (bx_options.newHardDriveSupport) {
if (BX_SELECTED_HD.device_type != IDE_DISK)

View File

@ -1,680 +0,0 @@
----------------------------------------------------------------------
Patch name: inlines
Author: Bryce Denney
Date: Fri Apr 6 12:54:05 EDT 2001
Detailed description:
Make it easier to fix inline syntax and link problems. This patch defines
two macros BX_C_INLINE and BX_CPP_INLINE, for C and C++ headers respectively.
We already had the ability to #define the inline keyword to whatever the
platform supports (even empty), and the configure would try to deduce the
correct value. But BX_C_INLINE and BX_CPP_INLINE should include any
"extern" or "static" keywords in addition to the "inline" keyword. The
default definitions are:
#define inline inline
#define BX_C_INLINE static inline
#define BX_CPP_INLINE inline
Hopefully some combination of these three will accomodate any compiler.
Apply patch to:
bochs 3-25-2000 snapshot, with portable1 and portable2 patches
Instructions:
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
diff -cr clean-portable2/config.h.in inline-hell/config.h.in
*** clean-portable2/config.h.in Fri Apr 6 03:35:29 2001
--- inline-hell/config.h.in Fri Apr 6 12:50:36 2001
***************
*** 375,381 ****
--- 375,402 ----
#define HAVE_SIGACTION 1
+ // configure will change the definition of "inline" to the value
+ // that the C compiler allows. It tests the following keywords to
+ // see if any is permitted: inline, __inline__, __inline. If none
+ // is permitted, it defines inline to be empty.
#define inline inline
+
+ // inline functions in headers that are compiled with C compiler
+ // (e.g. fpu code) are declared with BX_C_INLINE macro. Note that
+ // the word "inline" itself may now be redefined by the above #define.
+ // Many compilers are known to work with "static inline". If the
+ // compiler can put the function inline, it does so and never creates
+ // a symbol for the function. If optimization is off, or inline is
+ // defined to be empty, the static keyword causes the function to create
+ // a symbol that's visible only to that .c file. Each .c file that
+ // includes the header will produde another local version of the
+ // BX_C_INLINE function (not ideal). However without "static" you can
+ // duplicate symbol problems which are even worse.
+ #define BX_C_INLINE static inline
+
+ // Use BX_CPP_INLINE for all C++ inline functions. Note that the
+ // word "inline" itself may now be redefined by the above #define.
+ #define BX_CPP_INLINE inline
#define BX_DEBUGGER 0
#define BX_DISASM 0
diff -cr clean-portable2/cpu/cpu.h inline-hell/cpu/cpu.h
*** clean-portable2/cpu/cpu.h Fri Apr 6 03:35:18 2001
--- inline-hell/cpu/cpu.h Fri Apr 6 12:50:36 2001
***************
*** 1308,1355 ****
unsigned opa, unsigned opb);
#endif
! BX_SMF inline void set_CF(Boolean val);
! BX_SMF inline void set_AF(Boolean val);
! BX_SMF inline void set_ZF(Boolean val);
! BX_SMF inline void set_SF(Boolean val);
! BX_SMF inline void set_OF(Boolean val);
! BX_SMF inline void set_PF(Boolean val);
! BX_SMF inline void set_PF_base(Bit8u val);
!
!
! BX_SMF inline void set_AX(Bit16u ax);
! BX_SMF inline void set_BX(Bit16u bx);
! BX_SMF inline void set_CX(Bit16u cx);
! BX_SMF inline void set_DX(Bit16u dx);
! BX_SMF inline void set_AL(Bit8u al);
! BX_SMF inline void set_AH(Bit8u ah);
! BX_SMF inline void set_BL(Bit8u bl);
! BX_SMF inline void set_BH(Bit8u bh);
! BX_SMF inline void set_CL(Bit8u cl);
! BX_SMF inline void set_CH(Bit8u ch);
! BX_SMF inline void set_DL(Bit8u dl);
! BX_SMF inline void set_DH(Bit8u dh);
!
! BX_SMF inline Bit8u get_AL(void);
! BX_SMF inline Bit8u get_AH(void);
! BX_SMF inline Bit8u get_BL(void);
! BX_SMF inline Bit8u get_BH(void);
! BX_SMF inline Bit8u get_CL(void);
! BX_SMF inline Bit8u get_CH(void);
! BX_SMF inline Bit8u get_DL(void);
! BX_SMF inline Bit8u get_DH(void);
!
! BX_SMF inline Bit16u get_AX(void);
! BX_SMF inline Bit16u get_BX(void);
! BX_SMF inline Bit16u get_CX(void);
! BX_SMF inline Bit16u get_DX(void);
#if BX_CPU_LEVEL >= 2
! BX_SMF inline Boolean real_mode(void);
#endif
#if BX_CPU_LEVEL >= 3
! BX_SMF inline Boolean protected_mode(void);
! BX_SMF inline Boolean v8086_mode(void);
#endif
};
--- 1308,1355 ----
unsigned opa, unsigned opb);
#endif
! BX_SMF BX_CPP_INLINE void set_CF(Boolean val);
! BX_SMF BX_CPP_INLINE void set_AF(Boolean val);
! BX_SMF BX_CPP_INLINE void set_ZF(Boolean val);
! BX_SMF BX_CPP_INLINE void set_SF(Boolean val);
! BX_SMF BX_CPP_INLINE void set_OF(Boolean val);
! BX_SMF BX_CPP_INLINE void set_PF(Boolean val);
! BX_SMF BX_CPP_INLINE void set_PF_base(Bit8u val);
!
!
! BX_SMF BX_CPP_INLINE void set_AX(Bit16u ax);
! BX_SMF BX_CPP_INLINE void set_BX(Bit16u bx);
! BX_SMF BX_CPP_INLINE void set_CX(Bit16u cx);
! BX_SMF BX_CPP_INLINE void set_DX(Bit16u dx);
! BX_SMF BX_CPP_INLINE void set_AL(Bit8u al);
! BX_SMF BX_CPP_INLINE void set_AH(Bit8u ah);
! BX_SMF BX_CPP_INLINE void set_BL(Bit8u bl);
! BX_SMF BX_CPP_INLINE void set_BH(Bit8u bh);
! BX_SMF BX_CPP_INLINE void set_CL(Bit8u cl);
! BX_SMF BX_CPP_INLINE void set_CH(Bit8u ch);
! BX_SMF BX_CPP_INLINE void set_DL(Bit8u dl);
! BX_SMF BX_CPP_INLINE void set_DH(Bit8u dh);
!
! BX_SMF BX_CPP_INLINE Bit8u get_AL(void);
! BX_SMF BX_CPP_INLINE Bit8u get_AH(void);
! BX_SMF BX_CPP_INLINE Bit8u get_BL(void);
! BX_SMF BX_CPP_INLINE Bit8u get_BH(void);
! BX_SMF BX_CPP_INLINE Bit8u get_CL(void);
! BX_SMF BX_CPP_INLINE Bit8u get_CH(void);
! BX_SMF BX_CPP_INLINE Bit8u get_DL(void);
! BX_SMF BX_CPP_INLINE Bit8u get_DH(void);
!
! BX_SMF BX_CPP_INLINE Bit16u get_AX(void);
! BX_SMF BX_CPP_INLINE Bit16u get_BX(void);
! BX_SMF BX_CPP_INLINE Bit16u get_CX(void);
! BX_SMF BX_CPP_INLINE Bit16u get_DX(void);
#if BX_CPU_LEVEL >= 2
! BX_SMF BX_CPP_INLINE Boolean real_mode(void);
#endif
#if BX_CPU_LEVEL >= 3
! BX_SMF BX_CPP_INLINE Boolean protected_mode(void);
! BX_SMF BX_CPP_INLINE Boolean v8086_mode(void);
#endif
};
***************
*** 1365,1469 ****
extern BX_CPU_C BX_CPU;
! BX_SMF inline void BX_CPU_C_PREFIX set_AX(Bit16u ax) { AX = ax; };
! BX_SMF inline void BX_CPU_C_PREFIX set_BX(Bit16u bx) { BX = bx; };
! BX_SMF inline void BX_CPU_C_PREFIX set_CX(Bit16u cx) { CX = cx; };
! BX_SMF inline void BX_CPU_C_PREFIX set_DX(Bit16u dx) { DX = dx; };
! BX_SMF inline void BX_CPU_C_PREFIX set_AL(Bit8u al) { AL = al; };
! BX_SMF inline void BX_CPU_C_PREFIX set_AH(Bit8u ah) { AH = ah; };
! BX_SMF inline void BX_CPU_C_PREFIX set_BL(Bit8u bl) { BL = bl; };
! BX_SMF inline void BX_CPU_C_PREFIX set_BH(Bit8u bh) { BH = bh; };
! BX_SMF inline void BX_CPU_C_PREFIX set_CL(Bit8u cl) { CL = cl; };
! BX_SMF inline void BX_CPU_C_PREFIX set_CH(Bit8u ch) { CH = ch; };
! BX_SMF inline void BX_CPU_C_PREFIX set_DL(Bit8u dl) { DL = dl; };
! BX_SMF inline void BX_CPU_C_PREFIX set_DH(Bit8u dh) { DH = dh; };
!
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_AL(void) { return(AL); };
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_AH(void) { return(AH); };
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_BL(void) { return(BL); };
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_BH(void) { return(BH); };
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_CL(void) { return(CL); };
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_CH(void) { return(CH); };
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_DL(void) { return(DL); };
! BX_SMF inline Bit8u BX_CPU_C_PREFIX get_DH(void) { return(DH); };
!
! BX_SMF inline Bit16u BX_CPU_C_PREFIX get_AX(void) { return(AX); };
! BX_SMF inline Bit16u BX_CPU_C_PREFIX get_BX(void) { return(BX); };
! BX_SMF inline Bit16u BX_CPU_C_PREFIX get_CX(void) { return(CX); };
! BX_SMF inline Bit16u BX_CPU_C_PREFIX get_DX(void) { return(DX); };
#if BX_CPU_LEVEL >= 2
! inline Boolean BX_CPU_C::real_mode(void) { return( !BX_CPU_THIS_PTR cr0.pe ); };
#endif
#if BX_CPU_LEVEL == 2
! inline Boolean BX_CPU_C::protected_mode(void) { return( BX_CPU_THIS_PTR cr0.pe ); };
#endif
#if BX_CPU_LEVEL >= 3
# if BX_SUPPORT_V8086_MODE
! inline Boolean
BX_CPU_C::v8086_mode(void) {
return(BX_CPU_THIS_PTR eflags.vm);
}
! inline Boolean
BX_CPU_C::protected_mode(void) {
return(BX_CPU_THIS_PTR cr0.pe && !BX_CPU_THIS_PTR eflags.vm);
}
# else
! inline Boolean
BX_CPU_C::v8086_mode(void) {
return(0);
}
! inline Boolean
BX_CPU_C::protected_mode(void) {
return(BX_CPU_THIS_PTR cr0.pe);
}
# endif
#endif
! inline void
BX_CPU_C::set_CF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xfffff0;
BX_CPU_THIS_PTR eflags.cf = val;
}
! inline void
BX_CPU_C::set_AF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xfff0ff;
BX_CPU_THIS_PTR eflags.af = val;
}
! inline void
BX_CPU_C::set_ZF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xff0fff;
BX_CPU_THIS_PTR eflags.zf = val;
}
! inline void
BX_CPU_C::set_SF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xf0ffff;
BX_CPU_THIS_PTR eflags.sf = val;
}
! inline void
BX_CPU_C::set_OF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0x0fffff;
BX_CPU_THIS_PTR eflags.of = val;
}
! inline void
BX_CPU_C::set_PF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xffff0f;
BX_CPU_THIS_PTR lf_pf = val;
}
! inline void
BX_CPU_C::set_PF_base(Bit8u val) {
BX_CPU_THIS_PTR eflags.pf_byte = val;
BX_CPU_THIS_PTR lf_flags_status = (BX_CPU_THIS_PTR lf_flags_status & 0xffff0f) | BX_LF_MASK_P;
--- 1365,1469 ----
extern BX_CPU_C BX_CPU;
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_AX(Bit16u ax) { AX = ax; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_BX(Bit16u bx) { BX = bx; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_CX(Bit16u cx) { CX = cx; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_DX(Bit16u dx) { DX = dx; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_AL(Bit8u al) { AL = al; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_AH(Bit8u ah) { AH = ah; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_BL(Bit8u bl) { BL = bl; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_BH(Bit8u bh) { BH = bh; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_CL(Bit8u cl) { CL = cl; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_CH(Bit8u ch) { CH = ch; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_DL(Bit8u dl) { DL = dl; };
! BX_SMF BX_CPP_INLINE void BX_CPU_C_PREFIX set_DH(Bit8u dh) { DH = dh; };
!
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_AL(void) { return(AL); };
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_AH(void) { return(AH); };
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_BL(void) { return(BL); };
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_BH(void) { return(BH); };
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_CL(void) { return(CL); };
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_CH(void) { return(CH); };
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_DL(void) { return(DL); };
! BX_SMF BX_CPP_INLINE Bit8u BX_CPU_C_PREFIX get_DH(void) { return(DH); };
!
! BX_SMF BX_CPP_INLINE Bit16u BX_CPU_C_PREFIX get_AX(void) { return(AX); };
! BX_SMF BX_CPP_INLINE Bit16u BX_CPU_C_PREFIX get_BX(void) { return(BX); };
! BX_SMF BX_CPP_INLINE Bit16u BX_CPU_C_PREFIX get_CX(void) { return(CX); };
! BX_SMF BX_CPP_INLINE Bit16u BX_CPU_C_PREFIX get_DX(void) { return(DX); };
#if BX_CPU_LEVEL >= 2
! BX_CPP_INLINE Boolean BX_CPU_C::real_mode(void) { return( !BX_CPU_THIS_PTR cr0.pe ); };
#endif
#if BX_CPU_LEVEL == 2
! BX_CPP_INLINE Boolean BX_CPU_C::protected_mode(void) { return( BX_CPU_THIS_PTR cr0.pe ); };
#endif
#if BX_CPU_LEVEL >= 3
# if BX_SUPPORT_V8086_MODE
! BX_CPP_INLINE Boolean
BX_CPU_C::v8086_mode(void) {
return(BX_CPU_THIS_PTR eflags.vm);
}
! BX_CPP_INLINE Boolean
BX_CPU_C::protected_mode(void) {
return(BX_CPU_THIS_PTR cr0.pe && !BX_CPU_THIS_PTR eflags.vm);
}
# else
! BX_CPP_INLINE Boolean
BX_CPU_C::v8086_mode(void) {
return(0);
}
! BX_CPP_INLINE Boolean
BX_CPU_C::protected_mode(void) {
return(BX_CPU_THIS_PTR cr0.pe);
}
# endif
#endif
! BX_CPP_INLINE void
BX_CPU_C::set_CF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xfffff0;
BX_CPU_THIS_PTR eflags.cf = val;
}
! BX_CPP_INLINE void
BX_CPU_C::set_AF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xfff0ff;
BX_CPU_THIS_PTR eflags.af = val;
}
! BX_CPP_INLINE void
BX_CPU_C::set_ZF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xff0fff;
BX_CPU_THIS_PTR eflags.zf = val;
}
! BX_CPP_INLINE void
BX_CPU_C::set_SF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xf0ffff;
BX_CPU_THIS_PTR eflags.sf = val;
}
! BX_CPP_INLINE void
BX_CPU_C::set_OF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0x0fffff;
BX_CPU_THIS_PTR eflags.of = val;
}
! BX_CPP_INLINE void
BX_CPU_C::set_PF(Boolean val) {
BX_CPU_THIS_PTR lf_flags_status &= 0xffff0f;
BX_CPU_THIS_PTR lf_pf = val;
}
! BX_CPP_INLINE void
BX_CPU_C::set_PF_base(Bit8u val) {
BX_CPU_THIS_PTR eflags.pf_byte = val;
BX_CPU_THIS_PTR lf_flags_status = (BX_CPU_THIS_PTR lf_flags_status & 0xffff0f) | BX_LF_MASK_P;
diff -cr clean-portable2/disasm/disasm.h inline-hell/disasm/disasm.h
*** clean-portable2/disasm/disasm.h Fri Apr 6 03:35:18 2001
--- inline-hell/disasm/disasm.h Fri Apr 6 12:50:38 2001
***************
*** 69,82 ****
char *index_name16[8];
char *index_name32[8];
! inline Bit8u fetch_byte(void) {
return(*instruction++);
};
! inline Bit8u peek_byte(void) {
return(*instruction);
};
! inline Bit16u fetch_word(void) {
Bit16u ret16;
Bit8u b1, b0;
--- 69,82 ----
char *index_name16[8];
char *index_name32[8];
! BX_CPP_INLINE Bit8u fetch_byte(void) {
return(*instruction++);
};
! BX_CPP_INLINE Bit8u peek_byte(void) {
return(*instruction);
};
! BX_CPP_INLINE Bit16u fetch_word(void) {
Bit16u ret16;
Bit8u b1, b0;
***************
*** 86,92 ****
return(ret16);
};
! inline Bit32u fetch_dword(void) {
Bit32u ret32;
Bit8u b3, b2, b1, b0;
--- 86,92 ----
return(ret16);
};
! BX_CPP_INLINE Bit32u fetch_dword(void) {
Bit32u ret32;
Bit8u b3, b2, b1, b0;
diff -cr clean-portable2/fpu/fpu_emu.h inline-hell/fpu/fpu_emu.h
*** clean-portable2/fpu/fpu_emu.h Fri Apr 6 03:35:27 2001
--- inline-hell/fpu/fpu_emu.h Fri Apr 6 12:50:38 2001
***************
*** 198,204 ****
#define significand(x) ( ((u64 *)&((x)->sigl))[0] )
#endif
! static inline void reg_copy(FPU_REG const *x, FPU_REG *y)
{
y->exp = x->exp;
significand(y) = significand(x);
--- 198,205 ----
#define significand(x) ( ((u64 *)&((x)->sigl))[0] )
#endif
! BX_C_INLINE
! void reg_copy(FPU_REG const *x, FPU_REG *y)
{
y->exp = x->exp;
significand(y) = significand(x);
diff -cr clean-portable2/fpu/poly.h inline-hell/fpu/poly.h
*** clean-portable2/fpu/poly.h Fri Apr 6 03:35:27 2001
--- inline-hell/fpu/poly.h Fri Apr 6 12:50:38 2001
***************
*** 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;
--- 74,82 ----
*/
/* Multiply two fixed-point 32 bit numbers, producing a 32 bit result.
! The answer is the ms word of the product. */
! BX_C_INLINE
! u32 mul_32_32(const u32 arg1, const u32 arg2)
{
#ifdef NO_ASSEMBLER
return (((u64)arg1) * arg2) >> 32;
***************
*** 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;
--- 95,102 ----
/* Add the 12 byte Xsig x2 to Xsig dest, with no checks for overflow. */
! BX_C_INLINE
! void add_Xsig_Xsig(Xsig *dest, const Xsig *x2)
{
#ifdef NO_ASSEMBLER
dest->lsw += x2->lsw;
***************
*** 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;
--- 124,131 ----
/* Add the 12 byte Xsig x2 to Xsig dest, adjust exp if overflow occurs. */
! BX_C_INLINE
! void add_two_Xsig(Xsig *dest, const Xsig *x2, s32 *exp)
{
#ifdef NO_ASSEMBLER
int ovfl = 0;
***************
*** 188,194 ****
/* Negate the 12 byte Xsig */
! static inline void negate_Xsig(Xsig *x)
{
#ifdef NO_ASSEMBLER
x->lsw = ~x->lsw;
--- 185,192 ----
/* Negate the 12 byte Xsig */
! BX_C_INLINE
! void negate_Xsig(Xsig *x)
{
#ifdef NO_ASSEMBLER
x->lsw = ~x->lsw;
diff -cr clean-portable2/gui/macintosh.cc inline-hell/gui/macintosh.cc
*** clean-portable2/gui/macintosh.cc Fri Apr 6 03:35:18 2001
--- inline-hell/gui/macintosh.cc Fri Apr 6 12:50:39 2001
***************
*** 119,128 ****
} bx_tool_pixmap[BX_MAX_PIXMAPS];
// Event handlers
! inline void HandleKey(EventRecord *event, Bit32u keyState);
! inline void HandleToolClick(Point where);
void HandleMenuChoice(long menuChoice);
! inline void HandleClick(EventRecord *event);
// Update routines
void UpdateWindow(WindowPtr window);
--- 119,128 ----
} bx_tool_pixmap[BX_MAX_PIXMAPS];
// Event handlers
! BX_CPP_INLINE void HandleKey(EventRecord *event, Bit32u keyState);
! BX_CPP_INLINE void HandleToolClick(Point where);
void HandleMenuChoice(long menuChoice);
! BX_CPP_INLINE void HandleClick(EventRecord *event);
// Update routines
void UpdateWindow(WindowPtr window);
***************
*** 363,369 ****
//
// Handles keyboard-related events.
! inline void HandleKey(EventRecord *event, Bit32u keyState)
{
int key;
UInt32 trans;
--- 363,369 ----
//
// Handles keyboard-related events.
! BX_CPP_INLINE void HandleKey(EventRecord *event, Bit32u keyState)
{
int key;
UInt32 trans;
***************
*** 412,418 ****
//
// Handles mouse clicks in the Bochs tool window
! inline void HandleToolClick(Point where)
{
unsigned i;
int xorigin;
--- 412,418 ----
//
// Handles mouse clicks in the Bochs tool window
! BX_CPP_INLINE void HandleToolClick(Point where)
{
unsigned i;
int xorigin;
***************
*** 433,439 ****
thisGUI->show_headerbar();
}
! inline void ResetPointer(void)
{
#if 0
CursorDevice *theMouse;
--- 433,439 ----
thisGUI->show_headerbar();
}
! BX_CPP_INLINE void ResetPointer(void)
{
#if 0
CursorDevice *theMouse;
***************
*** 567,573 ****
HiliteMenu(0);
}
! inline void HandleClick(EventRecord *event)
{
short part;
WindowPtr whichWindow;
--- 567,573 ----
HiliteMenu(0);
}
! BX_CPP_INLINE void HandleClick(EventRecord *event)
{
short part;
WindowPtr whichWindow;
diff -cr clean-portable2/iodev/sb16.h inline-hell/iodev/sb16.h
*** clean-portable2/iodev/sb16.h Fri Apr 6 03:35:19 2001
--- inline-hell/iodev/sb16.h Fri Apr 6 12:50:39 2001
***************
*** 42,48 ****
#endif
// If the buffer commands are to be inlined:
! #define BX_SB16_BUFINL inline
// maximum number of patch translations
#define BX_SB16_PATCHTABLESIZE 1024
--- 42,49 ----
#endif
// If the buffer commands are to be inlined:
! #define BX_SB16_BUFINL BX_CPP_INLINE
! // BX_CPP_INLINE is defined to the inline keyword for the C++ compiler.
// maximum number of patch translations
#define BX_SB16_PATCHTABLESIZE 1024
diff -cr clean-portable2/pc_system.h inline-hell/pc_system.h
*** clean-portable2/pc_system.h Fri Apr 6 03:35:18 2001
--- inline-hell/pc_system.h Fri Apr 6 12:50:36 2001
***************
*** 109,115 ****
void activate_timer( unsigned timer_index, Bit32u useconds,
Boolean continuous );
void deactivate_timer( unsigned timer_index );
! static inline void tick1(void) {
#if BX_SHOW_IPS
{
extern unsigned long ips_count;
--- 109,115 ----
void activate_timer( unsigned timer_index, Bit32u useconds,
Boolean continuous );
void deactivate_timer( unsigned timer_index );
! static BX_CPP_INLINE void tick1(void) {
#if BX_SHOW_IPS
{
extern unsigned long ips_count;
***************
*** 120,126 ****
bx_pc_system.timer_handler();
}
}
! static inline void tickn(Bit64u n) {
#if BX_SHOW_IPS
{
extern unsigned long ips_count;
--- 120,126 ----
bx_pc_system.timer_handler();
}
}
! static BX_CPP_INLINE void tickn(Bit64u n) {
#if BX_SHOW_IPS
{
extern unsigned long ips_count;

View File

@ -1,45 +0,0 @@
----------------------------------------------------------------------
Patch name: macos-no-strdup
Author: Bryce Denney
Date: Fri Apr 6 03:38:27 EDT 2001
Detailed description:
In portable2, I gave configure the decision of whether strdup existed
since that was the standard pattern. But for --with-macos, the
real compile environment is the mac, not the system that configure is
running in. So to activate the replace strdup, we have to tell
configure to define BX_HAVE_STRDUP=0 if macos is selected.
Apply patch to:
bochs 3-25-2000 snapshot with portable1 and portable2 patches
Instructions:
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** clean-portable2/configure.in Fri Apr 6 03:35:29 2001
--- macos/configure.in Fri Apr 6 03:34:21 2001
***************
*** 658,663 ****
--- 658,664 ----
CD_UP_TWO="cd ..\.."
elif test "$with_macos" = yes; then
AC_DEFINE(BX_WITH_MACOS, 1)
+ AC_DEFINE(BX_HAVE_STRDUP, 0)
GUI_OBJS='$(GUI_OBJS_MACOS)'
GUI_LINK_OPTS='$(GUI_LINK_OPTS_MACOS)'
else
*** clean-portable2/configure Fri Apr 6 03:35:29 2001
--- macos/configure Fri Apr 6 03:34:22 2001
***************
*** 3576,3581 ****
--- 3576,3585 ----
#define BX_WITH_MACOS 1
EOF
+ cat >> confdefs.h <<\EOF
+ #define BX_HAVE_STRDUP 0
+ EOF
+
GUI_OBJS='$(GUI_OBJS_MACOS)'
GUI_LINK_OPTS='$(GUI_LINK_OPTS_MACOS)'
else

View File

@ -1,51 +0,0 @@
----------------------------------------------------------------------
By Greg Alexander, 12/27/2000
Enable writes to the mouse output buffer and enable mouse DATA_READ command.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** bochs-2000_0325a/iodev/keyboard.cc Sat Mar 25 21:28:49 2000
--- iodev/keyboard.cc Wed Dec 27 09:06:40 2000
***************
*** 505,511 ****
break;
case 0xd3: // write mouse output buffer
! bx_panic("KBD: io write 0x64: command = 0xD3(write mouse outb)\n");
BX_KEY_THIS s.kbd_controller.expecting_port60h = 1;
break;
--- 505,513 ----
break;
case 0xd3: // write mouse output buffer
! //FIXME: Why was this a panic?
! bx_printf("KBD: io write 0x64: command = 0xD3(write mouse outb)\n");
! // following byte to port 60h written to output port as mouse write.
BX_KEY_THIS s.kbd_controller.expecting_port60h = 1;
break;
***************
*** 1264,1270 ****
--- 1266,1284 ----
bx_printf("[mouse] Get mouse information\n");
break;
+ case 0xeb: // Read Data (send a packet when in Remote Mode)
+ controller_enQ(0xFA, 1); // ACK
+ mouse_enQ_packet( ((BX_KEY_THIS s.mouse.button_status & 0x0f) | 0x08),
+ 0x00, 0x00 ); // bit3 of first byte always set
+ //assumed we really aren't in polling mode, a rather odd assumption.
+ bx_printf("[mouse] Warning: Read Data command partially supported.\n");
+ break;
+
default:
+ //EAh Set Stream Mode
+ //ECh Reset Wrap Mode
+ //EEh Set Wrap Mode
+ //F0h Set Remote Mode (polling mode, i.e. not stream mode.)
bx_panic("MOUSE: kbd_ctrl_to_mouse(%02xh)\n", (unsigned) value);
}
}

View File

@ -1,41 +0,0 @@
----------------------------------------------------------------------
From Roland Mainz, 4/1/2001
Panic-is-fatal patch, allows user to choose whether to crash on bx_panic()
or just print a warning. The default behavior is still to crash.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** bochs-clean-2000-03-25/main.cc Tue Apr 3 15:19:42 2001
--- sun-workshop/main.cc Wed Apr 4 11:35:53 2001
***************
*** 312,317 ****
--- 312,321 ----
bx_atexit();
+ #if !BX_PANIC_IS_FATAL
+ return;
+ #endif
+
#if !BX_DEBUGGER
exit(1);
#else
*** bochs-clean-2000-03-25/config.h.in Tue Apr 3 15:19:41 2001
--- sun-workshop/config.h.in Wed Apr 4 11:35:36 2001
***************
*** 25,30 ****
--- 25,36 ----
// USER CONFIGURABLE OPTIONS : EDIT ONLY OPTIONS IN THIS SECTION //
///////////////////////////////////////////////////////////////////
+ // This switch determines if a call to bx_panic will kill the
+ // simulation or not. Leave it on by default so that default
+ // functionality stays the same, but now it's easy to change the
+ // behavior to suit your taste.
+ #define BX_PANIC_IS_FATAL 1
+
// I rebuilt the code which provides timers to IO devices.
// Setting this to 1 will introduce a little code which
// will panic out if cases which shouldn't happen occur.

View File

@ -1,60 +0,0 @@
----------------------------------------------------------------------
Patch name: pit-panic
Author: Bryce Denney
Date: Fri Apr 6 02:48:29 EDT 2001
Description:
The 82c54 model (pit.cc) implements timer modes 0, 2, and 3 in its handler
functions, without caring which timer number is involved. However, the
I/O write code that sets the mode is inconsistent.
Timer 0 can be set to modes 0,2,3 only.
Timer 1 can be set to mode 2 only.
Timer 2 can be set to mode 2,3 only.
From a quick reading of an 8254 datasheet, I can't see any reason to
restrict which timer can be in which mode, so I think it's correct to
allow ALL timers to go into ALL modes that are implemented. If you think
otherwise, pls let me know.
Apply patch to:
bochs 3-25-2000 snapshot
Instructions:
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** clean-bochs-2000-03-25/iodev/pit.cc Tue Apr 3 15:19:42 2001
--- pit-panic/iodev/pit.cc Fri Apr 6 02:38:08 2001
***************
*** 368,374 ****
BX_PIT_THIS s.timer[1].input_latch_value = 0;
BX_PIT_THIS s.timer[1].input_latch_toggle = 0;
BX_PIT_THIS s.timer[1].bcd_mode = bcd_mode;
! if ( mode!=2 || bcd_mode!=0 )
bx_panic("pit: outp(43h): comm 7, mode %02x, bcd %02x unhandled\n",
(unsigned) mode, bcd_mode);
break;
--- 368,374 ----
BX_PIT_THIS s.timer[1].input_latch_value = 0;
BX_PIT_THIS s.timer[1].input_latch_toggle = 0;
BX_PIT_THIS s.timer[1].bcd_mode = bcd_mode;
! if ( (mode!=3 && mode!=2 && mode!=0) || bcd_mode!=0 )
bx_panic("pit: outp(43h): comm 7, mode %02x, bcd %02x unhandled\n",
(unsigned) mode, bcd_mode);
break;
***************
*** 387,393 ****
BX_PIT_THIS s.timer[2].input_latch_value = 0;
BX_PIT_THIS s.timer[2].input_latch_toggle = 0;
BX_PIT_THIS s.timer[2].bcd_mode = bcd_mode;
! if ( (mode!=3 && mode!=2) || bcd_mode!=0 )
bx_panic("pit: outp(43h): comm Bh, mode %02x, bcd %02x unhandled\n",
(unsigned) mode, bcd_mode);
break;
--- 387,393 ----
BX_PIT_THIS s.timer[2].input_latch_value = 0;
BX_PIT_THIS s.timer[2].input_latch_toggle = 0;
BX_PIT_THIS s.timer[2].bcd_mode = bcd_mode;
! if ( (mode!=3 && mode!=2 && mode!=0) || bcd_mode!=0 )
bx_panic("pit: outp(43h): comm Bh, mode %02x, bcd %02x unhandled\n",
(unsigned) mode, bcd_mode);
break;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,90 +0,0 @@
----------------------------------------------------------------------
From Roland Mainz.
Support Sun CDROM.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** bochs-clean-2000-03-25/iodev/cdrom.cc Sat Mar 17 01:10:58 2001
--- sun-workshop/iodev/cdrom.cc Wed Apr 4 11:13:54 2001
***************
*** 40,45 ****
--- 40,55 ----
}
#endif
+ #ifdef __sun
+ extern "C" {
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <sys/cdio.h>
+ #define BX_CD_FRAMESIZE CDROM_BLK_2048
+ }
+ #endif /* __sun */
+
#ifdef __OpenBSD__
// Here is a diff for cdrom.cc which adds support for OpenBSD.
//
***************
*** 174,180 ****
DeviceIoControl(hFile, IOCTL_CDROM_READ_TOC, NULL, 0, NULL, 0, &iBytesReturned, NULL); */
return true;
}
! #elif __linux__
{
struct cdrom_tochdr tochdr;
if (ioctl(fd, CDROMREADTOCHDR, &tochdr))
--- 184,190 ----
DeviceIoControl(hFile, IOCTL_CDROM_READ_TOC, NULL, 0, NULL, 0, &iBytesReturned, NULL); */
return true;
}
! #elif __linux__ || defined(__sun)
{
struct cdrom_tochdr tochdr;
if (ioctl(fd, CDROMREADTOCHDR, &tochdr))
***************
*** 218,224 ****
--- 228,238 ----
// Lead out track
struct cdrom_tocentry tocentry;
tocentry.cdte_format = (msf) ? CDROM_MSF : CDROM_LBA;
+ #ifdef CDROM_LEADOUT
+ tocentry.cdte_track = CDROM_LEADOUT;
+ #else
tocentry.cdte_track = 0xaa;
+ #endif
if (ioctl(fd, CDROMREADTOCENTRY, &tocentry))
bx_panic("cdrom: read_toc: READTOCENTRY lead-out failed.\n");
buf[len++] = 0; // Reserved
***************
*** 340,347 ****
{
// Return CD-ROM capacity. I believe you want to return
// the number of bytes of capacity the actual media has.
! #ifdef __linux__
{
// I just looked through the Linux kernel source to see
// what it does with the ATAPI capacity command, and reversed
--- 354,373 ----
{
// Return CD-ROM capacity. I believe you want to return
// the number of bytes of capacity the actual media has.
+ #ifdef __sun
+ {
+ struct stat buf = {0};
! if (fd < 0) {
! bx_panic("cdrom: capacity: file not open.\n");
! }
!
! if( fstat(fd, &buf) != 0 )
! bx_panic("cdrom: capacity: stat() failed.\n");
!
! return(buf.st_size);
! }
! #elif __linux__
{
// I just looked through the Linux kernel source to see
// what it does with the ATAPI capacity command, and reversed

View File

@ -1,33 +0,0 @@
----------------------------------------------------------------------
From Greg Alexander
Implement VGA enable register, at 0x3c3.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** bochs-2000_0325a/iodev/vga.cc Sat Mar 25 21:28:49 2000
--- iodev/vga.cc Thu Dec 21 14:29:01 2000
***************
*** 439,444 ****
--- 439,448 ----
RETURN(0);
break;
+ case 0x03c3: /* VGA Enable Register */
+ RETURN(1);
+ break;
+
case 0x03c4: /* Sequencer Index Register */
RETURN(BX_VGA_THIS s.sequencer.index);
break;
***************
*** 588,594 ****
break;
case 0x03b4: /* CRTC Index Register (monochrome emulation modes) */
- case 0x03c3: /* VGA enable */
case 0x03c7: /* */
case 0x03c8: /* */
default:
--- 592,597 ----

View File

@ -1,29 +0,0 @@
----------------------------------------------------------------------
This fix was made by Don Becker. I only put it in a patch.
CDROM drive letter for WIN32 is no longer hardcoded.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** clean-bochs-2000-03-25/iodev/cdrom.cc Sat Mar 17 01:10:58 2001
--- rawdisk/iodev/cdrom.cc Thu Apr 5 13:03:16 2001
***************
*** 97,103 ****
// Load CD-ROM. Returns false if CD is not ready.
#ifdef WIN32
! hFile=CreateFile((char *)"\\\\.\\e:", GENERIC_READ, 0 , NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL);
//printf("%s", path);
//hFile=CreateFile(path, GENERIC_READ, 0 , NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL);
if (hFile !=(void *)0xFFFFFFFF)
--- 97,105 ----
// Load CD-ROM. Returns false if CD is not ready.
#ifdef WIN32
! char drive[256];
! sprintf(drive, "\\\\.\\%s", path);
! hFile=CreateFile((char *)&drive, GENERIC_READ, 0 , NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL);
//printf("%s", path);
//hFile=CreateFile(path, GENERIC_READ, 0 , NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL);
if (hFile !=(void *)0xFFFFFFFF)

View File

@ -1,44 +0,0 @@
----------------------------------------------------------------------
This fix was made by Don Becker. I only put it in a patch.
Bypass fstat when opening WIN32 raw floppy disk.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
*** clean-bochs-2000-03-25/iodev/floppy.cc Sat Mar 17 01:10:58 2001
--- rawdisk/iodev/floppy.cc Thu Apr 5 13:24:36 2001
***************
*** 1177,1188 ****
return(0);
}
! #ifdef macintosh
if (!strcmp(bx_options.floppya.path, SuperDrive))
ret = fd_stat(&stat_buf);
else
- #endif
ret = fstat(media->fd, &stat_buf);
if (ret) {
perror("fstat'ing floppy 0 drive image file");
bx_panic("fstat() returns error!\n");
--- 1177,1195 ----
return(0);
}
! #if BX_WITH_MACOS
if (!strcmp(bx_options.floppya.path, SuperDrive))
ret = fd_stat(&stat_buf);
else
ret = fstat(media->fd, &stat_buf);
+ #elif BX_WITH_WIN32
+ stat_buf.st_mode = S_IFCHR;
+ // maybe replace with code that sets ret to -1 if the disk is not available
+ ret = 0;
+ #else
+ // unix
+ ret = fstat(media->fd, &stat_buf);
+ #endif
if (ret) {
perror("fstat'ing floppy 0 drive image file");
bx_panic("fstat() returns error!\n");

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
1266a1267,1274
> case 0xeb: // Read Data (send a packet when in Remote Mode)
> controller_enQ(0xFA, 1); // ACK
> mouse_enQ_packet( ((BX_KEY_THIS s.mouse.button_status & 0x0f) | 0x08),
> 0x00, 0x00 ); // bit3 of first byte always set
> //assumed we really aren't in polling mode, a rather odd assumption.
> bx_printf("[mouse] Warning: Read Data command partially supported.\n");
> break;
>
1267a1276,1279
> //EAh Set Stream Mode
> //ECh Reset Wrap Mode
> //EEh Set Wrap Mode
> //F0h Set Remote Mode (polling mode, i.e. not stream mode.)

View File

@ -1,133 +0,0 @@
----------------------------------------------------------------------
From Greg Alexander
Hack: improve portability with ifdefs
Use Bryce's portable1 patch instead.
To patch, go to main bochs directory.
Type "patch -p1 < THIS_PATCH_FILE".
----------------------------------------------------------------------
diff -cr ../../clean/bochs-2000_0325a//fpu/fpu_entry.c ./fpu/fpu_entry.c
*** ../../clean/bochs-2000_0325a//fpu/fpu_entry.c Mon Nov 1 20:14:28 1999
--- ./fpu/fpu_entry.c Tue Dec 12 14:16:01 2000
***************
*** 1060,1065 ****
--- 1060,1068 ----
#ifdef DEBUG
FPU_printall();
#endif DEBUG
+ #ifdef NO_BLANK_LABELS
+ if(0);
+ #endif
}
#endif /* #ifndef USE_WITH_CPU_SIM */
diff -cr ../../clean/bochs-2000_0325a//fpu/fpu_etc.c ./fpu/fpu_etc.c
*** ../../clean/bochs-2000_0325a//fpu/fpu_etc.c Mon Nov 1 19:53:48 1999
--- ./fpu/fpu_etc.c Tue Dec 12 13:57:59 2000
***************
*** 50,56 ****
--- 50,60 ----
break;
case TAG_Valid:
if (getsign(st0_ptr) == SIGN_POS)
+ #ifdef NO_PAREN_AROUND_BRACES
+ setcc(0)
+ #else
setcc(0);
+ #endif
else
setcc(SW_C0);
break;
***************
*** 59,65 ****
--- 63,73 ----
{
case TW_Denormal:
if (getsign(st0_ptr) == SIGN_POS)
+ #ifdef NO_PAREN_AROUND_BRACES
+ setcc(0)
+ #else
setcc(0);
+ #endif
else
setcc(SW_C0);
if ( denormal_operand() < 0 )
***************
*** 78,84 ****
--- 86,96 ----
break;
case TW_Infinity:
if (getsign(st0_ptr) == SIGN_POS)
+ #ifdef NO_PAREN_AROUND_BRACES
+ setcc(0)
+ #else
setcc(0);
+ #endif
else
setcc(SW_C0);
break;
diff -cr ../../clean/bochs-2000_0325a//fpu/fpu_system.h ./fpu/fpu_system.h
*** ../../clean/bochs-2000_0325a//fpu/fpu_system.h Tue Jan 4 15:04:17 2000
--- ./fpu/fpu_system.h Tue Dec 12 12:54:17 2000
***************
*** 135,140 ****
--- 135,143 ----
#ifndef __ASSEMBLY__
struct info {
+ #ifdef NO_EMPTY_STRUCTS
+ unsigned char donotindexme;
+ #endif
};
#define FPU_info ((struct info *) NULL)
diff -cr ../../clean/bochs-2000_0325a//fpu/status_w.h ./fpu/status_w.h
*** ../../clean/bochs-2000_0325a//fpu/status_w.h Tue Jan 4 14:28:55 2000
--- ./fpu/status_w.h Tue Dec 12 14:21:18 2000
***************
*** 48,56 ****
--- 48,62 ----
#define status_word() \
((partial_status & ~SW_Top & 0xffff) | ((top << SW_Top_Shift) & SW_Top))
+ #ifdef NO_PAREN_AROUND_BRACES
+ #define setcc(cc) { \
+ partial_status &= ~(SW_C0|SW_C1|SW_C2|SW_C3); \
+ partial_status |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3); }
+ #else
#define setcc(cc) ({ \
partial_status &= ~(SW_C0|SW_C1|SW_C2|SW_C3); \
partial_status |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3); })
+ #endif /* NO_PAREN_AROUND_BRACES */
#ifdef PECULIAR_486
/* Default, this conveys no information, but an 80486 does it. */
diff -cr ../../clean/bochs-2000_0325a//fpu/stubs/asm/desc.h ./fpu/stubs/asm/desc.h
*** ../../clean/bochs-2000_0325a//fpu/stubs/asm/desc.h Tue Jan 4 14:28:55 2000
--- ./fpu/stubs/asm/desc.h Tue Dec 12 12:45:33 2000
***************
*** 1,6 ****
--- 1,8 ----
#ifndef __ARCH_DESC_H
#define __ARCH_DESC_H
+ #include<../config.h>
+
struct desc_struct {
unsigned long a,b;
};
diff -cr ../../clean/bochs-2000_0325a//fpu/stubs/linux/kernel.h ./fpu/stubs/linux/kernel.h
*** ../../clean/bochs-2000_0325a//fpu/stubs/linux/kernel.h Tue Jan 4 14:28:55 2000
--- ./fpu/stubs/linux/kernel.h Tue Dec 12 13:52:57 2000
***************
*** 1,6 ****
--- 1,8 ----
#ifndef _LINUX_KERNEL_H
#define _LINUX_KERNEL_H
+ #include "../config.h"
+
int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2)));