1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 04:24:11 +01:00

[dxvk] Fix tzcnt return value when source value is 0

This commit is contained in:
Philip Rebohle 2018-07-09 13:31:34 +02:00
parent 2caf346fbb
commit 2aa6b04fd9
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -29,8 +29,8 @@ namespace dxvk::bit {
uint32_t res; uint32_t res;
uint32_t tmp; uint32_t tmp;
asm ( asm (
"xor %1, %1;" "mov $32, %1;"
"bsf %2, %0;" "bsf %2, %0;"
"cmovz %1, %0;" "cmovz %1, %0;"
: "=&r" (res), "=&r" (tmp) : "=&r" (res), "=&r" (tmp)
: "r" (n)); : "r" (n));