diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-12-17 22:24:14 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-12-17 22:24:14 -0800 |
commit | 7f923f49a38c7c1f862fcb3bd2d07aa012c1e877 (patch) | |
tree | e6cfc9bcefea5613a1057d56a2f1ff466427b9ac /libcpu | |
parent | b61a4149e6263d3d9d0afdc636e19955f580be55 (diff) | |
download | elfutils-7f923f49a38c7c1f862fcb3bd2d07aa012c1e877.tar.gz |
(i386_disasm): If instruction matches prefix, undoing the prefix match
finishes the instruction.
Diffstat (limited to 'libcpu')
-rw-r--r-- | libcpu/i386_disasm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c index 843fd749..b676216a 100644 --- a/libcpu/i386_disasm.c +++ b/libcpu/i386_disasm.c @@ -351,13 +351,12 @@ i386_disasm (const uint8_t **startp, const uint8_t *end, GElf_Addr addr, opoff = 8; curr += 2; - assert (avail > 0); assert (last_prefix_bit != 0); correct_prefix = last_prefix_bit; } - do + while (avail > 0) { uint_fast8_t masked = *codep++ & *curr++; if (masked != *curr++) @@ -367,7 +366,6 @@ i386_disasm (const uint8_t **startp, const uint8_t *end, GElf_Addr addr, if (codep == end && avail > 0) goto do_ret; } - while (avail > 0); if (avail != 0) { |