summaryrefslogtreecommitdiff
path: root/m68k_core_x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'm68k_core_x86.c')
-rw-r--r--m68k_core_x86.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/m68k_core_x86.c b/m68k_core_x86.c
index d3ee4b6..ee2d6e2 100644
--- a/m68k_core_x86.c
+++ b/m68k_core_x86.c
@@ -1588,6 +1588,11 @@ void translate_m68k_bit(m68k_options *opts, m68kinst *inst, host_ea *src_op, hos
and_ir(code, 7, src_op->base, SZ_D);
size = SZ_D;
}
+ if (dst_op->mode == MODE_IMMED) {
+ dst_op->base = src_op->base == opts->gen.scratch1 ? opts->gen.scratch2 : opts->gen.scratch1;
+ mov_ir(code, dst_op->disp, dst_op->base, SZ_B);
+ dst_op->mode = MODE_REG_DIRECT;
+ }
if (dst_op->mode == MODE_REG_DIRECT) {
op_rr(code, inst, src_op->base, dst_op->base, size);
} else {