Re: fat_init violates host ABI on Win64

2017-04-26 Thread Marco Bodrato
Ciao, Il Mer, 26 Aprile 2017 12:25 pm, Nicolas Hake ha scritto: > Torbjörn Granlund wrote: >> Where do we (unconditionally) rely on variable-length arrays? > > mpn/generic/sqrlo_basecase.c line 153, where SQRLO_BASECASE_ALLOC is a > non-constant expression by ultimately referencing

Re: fat_init violates host ABI on Win64

2017-04-26 Thread Nicolas Hake
Torbjörn Granlund wrote: Where do we (unconditionally) rely on variable-length arrays? mpn/generic/sqrlo_basecase.c line 153, where SQRLO_BASECASE_ALLOC is a non-constant expression by ultimately referencing CPUVEC_THRESHOLD if fat.h is included. mpn/generic/sqr_basecase.c line 170 has the

Re: fat_init violates host ABI on Win64

2017-04-25 Thread Niels Möller
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

Re: fat_init violates host ABI on Win64

2017-04-25 Thread Torbjörn Granlund
Nicolas Hake writes: the Windows x64 ABI requires callers to allocate a 32 byte "parameter area" before calling into a function, which the callee is allowed to use as it pleases[1]. fat_init does not do this before calling __gmpn_cpuvec_init, thus violating the ABI.

fat_init violates host ABI on Win64

2017-04-04 Thread Nicolas Hake
Dear GMP maintainers, the Windows x64 ABI requires callers to allocate a 32 byte "parameter area" before calling into a function, which the callee is allowed to use as it pleases[1]. fat_init does not do this before calling __gmpn_cpuvec_init, thus violating the ABI. This is not usually an