diff --git a/bochs/fpu/fpu_aux.c b/bochs/fpu/fpu_aux.c index 2ae573fa5..91ad0e263 100644 --- a/bochs/fpu/fpu_aux.c +++ b/bochs/fpu/fpu_aux.c @@ -1,6 +1,6 @@ /*---------------------------------------------------------------------------+ | fpu_aux.c | - | $Id: fpu_aux.c,v 1.2 2001-10-06 03:53:46 bdenney Exp $ + | $Id: fpu_aux.c,v 1.3 2003-05-15 16:19:38 sshwarts Exp $ | | | Code to implement some of the FPU auxiliary instructions. | | | @@ -67,7 +67,7 @@ void finit_() static void fstsw_ax(void) { - SET_AX(status_word()); // KPL + SET_AX(status_word()); no_ip_update = 1; } diff --git a/bochs/fpu/fpu_entry.c b/bochs/fpu/fpu_entry.c index 40f7671d1..afde3b34a 100644 --- a/bochs/fpu/fpu_entry.c +++ b/bochs/fpu/fpu_entry.c @@ -1,6 +1,6 @@ /*---------------------------------------------------------------------------+ | fpu_entry.c | - | $Id: fpu_entry.c,v 1.8 2003-04-22 20:21:33 sshwarts Exp $ + | $Id: fpu_entry.c,v 1.9 2003-05-15 16:19:38 sshwarts Exp $ | | | The entry functions for wm-FPU-emu | | | @@ -145,10 +145,10 @@ math_emulate(fpu_addr_modes addr_modes, u_char loaded_tag, st0_tag; - // assuming byte is 0xd8..0xdf or 0xdb==FWAIT + /* assuming byte is 0xd8..0xdf or 0xdb==FWAIT */ - // lock is not a valid prefix for FPU instructions, +++ - // let the cpu handle it to generate a SIGILL. + /* lock is not a valid prefix for FPU instructions, +++ + let the cpu handle it to generate a SIGILL. */ no_ip_update = 0; @@ -217,7 +217,7 @@ do_the_FPU_interrupt: unmasked &= ~0xff; break; case 1: - loaded_tag = FPU_load_int32((s32 *)data_address, &loaded_data); // bbd: was (u32 *) + loaded_tag = FPU_load_int32((s32 *)data_address, &loaded_data); break; case 2: unmasked = FPU_load_double((double *)data_address, @@ -311,8 +311,8 @@ do_the_FPU_interrupt: 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. + /* 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(); diff --git a/bochs/fpu/fpu_trig.c b/bochs/fpu/fpu_trig.c index 398169413..72b234930 100644 --- a/bochs/fpu/fpu_trig.c +++ b/bochs/fpu/fpu_trig.c @@ -1,6 +1,6 @@ /*---------------------------------------------------------------------------+ | fpu_trig.c | - | $Id: fpu_trig.c,v 1.5 2002-07-03 20:13:31 vruppert Exp $ + | $Id: fpu_trig.c,v 1.6 2003-05-15 16:19:39 sshwarts Exp $ | | | Implementation of the FPU "transcendental" functions. | | | @@ -76,7 +76,7 @@ static int trig_arg(FPU_REG *st0_ptr, int flags) 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) + st0_tag = FPU_sub(REV|LOADED|TAG_Valid, &CONST_PI2, FULL_PRECISION); #ifdef BETTER_THAN_486 /* So far, the results are exact but based upon a 64 bit diff --git a/bochs/fpu/poly_tan.c b/bochs/fpu/poly_tan.c index 82349d7f7..bd50b4c77 100644 --- a/bochs/fpu/poly_tan.c +++ b/bochs/fpu/poly_tan.c @@ -1,6 +1,6 @@ /*---------------------------------------------------------------------------+ | poly_tan.c | - | $Id: poly_tan.c,v 1.4 2001-10-06 03:53:46 bdenney Exp $ + | $Id: poly_tan.c,v 1.5 2003-05-15 16:19:39 sshwarts Exp $ | | | Compute the tan of a FPU_REG, using a polynomial approximation. | | | @@ -18,8 +18,6 @@ #include "control_w.h" #include "poly.h" -//#define DEBUG_POLY_TAN // *********** - #define HiPOWERop 3 /* odd poly, positive terms */ static const u64 oddplterm[HiPOWERop] = { diff --git a/bochs/fpu/reg_constant.c b/bochs/fpu/reg_constant.c index 40945b075..400f6e8e6 100644 --- a/bochs/fpu/reg_constant.c +++ b/bochs/fpu/reg_constant.c @@ -1,6 +1,6 @@ /*---------------------------------------------------------------------------+ | reg_constant.c | - | $Id: reg_constant.c,v 1.3 2001-10-06 03:53:46 bdenney Exp $ + | $Id: reg_constant.c,v 1.4 2003-05-15 16:19:39 sshwarts Exp $ | | | All of the constant FPU_REGs | | | @@ -25,9 +25,9 @@ FPU_REG const CONST_HALF = MAKE_REG(POS, -1, 0x00000000, 0x80000000); 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. +/* 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); diff --git a/bochs/fpu/reg_ld_str.c b/bochs/fpu/reg_ld_str.c index 4578c57a6..ceee9bc47 100644 --- a/bochs/fpu/reg_ld_str.c +++ b/bochs/fpu/reg_ld_str.c @@ -1,6 +1,6 @@ /*---------------------------------------------------------------------------+ | reg_ld_str.c | - | $Id: reg_ld_str.c,v 1.11 2003-05-15 16:11:29 sshwarts Exp $ + | $Id: reg_ld_str.c,v 1.12 2003-05-15 16:19:39 sshwarts Exp $ | | | All of the functions which transfer data between user memory and FPU_REGs.| | | @@ -558,7 +558,7 @@ FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag, double *dfloat) l[0] = 0xFFFFFFFF; /* 8 byte real indefinite encoding */ l[1] = 0x7FEFFFFF; } - else // rc == RC_RND + else /* rc == RC_RND */ { l[0] = 0x00000000; /* Set to */ l[1] = 0x7ff00000; /* + INF */ @@ -787,7 +787,7 @@ FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag, float *single) templ = 0x7F7FFFFF; /* 4 byte real indefinite encoding */ else if (rc == RC_UP && !signpositive(&tmp)) templ = 0x7F7FFFFF; /* 4 byte real indefinite encoding */ - else // rc == RC_RND + else /* rc == RC_RND */ templ = 0x7f800000; /* Set to +INF */ } else