fat_init violates host ABI on Win64

Torbjörn Granlund tg at gmplib.org
Tue Apr 25 20:07:00 UTC 2017

nisse at lysator.liu.se (Niels Möller) writes:

  I wonder if one could use some m4 macrology to reduce clutter. Maybe
  one macro for the pattern
  IFSTD(`	sub	$8, %rsp	')
  IFDOS(`	sub	$40, %rsp	')
  	ASSERT(nz, `test $15, %rsp')
  	CALL(	mpn_add_n)
  IFSTD(`	add	$8, %rsp	')
  IFDOS(`	add	$40, %rsp	')
  used when it's known that rsp = 8 (mod 16), and another one when it's
  known that rsp = 0 (mod 16).
  There seems to be a few uses of CALL that want to do this differently,
  though, e.g., gcd_1.asm, maybe it would also help to move (and rename)
  its conditional definition of STACK_ALLOC.
One could consider more advanced stack frame management.  Incorporating
stack adjustments in the CALL macro might make sense, but then other
stack allocation (push and direct sub X,%rsp) needs to be taken into
account, and ideally any direct allocation should incorporate allignment
with adjustments in CALL then suppressed.

I haven't bothered with this since only a handful functions perform

Please encrypt, key id 0xC8601622

More information about the gmp-bugs mailing list