Advertisement
Guest User

BFGMiner 3.0.2 phatk 5800 patch

a guest
Jun 7th, 2013
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.56 KB | None | 0 0
  1. --- phatk121016.cl      2013-06-07 09:38:40.000000000 +0100
  2. +++ phatk121016-modified.cl     2013-06-07 10:41:05.000000000 +0100
  3. @@ -57,27 +57,12 @@
  4.  // SHA-256 Ch function, but provides it in exactly one instruction. If
  5.  // detected, use it for Ch. Otherwise, construct Ch out of simpler logical
  6.  // primitives.
  7. -
  8. - #ifdef BFI_INT
  9. -       // Well, slight problem... It turns out BFI_INT isn't actually exposed to
  10. -       // OpenCL (or CAL IL for that matter) in any way. However, there is
  11. -       // a similar instruction, BYTE_ALIGN_INT, which is exposed to OpenCL via
  12. -       // amd_bytealign, takes the same inputs, and provides the same output.
  13. -       // We can use that as a placeholder for BFI_INT and have the application
  14. -       // patch it after compilation.
  15.  
  16. -       // This is the BFI_INT function
  17. -       #define Ch(x, y, z) amd_bytealign(x,y,z)
  18. -       // Ma can also be implemented in terms of BFI_INT...
  19. -       #define Ma(z, x, y) amd_bytealign(z^x,y,x)
  20. - #else // BFI_INT
  21. -       // Later SDKs optimise this to BFI INT without patching and GCN
  22. -       // actually fails if manually patched with BFI_INT
  23. -
  24. -       #define Ch(x, y, z) bitselect((u)z, (u)y, (u)x)
  25. +       //We have an SDK which automatically optimizes to BFI INT, so lets do this
  26. +       #define Ch(x, y, z) bitselect(z, y, x)
  27.         #define Ma(x, y, z) bitselect((u)x, (u)y, (u)z ^ (u)x)
  28.         #define rotr(x, y) amd_bitalign((u)x, (u)x, (u)y)
  29. - #endif
  30. +
  31.  #else // BITALIGN
  32.         #define Ch(x, y, z) (z ^ (x & (y ^ z)))
  33.         #define Ma(x, y, z) ((x & z) | (y & (x | z)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement