From a89a14ef5da44684a16b204e7a70460cc8c4922a Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 21 Jun 2024 23:36:36 +0200 Subject: Basic constant folding implementation --- vendor/gmp-6.3.0/mini-gmp/tests/hex-random.h | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 vendor/gmp-6.3.0/mini-gmp/tests/hex-random.h (limited to 'vendor/gmp-6.3.0/mini-gmp/tests/hex-random.h') diff --git a/vendor/gmp-6.3.0/mini-gmp/tests/hex-random.h b/vendor/gmp-6.3.0/mini-gmp/tests/hex-random.h new file mode 100644 index 0000000..da44347 --- /dev/null +++ b/vendor/gmp-6.3.0/mini-gmp/tests/hex-random.h @@ -0,0 +1,55 @@ +/* + +Copyright 2011, 2018 Free Software Foundation, Inc. + +This file is part of the GNU MP Library test suite. + +The GNU MP Library test suite is free software; you can redistribute it +and/or modify it under the terms of the GNU General Public License as +published by the Free Software Foundation; either version 3 of the License, +or (at your option) any later version. + +The GNU MP Library test suite is distributed in the hope that it will be +useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +Public License for more details. + +You should have received a copy of the GNU General Public License along with +the GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */ + +enum hex_random_op + { + OP_ADD, OP_SUB, OP_MUL, OP_SQR, + OP_CDIV, OP_FDIV, OP_TDIV, + OP_CDIV_Q_2, OP_CDIV_R_2, + OP_FDIV_Q_2, OP_FDIV_R_2, + OP_TDIV_Q_2, OP_TDIV_R_2, + OP_GCD, OP_LCM, OP_POWM, OP_AND, OP_IOR, OP_XOR, + OP_SETBIT, OP_CLRBIT, OP_COMBIT, + OP_SCAN0, OP_SCAN1, + }; + +void hex_random_init (void); +char *hex_urandomb (unsigned long bits); +char *hex_rrandomb (unsigned long bits); +char *hex_rrandomb_export (void *dst, size_t *countp, + int order, size_t size, int endian, + unsigned long bits); + +void hex_random_op2 (enum hex_random_op op, unsigned long maxbits, + char **ap, char **rp); +void hex_random_op3 (enum hex_random_op op, unsigned long maxbits, + char **ap, char **bp, char **rp); +void hex_random_op4 (enum hex_random_op op, unsigned long maxbits, + char **ap, char **bp, char **rp, char **qp); +void hex_random_bit_op (enum hex_random_op op, unsigned long maxbits, + char **ap, unsigned long *b, char **rp); +void hex_random_scan_op (enum hex_random_op op, unsigned long maxbits, + char **ap, unsigned long *b, unsigned long *r); +void hex_random_str_op (unsigned long maxbits, + int base, char **ap, char **rp); +void hex_random_lucm_op (unsigned long maxbits, + char **vp, char **qp, char **mp, + long *Q, unsigned long *b0, int *res); +void hex_mpq_random_str_op (unsigned long maxbits, + int base, char **ap, char **rp); -- cgit v1.2.3