From: panne Date: Sun, 28 May 2000 20:22:08 +0000 (+0000) Subject: [project @ 2000-05-28 20:22:08 by panne] X-Git-Tag: Approximately_9120_patches~4363 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d4777922a2aa2c0a36ab34b9becd7d98575b0f82;p=ghc-hetmet.git [project @ 2000-05-28 20:22:08 by panne] Fixed gcdIntegerInt# primop, the previous macros was completely wrong. gcd for Integers worked only as long the corresponding RULE in PrelReal didn't fire. --- diff --git a/ghc/includes/PrimOps.h b/ghc/includes/PrimOps.h index 76f392a..bf9182b 100644 --- a/ghc/includes/PrimOps.h +++ b/ghc/includes/PrimOps.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.h,v 1.54 2000/05/12 20:01:28 panne Exp $ + * $Id: PrimOps.h,v 1.55 2000/05/28 20:22:08 panne Exp $ * * (c) The GHC Team, 1998-1999 * @@ -379,8 +379,8 @@ typedef union { : abs(b); \ } -#define gcdIntegerIntzh(r,a,sb,b) \ - RET_STGCALL3(StgInt, mpn_gcd_1, (unsigned long int *) b, sb, (mp_limb_t)(a)) +#define gcdIntegerIntzh(r,sa,a,b) \ + r = RET_STGCALL3(StgInt, mpn_gcd_1, (mp_limb_t *)(BYTE_ARR_CTS(a)), sa, b) /* The rest are all out-of-line: -------- */