X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2Fgmp%2Fmpz%2Ffdiv_r_2exp.c;h=081ce192032fbe4498f4832358b8f26596b83741;hb=867d096a2d598791d13d85c20bf37d0f4174a667;hp=d0cd03945f1cb08500deaf7773ec49c3b6e9cfe4;hpb=e72806f1683fc7acf7bd10885e8e45ff06d790f1;p=ghc-hetmet.git diff --git a/ghc/rts/gmp/mpz/fdiv_r_2exp.c b/ghc/rts/gmp/mpz/fdiv_r_2exp.c index d0cd039..081ce19 100644 --- a/ghc/rts/gmp/mpz/fdiv_r_2exp.c +++ b/ghc/rts/gmp/mpz/fdiv_r_2exp.c @@ -1,7 +1,7 @@ /* mpz_fdiv_r_2exp -- Divide a integer by 2**CNT and produce a remainder. -Copyright (C) 1991, 1993, 1994, 1995, 1998, 1999 Free Software Foundation, -Inc. +Copyright (C) 1991, 1993, 1994, 1995, 1998, 1999, 2000 Free Software +Foundation, Inc. This file is part of the GNU MP Library. @@ -83,10 +83,13 @@ mpz_fdiv_r_2exp (res, in, cnt) { /* Result should be 2^CNT - RES */ mpz_t tmp; + TMP_DECL (marker); + TMP_MARK (marker); MPZ_TMP_INIT (tmp, cnt/BITS_PER_MP_LIMB + 2); mpz_set_ui (tmp, 1L); mpz_mul_2exp (tmp, tmp, cnt); mpz_sub (res, tmp, res); + TMP_FREE (marker); } }