Mesa (master): llvmpipe: add cc clobber to inline asm

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 22 21:35:06 UTC 2018


Module: Mesa
Branch: master
Commit: 2edf47edf08c63eb2b8f809a5be387d00da193e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2edf47edf08c63eb2b8f809a5be387d00da193e5

Author: Grazvydas Ignotas <notasas at gmail.com>
Date:   Wed Jul 25 20:27:48 2018 +0300

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 <sroland at vmware.com>

---

 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 cec6198ec6..1852ec05d5 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);




More information about the mesa-commit mailing list