Win64 and GMP

Myria myriachan at
Mon Dec 25 23:09:59 CET 2006

Currently, there is no Win64 (x86-64) build of GMP, and from the current 
situation, it would be difficult to make one.

As far as I know, the only compilers and assemblers that can do Win64 are 
Microsoft's and Intel's.  GAS can do x86-64 obviously, but it cannot 
currently do the mandatory function markup required by Win64 (the ".pdata" 
section).  GCC is a bigger problem - its x86-64 compiler assumes that all 
code is below 2 GB, an incorrect assumption on Win64.  (The correct 
assumption for Win64 is that a single module - EXE or DLL - is smaller than 
2 GB, but modules can be anywhere.)

I think with considerable work, GMP could be ported to Visual Studio. 
Probably the easiest way would be to use Cygwin so the scripts work, and 
modify the scripts to use different compiler options.  Not fun.

For the assembly code, it's probably possible to use some script to 
translate the code to Intel syntax and insert the necessary markup required 
for MASM 64.  I don't know what m4 is.

Has GMP been ported to Visual Studio before?


More information about the gmp-devel mailing list