diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-10-09 12:08:25 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-10-09 12:12:59 +0100 |
commit | 53d7f5e107b82550024a57232f3333d2f76e39de (patch) | |
tree | 2beb7d4977402089cd11d921486d933090d62220 /src/gallium/auxiliary/gallivm/lp_bld_debug.c | |
parent | edba53024f85a27fcbca7cbe139ceda172406653 (diff) |
gallivm: Handle code have ret correctly.
Stop disassembling on unconditional backwards jumps.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_debug.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_debug.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.c b/src/gallium/auxiliary/gallivm/lp_bld_debug.c index d3a5afff8c..8c1df0d8e3 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; } |