From: Peter Johnson Date: Wed, 3 Oct 2001 20:49:38 +0000 (-0000) Subject: Use wordptr and charptr when appropriate for data when using BitVector functions. X-Git-Tag: v0.1.0~268 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eec0574a16f954eaf766e872f07a968594d29563;p=yasm Use wordptr and charptr when appropriate for data when using BitVector functions. Make some minor comment corrections. svn path=/trunk/yasm/; revision=262 --- diff --git a/libyasm/floatnum.c b/libyasm/floatnum.c index b658ee98..d2e143ff 100644 --- a/libyasm/floatnum.c +++ b/libyasm/floatnum.c @@ -52,16 +52,16 @@ RCSID("$IdPath$"); /* 97-bit internal floating point format: - * xxxxxxxs eeeeeeee eeeeeeee m.....................................m + * 0000000s eeeeeeee eeeeeeee m.....................................m * Sign exponent mantissa (80 bits) * 79 0 * - * Only L.O. bit of Sign byte is significant. The rest is garbage. + * Only L.O. bit of Sign byte is significant. The rest is zero. * Exponent is bias 32767. * Mantissa does NOT have an implied one bit (it's explicit). */ struct floatnum { - unsigned int *mantissa; /* Allocated to 64 bits */ + wordptr mantissa; /* Allocated to MANT_BITS bits */ unsigned short exponent; unsigned char sign; unsigned char flags; @@ -222,7 +222,7 @@ static void floatnum_mul(floatnum *acc, const floatnum *op) { int exp; - unsigned int *product, *op1, *op2; + wordptr product, op1, op2; int norm_amt; /* Compute the new sign */ @@ -302,7 +302,7 @@ floatnum_new(const char *str) floatnum *flt; int dec_exponent, dec_exp_add; /* decimal (powers of 10) exponent */ int POT_index; - unsigned int *operand[2]; + wordptr operand[2]; int sig_digits; int decimal_pt; boolean carry; @@ -527,8 +527,8 @@ floatnum_get_common(unsigned char *ptr, const floatnum *flt, int byte_size, int mant_bits, int implicit1, int exp_bits) { int exponent = flt->exponent; - unsigned int *output; - unsigned char *buf; + wordptr output; + charptr buf; unsigned int len; unsigned int overflow = 0, underflow = 0, retval = 0; int exp_bias = (1<<(exp_bits-1))-1; diff --git a/src/floatnum.c b/src/floatnum.c index b658ee98..d2e143ff 100644 --- a/src/floatnum.c +++ b/src/floatnum.c @@ -52,16 +52,16 @@ RCSID("$IdPath$"); /* 97-bit internal floating point format: - * xxxxxxxs eeeeeeee eeeeeeee m.....................................m + * 0000000s eeeeeeee eeeeeeee m.....................................m * Sign exponent mantissa (80 bits) * 79 0 * - * Only L.O. bit of Sign byte is significant. The rest is garbage. + * Only L.O. bit of Sign byte is significant. The rest is zero. * Exponent is bias 32767. * Mantissa does NOT have an implied one bit (it's explicit). */ struct floatnum { - unsigned int *mantissa; /* Allocated to 64 bits */ + wordptr mantissa; /* Allocated to MANT_BITS bits */ unsigned short exponent; unsigned char sign; unsigned char flags; @@ -222,7 +222,7 @@ static void floatnum_mul(floatnum *acc, const floatnum *op) { int exp; - unsigned int *product, *op1, *op2; + wordptr product, op1, op2; int norm_amt; /* Compute the new sign */ @@ -302,7 +302,7 @@ floatnum_new(const char *str) floatnum *flt; int dec_exponent, dec_exp_add; /* decimal (powers of 10) exponent */ int POT_index; - unsigned int *operand[2]; + wordptr operand[2]; int sig_digits; int decimal_pt; boolean carry; @@ -527,8 +527,8 @@ floatnum_get_common(unsigned char *ptr, const floatnum *flt, int byte_size, int mant_bits, int implicit1, int exp_bits) { int exponent = flt->exponent; - unsigned int *output; - unsigned char *buf; + wordptr output; + charptr buf; unsigned int len; unsigned int overflow = 0, underflow = 0, retval = 0; int exp_bias = (1<<(exp_bits-1))-1;