diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-03-23 15:22:05 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-03-23 15:22:05 (GMT) |
commit | cd9e1d02055cb963e9707fbdfe76fe884ccff94a (patch) | |
tree | 329a2898c398cd21a5b699a0427828bb129cf03e /Modules | |
parent | b6405efd1bf8031fc3f15fbeba4f0e048844a50d (diff) | |
download | cpython-cd9e1d02055cb963e9707fbdfe76fe884ccff94a.zip cpython-cd9e1d02055cb963e9707fbdfe76fe884ccff94a.tar.gz cpython-cd9e1d02055cb963e9707fbdfe76fe884ccff94a.tar.bz2 |
Whitespace.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_decimal/libmpdec/mpdecimal.c | 14 | ||||
-rw-r--r-- | Modules/_decimal/libmpdec/umodarith.h | 190 |
2 files changed, 102 insertions, 102 deletions
diff --git a/Modules/_decimal/libmpdec/mpdecimal.c b/Modules/_decimal/libmpdec/mpdecimal.c index 07e4beb..fd4c2bd 100644 --- a/Modules/_decimal/libmpdec/mpdecimal.c +++ b/Modules/_decimal/libmpdec/mpdecimal.c @@ -5849,7 +5849,7 @@ _lower_bound_zeta(const mpd_t *x, uint32_t *status) t = mpd_adjexp(x); if (t > 0) { - /* x >= 10 -> floor(log10(floor(abs(log10(x))))) */ + /* x >= 10 -> floor(log10(floor(abs(log10(x))))) */ return mpd_exp_digits(t) - 1; } else if (t < -1) { @@ -5907,7 +5907,7 @@ _qcheck_pow_bounds(mpd_t *result, const mpd_t *x, const mpd_t *y, } } else { - /* (0 < |x| < 1 and y > 0) or (|x| > 1 and y < 0). */ + /* (0 < |x| < 1 and y > 0) or (|x| > 1 and y < 0). */ ub_omega = mpd_exp_digits(mpd_etiny(ctx)); if (ub_omega < lb_zeta + lb_theta) { _settriple(result, resultsign, 1, mpd_etiny(ctx)-1); @@ -6637,7 +6637,7 @@ mpd_same_quantum(const mpd_t *a, const mpd_t *b) { if (mpd_isspecial(a) || mpd_isspecial(b)) { return ((mpd_isnan(a) && mpd_isnan(b)) || - (mpd_isinfinite(a) && mpd_isinfinite(b))); + (mpd_isinfinite(a) && mpd_isinfinite(b))); } return a->exp == b->exp; @@ -7055,10 +7055,10 @@ _mpd_fix_sqrt(mpd_t *result, const mpd_t *a, mpd_t *tmp, u.exp = u.digits - ctx->prec + result->exp - 1; _mpd_qsub(tmp, result, &u, &maxctx, status); - if (*status&MPD_Errors) goto nanresult; + if (*status&MPD_Errors) goto nanresult; _mpd_qmul(tmp, tmp, tmp, &maxctx, status); - if (*status&MPD_Errors) goto nanresult; + if (*status&MPD_Errors) goto nanresult; if (_mpd_cmp(tmp, a) == 1) { u.exp += 1; @@ -7067,10 +7067,10 @@ _mpd_fix_sqrt(mpd_t *result, const mpd_t *a, mpd_t *tmp, } else { _mpd_qadd(tmp, result, &u, &maxctx, status); - if (*status&MPD_Errors) goto nanresult; + if (*status&MPD_Errors) goto nanresult; _mpd_qmul(tmp, tmp, tmp, &maxctx, status); - if (*status&MPD_Errors) goto nanresult; + if (*status&MPD_Errors) goto nanresult; if (_mpd_cmp(tmp, a) == -1) { u.exp += 1; diff --git a/Modules/_decimal/libmpdec/umodarith.h b/Modules/_decimal/libmpdec/umodarith.h index c062a1e..06cde0a 100644 --- a/Modules/_decimal/libmpdec/umodarith.h +++ b/Modules/_decimal/libmpdec/umodarith.h @@ -403,18 +403,18 @@ ppro_mulmod(mpd_uint_t a, mpd_uint_t b, double *dmod, uint32_t *dinvmod) mpd_uint_t retval; asm ( - "fildl %2\n\t" - "fildl %1\n\t" - "fmulp %%st, %%st(1)\n\t" - "fldt (%4)\n\t" - "fmul %%st(1), %%st\n\t" - "flds %5\n\t" - "fadd %%st, %%st(1)\n\t" - "fsubrp %%st, %%st(1)\n\t" - "fldl (%3)\n\t" - "fmulp %%st, %%st(1)\n\t" - "fsubrp %%st, %%st(1)\n\t" - "fistpl %0\n\t" + "fildl %2\n\t" + "fildl %1\n\t" + "fmulp %%st, %%st(1)\n\t" + "fldt (%4)\n\t" + "fmul %%st(1), %%st\n\t" + "flds %5\n\t" + "fadd %%st, %%st(1)\n\t" + "fsubrp %%st, %%st(1)\n\t" + "fldl (%3)\n\t" + "fmulp %%st, %%st(1)\n\t" + "fsubrp %%st, %%st(1)\n\t" + "fistpl %0\n\t" : "=m" (retval) : "m" (a), "m" (b), "r" (dmod), "r" (dinvmod), "m" (MPD_TWO63) : "st", "memory" @@ -433,24 +433,24 @@ ppro_mulmod2c(mpd_uint_t *a0, mpd_uint_t *a1, mpd_uint_t w, double *dmod, uint32_t *dinvmod) { asm ( - "fildl %2\n\t" - "fildl (%1)\n\t" - "fmul %%st(1), %%st\n\t" - "fxch %%st(1)\n\t" - "fildl (%0)\n\t" - "fmulp %%st, %%st(1) \n\t" - "fldt (%4)\n\t" - "flds %5\n\t" + "fildl %2\n\t" + "fildl (%1)\n\t" + "fmul %%st(1), %%st\n\t" + "fxch %%st(1)\n\t" + "fildl (%0)\n\t" + "fmulp %%st, %%st(1) \n\t" + "fldt (%4)\n\t" + "flds %5\n\t" "fld %%st(2)\n\t" - "fmul %%st(2)\n\t" - "fadd %%st(1)\n\t" - "fsub %%st(1)\n\t" - "fmull (%3)\n\t" + "fmul %%st(2)\n\t" + "fadd %%st(1)\n\t" + "fsub %%st(1)\n\t" + "fmull (%3)\n\t" "fsubrp %%st, %%st(3)\n\t" "fxch %%st(2)\n\t" - "fistpl (%0)\n\t" - "fmul %%st(2)\n\t" - "fadd %%st(1)\n\t" + "fistpl (%0)\n\t" + "fmul %%st(2)\n\t" + "fadd %%st(1)\n\t" "fsubp %%st, %%st(1)\n\t" "fmull (%3)\n\t" "fsubrp %%st, %%st(1)\n\t" @@ -472,36 +472,36 @@ ppro_mulmod2(mpd_uint_t *a0, mpd_uint_t b0, mpd_uint_t *a1, mpd_uint_t b1, double *dmod, uint32_t *dinvmod) { asm ( - "fildl %3\n\t" - "fildl (%2)\n\t" - "fmulp %%st, %%st(1)\n\t" - "fildl %1\n\t" - "fildl (%0)\n\t" - "fmulp %%st, %%st(1)\n\t" - "fldt (%5)\n\t" + "fildl %3\n\t" + "fildl (%2)\n\t" + "fmulp %%st, %%st(1)\n\t" + "fildl %1\n\t" + "fildl (%0)\n\t" + "fmulp %%st, %%st(1)\n\t" + "fldt (%5)\n\t" "fld %%st(2)\n\t" - "fmul %%st(1), %%st\n\t" - "fxch %%st(1)\n\t" - "fmul %%st(2), %%st\n\t" - "flds %6\n\t" - "fldl (%4)\n\t" - "fxch %%st(3)\n\t" - "fadd %%st(1), %%st\n\t" - "fxch %%st(2)\n\t" - "fadd %%st(1), %%st\n\t" - "fxch %%st(2)\n\t" - "fsub %%st(1), %%st\n\t" - "fxch %%st(2)\n\t" - "fsubp %%st, %%st(1)\n\t" - "fxch %%st(1)\n\t" - "fmul %%st(2), %%st\n\t" - "fxch %%st(1)\n\t" - "fmulp %%st, %%st(2)\n\t" - "fsubrp %%st, %%st(3)\n\t" - "fsubrp %%st, %%st(1)\n\t" - "fxch %%st(1)\n\t" - "fistpl (%2)\n\t" - "fistpl (%0)\n\t" + "fmul %%st(1), %%st\n\t" + "fxch %%st(1)\n\t" + "fmul %%st(2), %%st\n\t" + "flds %6\n\t" + "fldl (%4)\n\t" + "fxch %%st(3)\n\t" + "fadd %%st(1), %%st\n\t" + "fxch %%st(2)\n\t" + "fadd %%st(1), %%st\n\t" + "fxch %%st(2)\n\t" + "fsub %%st(1), %%st\n\t" + "fxch %%st(2)\n\t" + "fsubp %%st, %%st(1)\n\t" + "fxch %%st(1)\n\t" + "fmul %%st(2), %%st\n\t" + "fxch %%st(1)\n\t" + "fmulp %%st, %%st(2)\n\t" + "fsubrp %%st, %%st(3)\n\t" + "fsubrp %%st, %%st(1)\n\t" + "fxch %%st(1)\n\t" + "fistpl (%2)\n\t" + "fistpl (%0)\n\t" : : "r" (a0), "m" (b0), "r" (a1), "m" (b1), "r" (dmod), "r" (dinvmod), "m" (MPD_TWO63) @@ -518,20 +518,20 @@ ppro_mulmod(mpd_uint_t a, mpd_uint_t b, double *dmod, uint32_t *dinvmod) mpd_uint_t retval; __asm { - mov eax, dinvmod - mov edx, dmod + mov eax, dinvmod + mov edx, dmod fild b fild a - fmulp st(1), st - fld TBYTE PTR [eax] + fmulp st(1), st + fld TBYTE PTR [eax] fmul st, st(1) - fld MPD_TWO63 + fld MPD_TWO63 fadd st(1), st - fsubp st(1), st - fld QWORD PTR [edx] - fmulp st(1), st - fsubp st(1), st - fistp retval + fsubp st(1), st + fld QWORD PTR [edx] + fmulp st(1), st + fsubp st(1), st + fistp retval } return retval; @@ -547,32 +547,32 @@ ppro_mulmod2c(mpd_uint_t *a0, mpd_uint_t *a1, mpd_uint_t w, double *dmod, uint32_t *dinvmod) { __asm { - mov ecx, dmod - mov edx, a1 - mov ebx, dinvmod - mov eax, a0 + mov ecx, dmod + mov edx, a1 + mov ebx, dinvmod + mov eax, a0 fild w fild DWORD PTR [edx] fmul st, st(1) fxch st(1) fild DWORD PTR [eax] - fmulp st(1), st - fld TBYTE PTR [ebx] - fld MPD_TWO63 - fld st(2) + fmulp st(1), st + fld TBYTE PTR [ebx] + fld MPD_TWO63 + fld st(2) fmul st, st(2) fadd st, st(1) fsub st, st(1) fmul QWORD PTR [ecx] - fsubp st(3), st + fsubp st(3), st fxch st(2) - fistp DWORD PTR [eax] + fistp DWORD PTR [eax] fmul st, st(2) fadd st, st(1) - fsubrp st(1), st + fsubrp st(1), st fmul QWORD PTR [ecx] - fsubp st(1), st - fistp DWORD PTR [edx] + fsubp st(1), st + fistp DWORD PTR [edx] } } @@ -586,23 +586,23 @@ ppro_mulmod2(mpd_uint_t *a0, mpd_uint_t b0, mpd_uint_t *a1, mpd_uint_t b1, double *dmod, uint32_t *dinvmod) { __asm { - mov ecx, dmod - mov edx, a1 - mov ebx, dinvmod - mov eax, a0 + mov ecx, dmod + mov edx, a1 + mov ebx, dinvmod + mov eax, a0 fild b1 fild DWORD PTR [edx] - fmulp st(1), st + fmulp st(1), st fild b0 fild DWORD PTR [eax] - fmulp st(1), st - fld TBYTE PTR [ebx] - fld st(2) + fmulp st(1), st + fld TBYTE PTR [ebx] + fld st(2) fmul st, st(1) fxch st(1) fmul st, st(2) - fld DWORD PTR MPD_TWO63 - fld QWORD PTR [ecx] + fld DWORD PTR MPD_TWO63 + fld QWORD PTR [ecx] fxch st(3) fadd st, st(1) fxch st(2) @@ -610,16 +610,16 @@ ppro_mulmod2(mpd_uint_t *a0, mpd_uint_t b0, mpd_uint_t *a1, mpd_uint_t b1, fxch st(2) fsub st, st(1) fxch st(2) - fsubrp st(1), st + fsubrp st(1), st fxch st(1) fmul st, st(2) fxch st(1) - fmulp st(2), st - fsubp st(3), st - fsubp st(1), st + fmulp st(2), st + fsubp st(3), st + fsubp st(1), st fxch st(1) - fistp DWORD PTR [edx] - fistp DWORD PTR [eax] + fistp DWORD PTR [edx] + fistp DWORD PTR [eax] } } #endif /* PPRO MASM (_MSC_VER) */ |