mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 14:11:12 +00:00
target-m68k: fix bit operation with immediate value
M680x0 bit operations with an immediate value use 9 bits of the 16bit value, while coldfire ones use only 8 bits. Backports commit fe53c2be8c12da345bd788b949e0b2360e4b3db3 from qemu
This commit is contained in:
parent
6f5081314b
commit
b3c3cf84a5
|
@ -1836,9 +1836,16 @@ DISAS_INSN(bitop_im)
|
||||||
op = (insn >> 6) & 3;
|
op = (insn >> 6) & 3;
|
||||||
|
|
||||||
bitnum = read_im16(env, s);
|
bitnum = read_im16(env, s);
|
||||||
if (bitnum & 0xff00) {
|
if (m68k_feature(s->env, M68K_FEATURE_M68000)) {
|
||||||
disas_undef(env, s, insn);
|
if (bitnum & 0xfe00) {
|
||||||
return;
|
disas_undef(env, s, insn);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (bitnum & 0xff00) {
|
||||||
|
disas_undef(env, s, insn);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SRC_EA(env, src1, opsize, 0, op ? &addr: NULL);
|
SRC_EA(env, src1, opsize, 0, op ? &addr: NULL);
|
||||||
|
|
Loading…
Reference in a new issue