Broad valgrind run

Torbjörn Granlund tg at gmplib.org
Tue Jun 9 11:55:44 UTC 2015


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

  What's the required alignment? x86/README refers to
  http://www.sco.com/developer/devspecs, which is mostly dead.
  
At function entry, esp mod 8 = 4 should hold.

This means that one should exlicitly allocate 4 (mod 8) bytes if one
makes a call.  Such allocation migbht be pushes or explicit esp
subtractions.  The call itself allocates 4 bytes for the return address.
If one doesn't allocate anything but need to make a call, an "add $-4,
%esp" is required.

Note that this is x86-32.  But the 64-bit ABI is similar in these
aspects.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list