From: José Fonseca Date: Sat, 9 Oct 2010 11:08:25 +0000 (+0100) Subject: gallivm: Handle code have ret correctly. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53d7f5e107b82550024a57232f3333d2f76e39de;p=mesa.git gallivm: Handle code have ret correctly. Stop disassembling on unconditional backwards jumps. --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.c b/src/gallium/auxiliary/gallivm/lp_bld_debug.c index d3a5afff8c2..8c1df0d8e30 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.c @@ -115,8 +115,10 @@ lp_disassemble(const void* func) } } - if ((ud_insn_off(&ud_obj) >= max_jmp_pc && ud_obj.mnemonic == UD_Iret) || - ud_obj.mnemonic == UD_Iinvalid) + if (ud_obj.mnemonic == UD_Iinvalid || + (ud_insn_off(&ud_obj) >= max_jmp_pc && + (ud_obj.mnemonic == UD_Iret || + ud_obj.mnemonic == UD_Ijmp))) break; }