gallivm: Check whether to stop disassemble only for x86
authorOded Gabbay <oded.gabbay@gmail.com>
Thu, 18 Feb 2016 14:39:06 +0000 (16:39 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 18 Feb 2016 22:18:11 +0000 (00:18 +0200)
Because the if statement that checks whether we have a return
statement is valid only on x86, surround it with X86 or X86-64
arch defines

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp

index 7e98f1a513fe8e5ad58551a41c1379f38c9fa21a..efaf2fa306af51136965e6b63364ab99d54a2c48 100644 (file)
@@ -200,9 +200,11 @@ disassemble(const void* func, std::stringstream &buffer)
        * XXX: This currently assumes x86
        */
 
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
       if (Size == 1 && bytes[pc] == 0xc3) {
          break;
       }
+#endif
 
       /*
        * Advance.