/*
* m68k micro operations
- *
+ *
* Copyright (c) 2006-2007 CodeSourcery
* Written by Paul Brook
*
OP(flush_flags)
{
- int cc_op = PARAM1;
- if (cc_op == CC_OP_DYNAMIC)
- cc_op = env->cc_op;
- cpu_m68k_flush_flags(env, cc_op);
+ cpu_m68k_flush_flags(env, env->cc_op);
FORCE_RET();
}
uint32_t quot;
uint32_t rem;
uint32_t flags;
-
+
num = env->div1;
den = env->div2;
/* ??? This needs to make sure the throwing location is accurate. */
int32_t quot;
int32_t rem;
int32_t flags;
-
+
num = env->div1;
den = env->div2;
if (den == 0)
FORCE_RET();
}
+OP(set_sr)
+{
+ env->sr = get_op(PARAM1) & 0xffff;
+ m68k_switch_sp(env);
+ FORCE_RET();
+}
+
OP(jmp)
{
GOTO_LABEL_PARAM(1);
}
-/* These ops involve a function call, which probably requires a stack frame
- and breaks things on some hosts. */
-OP(jmp_z32)
+OP(set_T0_z32)
{
uint32_t arg = get_op(PARAM1);
- if (arg == 0)
- GOTO_LABEL_PARAM(2);
+ T0 = (arg == 0);
FORCE_RET();
}
-OP(jmp_nz32)
+OP(set_T0_nz32)
{
uint32_t arg = get_op(PARAM1);
- if (arg != 0)
- GOTO_LABEL_PARAM(2);
+ T0 = (arg != 0);
FORCE_RET();
}
-OP(jmp_s32)
+OP(set_T0_s32)
{
int32_t arg = get_op(PARAM1);
- if (arg < 0)
- GOTO_LABEL_PARAM(2);
+ T0 = (arg > 0);
FORCE_RET();
}
-OP(jmp_ns32)
+OP(set_T0_ns32)
{
int32_t arg = get_op(PARAM1);
- if (arg >= 0)
- GOTO_LABEL_PARAM(2);
+ T0 = (arg >= 0);
+ FORCE_RET();
+}
+
+OP(jmp_T0)
+{
+ if (T0)
+ GOTO_LABEL_PARAM(1);
FORCE_RET();
}