TODO for 5.2 v3

Torbjorn Granlund tg at gmplib.org
Tue Jan 14 13:47:01 UTC 2014


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

  Another thing I was about to ask, but forgot, is use of volatile.
  
  I added it to the mpn_cnd_swap and mpn_sec_eq_ui prototypes, in an
  attempt to tell the compiler to not be too clever. But I'm not entirely
  sure where it is useful.
  
The volatile qualifier makes sure the number of memory reads and memory
writes remain unchanged from the source code.  This means that the
compiler is allowed to CSE them for code density, but not for speed.

But volatile has no meaning for non-pointers.

It would be nice with a non-branch keyword too.  Clerly, "static" would
be perfect for this.  :-)


Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list