x86: BT/BTS/BTR/BTC: ZF flag is unaffected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
Hello!
Bug was found in qemu.git.
See target-
case 0x1ba: /* bt/bts/btr/btc Gv, im */
ot = dflag + OT_WORD;
modrm = ldub_code(s->pc++);
op = (modrm >> 3) & 7;
mod = (modrm >> 6) & 3;
rm = (modrm & 7) | REX_B(s);
if (mod != 3) {
} else {
}
/* load shift */
val = ldub_code(s->pc++);
if (op < 4)
goto illegal_op;
op -= 4;
goto bt_op;
case 0x1a3: /* bt Gv, Ev */
op = 0;
goto do_btx;
case 0x1ab: /* bts */
op = 1;
goto do_btx;
case 0x1b3: /* btr */
op = 2;
goto do_btx;
case 0x1bb: /* btc */
op = 3;
do_btx:
ot = dflag + OT_WORD;
modrm = ldub_code(s->pc++);
reg = ((modrm >> 3) & 7) | rex_r;
mod = (modrm >> 6) & 3;
rm = (modrm & 7) | REX_B(s);
if (mod != 3) {
/* specific case: we need to add a displacement */
} else {
}
bt_op:
switch(op) {
case 0:
break;
case 1:
break;
case 2:
break;
default:
case 3:
break;
}
s->cc_op = CC_OP_SARB + ot;
if (op != 0) {
if (mod != 3)
else
}
break;
always set zf...
There is fixed patch.
It would be helpful if you could submit patches in line with the guidance documented on the wiki: wiki.qemu. org/Contribute/ SubmitAPatch
http://
In particular, patches should be sent to the mailing list in the right format, and we cannot apply any patch without a signed-off-by line.
Thanks.