Skip to content
Snippets Groups Projects
Commit 6fc6e3a5 authored by psychocrypt's avatar psychocrypt
Browse files

fix AMD driver 14

Fix the fix from #1945. The initial fix produces invalid results.
parent 2a0d565b
No related branches found
No related tags found
No related merge requests found
......@@ -79,8 +79,10 @@ inline uint2 fast_div_v2(const __local uint *RCP, ulong a, uint b)
* https://github.com/fireice-uk/xmr-stak/issues/1922
* This is a workaround for the broken compiler.
*/
const long xx = k - a;
((uint*)&q)[1] = (xx < 0) ? 1U : 0U;
ulong whyAMDwhy;
((uint*)&whyAMDwhy)[0] = as_uint2(k).s0;
((uint*)&whyAMDwhy)[1] = as_uint2(k).s1;
((uint*)&q)[1] = (whyAMDwhy < a) ? 1U : 0U;
#else
((uint*)&q)[1] = (k < a) ? 1U : 0U;
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment