summaryrefslogtreecommitdiff
path: root/gmp-impl.h
Commit message (Collapse)AuthorAgeFilesLines
* * gmp-h.in, mp-h.in, gmp-impl.h: __GMP_DECLSPEC at start ofKevin Ryde2001-12-071-4/+4
| | | | prototypes, for the benefit of Microsoft C.
* More of:Kevin Ryde2001-11-211-7/+0
| | | | | | | | * scanf/doscan.c, scanf/fscanf.c, scanf/fscanffuns.c, scanf/scanf.c, scanf/sscanf.c, scanf/sscanffuns.c, scanf/vfscanf.c, scanf/vscanf.c, scanf/vsscanf.c, scanf/Makefile.am, tests/misc/t-scanf.c: New files. gmp_doscan_params_t only needed in doscan.c
* * tal-debug.c, gmp-impl.h: More checks of TMP_DECL/TMP_MARK/TMP_FREEKevin Ryde2001-11-191-11/+42
| | | | consistency.
* * gmp-impl.h: Move C++ <string> to top of file to avoid the memsetKevin Ryde2001-11-171-3/+3
| | | | | | | | | redefine upsetting configure tests. Remove <iostream> since <iosfwd> in gmp.h suffices. The memset problem doesn't arise in normal circumstances, only when trying something silly like CC=g++, but it does seem better to avoid any problems if gmp-impl.h is ever used in C++ configure tests.
* * gmp-impl.h, gmp-h.in (__gmp_default_fp_limb_precision): Move back toKevin Ryde2001-11-171-0/+2
| | | | gmp-impl.h now not required for inlined mpf.
* (ASSERT_CARRY): New macro.Kevin Ryde2001-11-171-4/+7
|
* * randdef.c (gmp_randinit_default): New file.Kevin Ryde2001-11-171-4/+5
| | | | * gmp-impl.h (RANDS): Use it.
* * gmp-impl.h (__gmp_replacement_vsnprintf): Add prototype.Kevin Ryde2001-11-151-0/+2
|
* * scanf/doscan.c, scanf/fscanf.c, scanf/fscanffuns.c, scanf/scanf.c,Kevin Ryde2001-11-151-1/+27
| | | | | | | scanf/sscanf.c, scanf/sscanffuns.c, scanf/vfscanf.c, scanf/vscanf.c, scanf/vsscanf.c, scanf/Makefile.am, tests/misc/t-scanf.c: New files. * gmp-h.in, gmp-impl.h, Makefile.am, configure.in: Consequent additions.
* * gmp-impl.h (__gmp_rands, __gmp_rands_initialized,Kevin Ryde2001-11-151-4/+4
| | | | | modlimb_invert_table): Add __GMP_DECLSPEC for the benefit of test programs using them from a windows DLL.
* * gmp-h.in, gmp-impl.h, mpf/abs.c, mpf/neg.c, mpf/get_prc.c,Kevin Ryde2001-11-071-0/+11
| | | | | | | mpf/get_dfl_prec.c, mpf/set_dfl_prec.c, mpf/set_prc_raw.c, mpf/set_si.c, mpf/set_ui.c, mpf/size.c: Revert mpf inlining, in order to leave open the possibility of keeping binary compatibility if mpf becomes mpfr.
* (MPN_COPY_INCR): Prepend local variable by `__'.tege2001-11-061-6/+6
| | | | (MPN_COPY_DECR): Likewise.
* * gmp-impl.h (ASSERT_MPQ_CANONICAL): New macro.Kevin Ryde2001-10-301-0/+27
|
* More of:Kevin Ryde2001-10-271-1/+1
| | | | | * gmp-impl.h, mpn/asm-defs.m4, configure.in, tune/speed.c, tune/speed.h, tune/many.pl, tests/devel/try.c: Add mpn_mod_34lsub1.
* * gmp-impl.h, mpn/asm-defs.m4, configure.in, tune/speed.c,Kevin Ryde2001-10-271-0/+3
| | | | tune/speed.h, tune/many.pl, tests/devel/try.c: Add mpn_mod_34lsub1.
* * printf/doprnti.c: Use the precision field to print leading zeros.Kevin Ryde2001-10-241-4/+9
| | | | | | * cxx/osdoprnti.cc, gmp-impl.h: Ignore precision in operator<<. * gmp-impl.h (modlimb_invert): More comments.
* * gmp-impl.h (gmp_allocated_string): No need for inline on member funs.Kevin Ryde2001-10-171-2/+2
|
* Amend to:Kevin Ryde2001-10-111-1/+1
| | | | | * tal-notreent.c: Renamed from stack-alloc.c. * Makefile.am, acinclude.m4, gmp-impl.h: Update.
* * tal-notre.c: Renamed from stack-alloc.c.Kevin Ryde2001-10-111-1/+1
| | | | * Makefile.am, acinclude.m4, gmp-impl.h: Update.
* * gmp-h.in, gmp-impl.h: Use #includes to get necessary standardKevin Ryde2001-10-101-7/+6
| | | | classes, add std:: to prototypes.
* Declare class string.tege2001-10-091-0/+1
|
* 2001-10-09 Gerardo Ballabio <ballabio@sissa.it>Kevin Ryde2001-10-091-0/+3
| | | | | * cxx/isfuns.cc: New file. * gmp-impl.h: Add prototypes.
* * gmp-impl.h (doprnt_format_t, doprnt_memory_t, doprnt_reps_t,Kevin Ryde2001-10-081-4/+4
| | | | | | doprnt_final_t): Use _PROTO. For the benefit of K&R compilers.
* Implement separate MPN_COPY_INCR and MPN_COPY_DECR macros for CRAY systems.tege2001-10-031-17/+20
| | | | (CRAY _MPN_COPY): Delete.
* * cxx/Makefile.am, cxx/Makefile.in, cxx/osdoprnti.cc, cxx/osfuns.cc,Kevin Ryde2001-10-011-0/+18
| | | | | cxx/osmpf.cc, cxx/osmpq.cc, cxx/osmpz.cc: New files. * gmp-h.in, gmp-impl.h: Prototypes and support.
* * gmp-impl.h (struct gmp_asprintf_t): Moved from printf/vasprintf.c.Kevin Ryde2001-10-011-1/+42
| | | | | | | | | | | (GMP_ASPRINTF_T_INIT): New macro. (GMP_ASPRINTF_T_NEED): New macro, adapted from vasprintf.c NEED(). * printf/vasprintf.c: Use these. * printf/asprntffuns.c, printf/vasprintf.c, gmp-impl.h (__gmp_asprintf_memory, __gmp_asprintf_reps, __gmp_asprintf_final): Move to asprntffuns.c, rename to __gmp and make global, remove spurious formal parameters from __gmp_asprintf_final.
* * gmp-impl.h, doprnt.c (va_copy): Move to gmp-impl.h.Kevin Ryde2001-09-261-0/+10
|
* * gmp-impl.h (popc_limb): New macro, adapted from mpn/generic/popham.c.Kevin Ryde2001-09-081-0/+78
| | | | For 64-bits reuse 0x33...33 constant.
* * gmp-impl.h (union ieee_double_extract) [m68k]: Use longs, since intKevin Ryde2001-09-021-4/+22
| | | | might be only 16 bits.
* * configure.in, acconfig.h (HAVE_HOST_CPU_FAMILY_power,Kevin Ryde2001-08-281-10/+19
| | | | | | | | HAVE_HOST_CPU_FAMILY_powerpc, HAVE_HOST_CPU_FAMILY_x86): AC_DEFINEs for processor families. * gmp-impl.h: Use them, rather than cpp defines. * mpz/inp_str.c, gmp-impl.h (__gmpz_inp_str_nowhite): New function.
* * configure.in, acinclude.m4, Makefile.am, printf/Makefile.am,Kevin Ryde2001-08-171-40/+21
| | | | | | | | | | | tests/printf/Makefile.am, gmp-h.in, gmp-impl.h, gmp.texi: Remove C++ support, for the time being. * printf/doprnt.c printf/doprntf.c, gmp-impl.h: Use a single __gmp_doprnt_mpf, rather than a separate ndigits calculation. * gmp-impl.h, mpf/get_str.c (MPF_SIGNIFICANT_DIGITS): New macro, extracted from mpf/get_str.c.
* * gmp-h.in, gmp-impl.h (_gmp_rand): Move prototype to gmp-impl.h.Kevin Ryde2001-07-311-8/+24
| | | | And amend a couple of comments.
* * gmp-h.in, gmp-impl.h: Additions for gmp_printf etc.Kevin Ryde2001-07-231-0/+161
|
* * gmp-impl.h (__GMP_REALLOCATE_FUNC_MAYBE): New macro.Kevin Ryde2001-07-231-13/+11
| | | | | | | | * gmp-impl.h (mpn_fib2_ui): Use __MPN. (MPN_COPY_DECR): Fix an ASSERT. (CAST_TO_VOID): Remove macro. CAST_TO_VOID was a dumb idea, everywhere else uses void unconditionally.
* * gmp-h.in, gmp-impl.h, acinclude.m4: Remove __GMP_ASM_L andKevin Ryde2001-07-171-1/+13
| | | | | __GMP_LSYM_PREFIX, revert to ASM_L in gmp-impl.h and AC_DEFINE of LSYM_PREFIX.
* * gmp-h.in (__GMPN_COPY): Add form to help gcc on power and powerpc.Kevin Ryde2001-07-101-14/+82
| | | | * gmp-impl.h (MPN_COPY_INCR, MPN_COPY_DECR, MPN_ZERO): Ditto.
* More of:Kevin Ryde2001-07-101-7/+9
| | | | * gmp-impl.h (MPN_NORMALIZE): Add notes on x86 repe/scasl slow.
* * errno.c, gmp-impl.h (__gmp_exception, __gmp_divide_by_zero,Kevin Ryde2001-07-101-3/+6
| | | | | | | | | __gmp_sqrt_of_negative): New functions. * gmp-impl.h (GMP_ERROR, DIVIDE_BY_ZERO, SQRT_OF_NEGATIVE): Use them. This should reduce code size in functions raising exceptions, and stop them having to reference global variables thus perhaps avoiding GOT setups for PIC etc.
* * gmp-impl.h (MPN_NORMALIZE): Add notes on x86 repe/scasl slow.Kevin Ryde2001-07-061-7/+11
|
* * gmp-h.in, mp-h.in, gmp-impl.h (_EXTERN_INLINE): Remove, unused.Kevin Ryde2001-07-061-18/+1
|
* * gmp-impl.h (DIVEXACT_1_THRESHOLD): Make the default 0 whenKevin Ryde2001-07-011-4/+3
| | | | 2*UMUL_TIME < UDIV_TIME.
* * gmp-impl.h (MPN_TOOM3_MUL_N_MINSIZE, MPN_TOOM3_SQR_N_MINSIZE):Kevin Ryde2001-06-291-16/+25
| | | | | | | Corrections to these to account for adding tD into E. (MPN_INCR_U, MPN_DECR_U) [WANT_ASSERT]: Add size assertions, since mpn_add_1 and mpn_sub_1 from gmp.h don't get them. (MPN_DIVREM_OR_DIVEXACT_1): Add an assert of no remainder.
* Reformat i386 MPN_IORD_U for readability of the register inputs andKevin Ryde2001-06-231-24/+29
| | | | outputs.
* * gmp-impl.h (modlimb_invert): Mask after shifting, so mask constantKevin Ryde2001-06-231-4/+4
| | | | fits a signed byte.
* Missing parameter in:Kevin Ryde2001-06-201-1/+1
| | | | | * gmp-impl.h (WANT_TMP_NOTREENTRANT): Move global parts of stack-alloc.h to here, allow non power-of-2 __TMP_ALIGN in TMP_ALLOC.
* More of:Kevin Ryde2001-06-201-3/+23
| | | | | * configure.in, Makefile.am, gmp-impl.h: Add a debugging TMP_ALLOC, selected with --enable-alloca=debug.
* * gmp-h.in (__GMP_ASM_L): New macro.Kevin Ryde2001-06-191-13/+1
| | | | * gmp-impl.h (ASM_L): Use it.
* * acinclude.m4, configure.in (GMP_C_ATTRIBUTE_MALLOC): New macro.Kevin Ryde2001-06-191-36/+107
| | | | | | | | | | | | * gmp-impl.h: Use it for all the malloc based TMP_ALLOCs. * gmp-impl.h (__TMP_ALIGN): Moved from stack-alloc.c, use a union to determine the value, and demand only 4 bytes align on 32-bit systems. * gmp-impl.h (WANT_TMP_NOTREENTRANT): Move global parts of stack-alloc.h to here, allow non power-of-2 __TMP_ALIGN in TMP_ALLOC. * gmp-impl.h: Extend extern "C" to TMP_ALLOC declarations. * gmp-impl.h (TMP_ALLOC_LIMBS_2): New macro.
* * configure.in, Makefile.am, gmp-impl.h: Add a debugging TMP_ALLOC,Kevin Ryde2001-06-171-11/+45
| | | | | | | selected with --enable-alloca=debug. Right at this moment mpfr agm.c, sqrt.c and exp.c have trouble with this method, but gmp as such passes.
* * gmp-impl.h (__builtin_constant_p): Add dummy for non-gcc.Kevin Ryde2001-06-121-14/+40
| | | | | | | | | | | (mpn_incr_u, mpn_decr_u): Recognise incr==1 at compile time in the generic code on gcc. If gcc was extremely smart it could detect that incr==1 ends up with pretty much the same chunk of code before and within the mpn_incr_u loop, and merge them itself, but I guess one wouldn't want it wasting time looking for such unlikely optimizations. Give it a helping hand instead.