From 2edf47edf08c63eb2b8f809a5be387d00da193e5 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Wed, 25 Jul 2018 20:27:48 +0300 Subject: [PATCH] llvmpipe: add cc clobber to inline asm 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 --- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index cec6198ec63..1852ec05d56 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -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); -- 2.30.2