OSDN Git Service

llvmpipe: add cc clobber to inline asm
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 25 Jul 2018 17:27:48 +0000 (20:27 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 22 Aug 2018 21:34:32 +0000 (00:34 +0300)
The bsr instruction modifies flags, so that needs to be indicated to the
compiler. No effect on generated code, but still needed for correctness.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/llvmpipe/lp_setup_tri.c

index cec6198..1852ec0 100644 (file)
@@ -734,7 +734,8 @@ floor_pot(uint32_t n)
 
    __asm__("bsr %1,%0"
           : "=r" (n)
-          : "rm" (n));
+          : "rm" (n)
+          : "cc");
    return 1 << n;
 #else
    n |= (n >>  1);