_mp_alloc vs ALLOC

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Fri Feb 24 09:21:46 CET 2012


Il Mer, 22 Febbraio 2012 8:32 pm, Torbjorn Granlund ha scritto:
> bodrato at mail.dm.unipi.it writes:
>   Unrelated :-) We might define more macros like TMP_ALLOC_LIMBS_2 . I

> Please look at the generated code from TMP_ALLOC from any reasonable
> compiler.  It is a sub from sp, the a copy from sp to the target
> variable.  Cost: about 1 cycle.

	sal	$3, %n
	cmpl	$65535, %n
	ja	.Lunlikelybranch
	add	$30, %n
	and	$-16, %n
	sub	%n, %esp

.Lunlikelybranchreturnshere



> TMP_ALLOC_LIMBS_2 is clutter IMHO.


-- 
http://bodrato.it/



More information about the gmp-devel mailing list