ecrypt_machine.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* ecrypt_machine.h */
  2. /*
  3. * This file is included by 'ecrypt_portable.h'. It allows to override
  4. * the default macros for specific platforms. Please carefully check
  5. * the machine code generated by your compiler (with optimisations
  6. * turned on) before deciding to edit this file.
  7. */
  8. /* ------------------------------------------------------------------------- */
  9. #if(defined(ECRYPT_DEFAULT_ROT) && !defined(ECRYPT_MACHINE_ROT))
  10. #define ECRYPT_MACHINE_ROT
  11. #if(defined(WIN32) && defined(_MSC_VER))
  12. #undef ROTL32
  13. #undef ROTR32
  14. #undef ROTL64
  15. #undef ROTR64
  16. #include <stdlib.h>
  17. #pragma intrinsic(_lrotl) /* compile rotations "inline" */
  18. #pragma intrinsic(_lrotr)
  19. #define ROTL32(v, n) _lrotl(v, n)
  20. #define ROTR32(v, n) _lrotr(v, n)
  21. #define ROTL64(v, n) _rotl64(v, n)
  22. #define ROTR64(v, n) _rotr64(v, n)
  23. #endif
  24. #endif
  25. /* ------------------------------------------------------------------------- */
  26. #if(defined(ECRYPT_DEFAULT_SWAP) && !defined(ECRYPT_MACHINE_SWAP))
  27. #define ECRYPT_MACHINE_SWAP
  28. /*
  29. * If you want to overwrite the default swap macros, put it here. And so on.
  30. */
  31. #endif
  32. /* ------------------------------------------------------------------------- */