X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/52cdaca9b7b8e15871a3de8b5b571c18dcc580f8..2e8eb64a72472bea4faba1cee5edde4fe3616808:/mpx.h diff --git a/mpx.h b/mpx.h index dc86cc9..b633e43 100644 --- a/mpx.h +++ b/mpx.h @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: mpx.h,v 1.11 2000/10/08 15:48:35 mdw Exp $ + * $Id: mpx.h,v 1.12 2001/04/03 19:36:05 mdw Exp $ * * Low level multiprecision arithmetic * @@ -30,6 +30,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: mpx.h,v $ + * Revision 1.12 2001/04/03 19:36:05 mdw + * Add some simple bitwise operations so that Perl can use them. + * * Revision 1.11 2000/10/08 15:48:35 mdw * Rename Karatsuba constants now that we have @gfx_kmul@ too. * @@ -304,6 +307,34 @@ extern void mpx_lsr(mpw */*dv*/, mpw */*dvl*/, const mpw */*av*/, const mpw */*avl*/, size_t /*n*/); +/*----- Bitwise operations ------------------------------------------------*/ + +/* --- @mpx_and@, @mpx_or@, @mpx_xor@, @mpx_not@ --- * + * + * Arguments: @mpw *dv, *dvl@ = destination vector + * @const mpw *av, *avl@ = first source vector + * @const mpw *bv, *bvl@ = second source vector + * + * Returns: --- + * + * Use; Does the obvious bitwise operations. + */ + +extern void mpx_and(mpw */*dv*/, mpw */*dvl*/, + const mpw */*av*/, const mpw */*avl*/, + const mpw */*bv*/, const mpw */*bvl*/); + +extern void mpx_or(mpw */*dv*/, mpw */*dvl*/, + const mpw */*av*/, const mpw */*avl*/, + const mpw */*bv*/, const mpw */*bvl*/); + +extern void mpx_xor(mpw */*dv*/, mpw */*dvl*/, + const mpw */*av*/, const mpw */*avl*/, + const mpw */*bv*/, const mpw */*bvl*/); + +extern void mpx_not(mpw */*dv*/, mpw */*dvl*/, + const mpw */*av*/, const mpw */*avl*/); + /*----- Unsigned arithmetic -----------------------------------------------*/ /* --- @mpx_2c@ --- *