mirror of
https://github.com/qemu/qemu.git
synced 2024-11-26 21:33:40 +08:00
Fix division by zero handling, by Joris van Rantwijk.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3012 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
e034e2c39a
commit
b6d7c3db4f
@ -5327,8 +5327,12 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
|
||||
if (CODE64(s))
|
||||
goto illegal_op;
|
||||
val = ldub_code(s->pc++);
|
||||
gen_op_aam(val);
|
||||
s->cc_op = CC_OP_LOGICB;
|
||||
if (val == 0) {
|
||||
gen_exception(s, EXCP00_DIVZ, pc_start - s->cs_base);
|
||||
} else {
|
||||
gen_op_aam(val);
|
||||
s->cc_op = CC_OP_LOGICB;
|
||||
}
|
||||
break;
|
||||
case 0xd5: /* aad */
|
||||
if (CODE64(s))
|
||||
|
Loading…
Reference in New Issue
Block a user