Update of /cvsroot/bochs/bochs/fpu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1755/fpu Modified Files: Tag: softfloat-fpu-implementation_ver3_branch errors.c fpu_emu.h fpu_proto.h fpu_tags.c fpu_trig.c reg_constant.c reg_constant.h Log Message: drop out unused code from old FPU Index: errors.c =================================================================== RCS file: /cvsroot/bochs/bochs/fpu/errors.c,v retrieving revision 1.18.2.4 retrieving revision 1.18.2.5 diff -u -d -r1.18.2.4 -r1.18.2.5 --- errors.c 26 Mar 2004 21:36:09 -0000 1.18.2.4 +++ errors.c 27 Mar 2004 20:09:52 -0000 1.18.2.5 @@ -341,37 +341,6 @@ } -asmlinkage int arith_overflow(FPU_REG *dest) -{ - int tag = TAG_Valid; - - if (FPU_control_word & FPU_CW_Overflow) - { - /* The masked response */ - reg_copy(&CONST_INF, dest); - tag = TAG_Special; - } - else - { - /* Subtract the magic number from the exponent */ - addexponent(dest, (-3 * (1 << 13))); - } - - EXCEPTION(EX_Overflow); - if (FPU_control_word & FPU_CW_Overflow) - { - /* The overflow exception is masked. */ - /* By definition, precision is lost. - The roundup bit (C1) is also set because we have - "rounded" upwards to Infinity. */ - EXCEPTION(EX_Precision | SW_C1); - return tag; - } - - return tag; -} - - asmlinkage int arith_round_overflow(FPU_REG *dest, u8 sign) { int tag = TAG_Valid; @@ -509,18 +478,6 @@ } -void FPU_stack_underflow_i(int i) -{ - if (FPU_control_word & FPU_CW_Invalid) - { - /* The masked response */ - FPU_copy_to_regi(&CONST_QNaN, TAG_Special, i); - } - - EXCEPTION(EX_StackUnder); -} - - void FPU_stack_underflow_pop(int i) { if (FPU_control_word & FPU_CW_Invalid) Index: fpu_emu.h =================================================================== RCS file: /cvsroot/bochs/bochs/fpu/fpu_emu.h,v retrieving revision 1.23.6.4 retrieving revision 1.23.6.5 diff -u -d -r1.23.6.4 -r1.23.6.5 --- fpu_emu.h 26 Mar 2004 21:36:09 -0000 1.23.6.4 +++ fpu_emu.h 27 Mar 2004 20:09:52 -0000 1.23.6.5 @@ -67,9 +67,6 @@ #define fpu_register(x) ( *((FPU_REG *)(FPU_register_base + sizeof(FPU_REG) * (x & 7) ))) #define st(x) ( *((FPU_REG *)(FPU_register_base + sizeof(FPU_REG) * ((FPU_tos+x) & 7) ))) -#define NOT_EMPTY(i) (!FPU_empty_i(i)) -#define NOT_EMPTY_ST0 (st0_tag ^ TAG_Empty) - /* FPU_push() does not affect the tags */ #define FPU_push() { FPU_tos--; } Index: fpu_proto.h =================================================================== RCS file: /cvsroot/bochs/bochs/fpu/fpu_proto.h,v retrieving revision 1.14.8.3 retrieving revision 1.14.8.4 diff -u -d -r1.14.8.3 -r1.14.8.4 --- fpu_proto.h 19 Mar 2004 17:00:25 -0000 1.14.8.3 +++ fpu_proto.h 27 Mar 2004 20:09:52 -0000 1.14.8.4 @@ -46,12 +46,10 @@ extern void set_precision_flag_up(void); extern void set_precision_flag_down(void); extern int denormal_operand(void); -extern int arith_overflow(FPU_REG *dest); extern int arith_round_overflow(FPU_REG *dest, Bit8u sign); extern int arith_underflow(FPU_REG *dest); extern void FPU_stack_overflow(void); extern void FPU_stack_underflow(void); -extern void FPU_stack_underflow_i(int i); extern void FPU_stack_underflow_pop(int i); /* fpu_tags.c */ extern int FPU_tagof(FPU_REG *ptr) BX_CPP_AttrRegparmN(1); @@ -64,7 +62,6 @@ extern int FPU_Special(FPU_REG const *ptr) BX_CPP_AttrRegparmN(1); extern int isNaN(FPU_REG const *ptr) BX_CPP_AttrRegparmN(1); extern void FPU_pop(void); -extern int FPU_empty_i(int stnr) BX_CPP_AttrRegparmN(1); extern int FPU_stackoverflow(FPU_REG **st_new_ptr); extern void FPU_copy_to_regi(FPU_REG const *r, u_char tag, int stnr) BX_CPP_AttrRegparmN(3); extern void FPU_copy_to_reg1(FPU_REG const *r, u_char tag) BX_CPP_AttrRegparmN(2); Index: fpu_tags.c =================================================================== RCS file: /cvsroot/bochs/bochs/fpu/fpu_tags.c,v retrieving revision 1.7.6.1 retrieving revision 1.7.6.2 diff -u -d -r1.7.6.1 -r1.7.6.2 --- fpu_tags.c 19 Mar 2004 13:14:50 -0000 1.7.6.1 +++ fpu_tags.c 27 Mar 2004 20:09:52 -0000 1.7.6.2 @@ -72,11 +72,6 @@ && !((ptr->sigh == 0x80000000) && (ptr->sigl == 0))); } -int BX_CPP_AttrRegparmN(1) FPU_empty_i(int stnr) -{ - return FPU_gettagi(stnr) == TAG_Empty; -} - int FPU_stackoverflow(FPU_REG **st_new_ptr) { *st_new_ptr = &st(-1); Index: fpu_trig.c =================================================================== RCS file: /cvsroot/bochs/bochs/fpu/fpu_trig.c,v retrieving revision 1.10.8.5 retrieving revision 1.10.8.6 diff -u -d -r1.10.8.5 -r1.10.8.6 --- fpu_trig.c 27 Mar 2004 09:35:35 -0000 1.10.8.5 +++ fpu_trig.c 27 Mar 2004 20:09:53 -0000 1.10.8.6 @@ -20,6 +20,11 @@ static void rem_kernel(u64 st0, u64 *y, u64 st1, u64 q, int n); +/* Extra bits to take pi/2 to more than 128 bits precision. */ +static FPU_REG const CONST_PI2extra = MAKE_REG(NEG, -66, + 0xfc8f8cbb, 0xece675d1); + + #define BETTER_THAN_486 #define FCOS 4 Index: reg_constant.c =================================================================== RCS file: /cvsroot/bochs/bochs/fpu/reg_constant.c,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.4 diff -u -d -r1.7.2.3 -r1.7.2.4 --- reg_constant.c 19 Mar 2004 17:00:25 -0000 1.7.2.3 +++ reg_constant.c 27 Mar 2004 20:09:53 -0000 1.7.2.4 @@ -25,10 +25,6 @@ FPU_REG CONST_PI2 = MAKE_REG(POS, 0, 0x2168c235, 0xc90fdaa2); FPU_REG const CONST_PI4 = MAKE_REG(POS, -1, 0x2168c235, 0xc90fdaa2); -/* Extra bits to take pi/2 to more than 128 bits precision. */ -FPU_REG const CONST_PI2extra = MAKE_REG(NEG, -66, - 0xfc8f8cbb, 0xece675d1); - /* Only the sign (and tag) is used in internal zeroes */ FPU_REG const CONST_Z = MAKE_REG(POS, EXP_UNDER, 0x0, 0x0); Index: reg_constant.h =================================================================== RCS file: /cvsroot/bochs/bochs/fpu/reg_constant.h,v retrieving revision 1.6.2.1 retrieving revision 1.6.2.2 diff -u -d -r1.6.2.1 -r1.6.2.2 --- reg_constant.h 19 Mar 2004 17:00:25 -0000 1.6.2.1 +++ reg_constant.h 27 Mar 2004 20:09:53 -0000 1.6.2.2 @@ -21,7 +21,6 @@ * 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_Z; extern FPU_REG const CONST_INF; |