#include "fop_template.c"
#undef FTN
-void op_dup_T0 (void)
-{
- T2 = T0;
- FORCE_RET();
-}
-
void op_load_HI (void)
{
- T0 = env->HI[PARAM1][env->current_tc];
+ T0 = env->HI[env->current_tc][PARAM1];
FORCE_RET();
}
void op_store_HI (void)
{
- env->HI[PARAM1][env->current_tc] = T0;
+ env->HI[env->current_tc][PARAM1] = T0;
FORCE_RET();
}
void op_load_LO (void)
{
- T0 = env->LO[PARAM1][env->current_tc];
+ T0 = env->LO[env->current_tc][PARAM1];
FORCE_RET();
}
void op_store_LO (void)
{
- env->LO[PARAM1][env->current_tc] = T0;
+ env->LO[env->current_tc][PARAM1] = T0;
FORCE_RET();
}
void op_div (void)
{
if (T1 != 0) {
- env->LO[0][env->current_tc] = (int32_t)((int64_t)(int32_t)T0 / (int32_t)T1);
- env->HI[0][env->current_tc] = (int32_t)((int64_t)(int32_t)T0 % (int32_t)T1);
+ env->LO[env->current_tc][0] = (int32_t)((int64_t)(int32_t)T0 / (int32_t)T1);
+ env->HI[env->current_tc][0] = (int32_t)((int64_t)(int32_t)T0 % (int32_t)T1);
}
FORCE_RET();
}
void op_divu (void)
{
if (T1 != 0) {
- env->LO[0][env->current_tc] = (int32_t)((uint32_t)T0 / (uint32_t)T1);
- env->HI[0][env->current_tc] = (int32_t)((uint32_t)T0 % (uint32_t)T1);
+ env->LO[env->current_tc][0] = (int32_t)((uint32_t)T0 / (uint32_t)T1);
+ env->HI[env->current_tc][0] = (int32_t)((uint32_t)T0 % (uint32_t)T1);
}
FORCE_RET();
}
void op_ddivu (void)
{
if (T1 != 0) {
- env->LO[0][env->current_tc] = T0 / T1;
- env->HI[0][env->current_tc] = T0 % T1;
+ env->LO[env->current_tc][0] = T0 / T1;
+ env->HI[env->current_tc][0] = T0 % T1;
}
FORCE_RET();
}
static always_inline uint64_t get_HILO (void)
{
- return ((uint64_t)env->HI[0][env->current_tc] << 32) |
- ((uint64_t)(uint32_t)env->LO[0][env->current_tc]);
+ return ((uint64_t)env->HI[env->current_tc][0] << 32) |
+ ((uint64_t)(uint32_t)env->LO[env->current_tc][0]);
}
static always_inline void set_HILO (uint64_t HILO)
{
- env->LO[0][env->current_tc] = (int32_t)(HILO & 0xFFFFFFFF);
- env->HI[0][env->current_tc] = (int32_t)(HILO >> 32);
+ env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF);
+ env->HI[env->current_tc][0] = (int32_t)(HILO >> 32);
}
static always_inline void set_HIT0_LO (uint64_t HILO)
{
- env->LO[0][env->current_tc] = (int32_t)(HILO & 0xFFFFFFFF);
- T0 = env->HI[0][env->current_tc] = (int32_t)(HILO >> 32);
+ env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF);
+ T0 = env->HI[env->current_tc][0] = (int32_t)(HILO >> 32);
}
static always_inline void set_HI_LOT0 (uint64_t HILO)
{
- T0 = env->LO[0][env->current_tc] = (int32_t)(HILO & 0xFFFFFFFF);
- env->HI[0][env->current_tc] = (int32_t)(HILO >> 32);
+ T0 = env->LO[env->current_tc][0] = (int32_t)(HILO & 0xFFFFFFFF);
+ env->HI[env->current_tc][0] = (int32_t)(HILO >> 32);
}
void op_mult (void)
#if defined(TARGET_MIPS64)
void op_dmult (void)
{
- CALL_FROM_TB4(muls64, &(env->LO[0][env->current_tc]), &(env->HI[0][env->current_tc]), T0, T1);
+ CALL_FROM_TB4(muls64, &(env->LO[env->current_tc][0]), &(env->HI[env->current_tc][0]), T0, T1);
FORCE_RET();
}
void op_dmultu (void)
{
- CALL_FROM_TB4(mulu64, &(env->LO[0][env->current_tc]), &(env->HI[0][env->current_tc]), T0, T1);
+ CALL_FROM_TB4(mulu64, &(env->LO[env->current_tc][0]), &(env->HI[env->current_tc][0]), T0, T1);
FORCE_RET();
}
#endif
void op_movn (void)
{
if (T1 != 0)
- env->gpr[PARAM1][env->current_tc] = T0;
+ env->gpr[env->current_tc][PARAM1] = T0;
FORCE_RET();
}
void op_movz (void)
{
if (T1 == 0)
- env->gpr[PARAM1][env->current_tc] = T0;
+ env->gpr[env->current_tc][PARAM1] = T0;
FORCE_RET();
}
/* Branch to register */
void op_save_breg_target (void)
{
- env->btarget = T2;
- FORCE_RET();
-}
-
-void op_restore_breg_target (void)
-{
- T2 = env->btarget;
+ env->btarget = T1;
FORCE_RET();
}
void op_breg (void)
{
- env->PC[env->current_tc] = T2;
+ env->PC[env->current_tc] = env->btarget;
FORCE_RET();
}
/* Conditional branch */
void op_set_bcond (void)
{
- T2 = T0;
- FORCE_RET();
-}
-
-void op_save_bcond (void)
-{
- env->bcond = T2;
- FORCE_RET();
-}
-
-void op_restore_bcond (void)
-{
- T2 = env->bcond;
+ env->bcond = T0;
FORCE_RET();
}
-void op_jnz_T2 (void)
+void op_jnz_bcond (void)
{
- if (T2)
+ if (env->bcond)
GOTO_LABEL_PARAM(1);
FORCE_RET();
}
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- T0 = env->gpr[PARAM1][other_tc];
+ T0 = env->gpr[other_tc][PARAM1];
FORCE_RET();
}
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- T0 = env->LO[PARAM1][other_tc];
+ T0 = env->LO[other_tc][PARAM1];
FORCE_RET();
}
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- T0 = env->HI[PARAM1][other_tc];
+ T0 = env->HI[other_tc][PARAM1];
FORCE_RET();
}
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- T0 = env->ACX[PARAM1][other_tc];
+ T0 = env->ACX[other_tc][PARAM1];
FORCE_RET();
}
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- T0 = env->gpr[PARAM1][other_tc];
+ T0 = env->gpr[other_tc][PARAM1];
FORCE_RET();
}
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- T0 = env->LO[PARAM1][other_tc];
+ T0 = env->LO[other_tc][PARAM1];
FORCE_RET();
}
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- T0 = env->HI[PARAM1][other_tc];
+ T0 = env->HI[other_tc][PARAM1];
FORCE_RET();
}
{
int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
- T0 = env->ACX[PARAM1][other_tc];
+ T0 = env->ACX[other_tc][PARAM1];
FORCE_RET();
}
FORCE_RET();
}
-void op_set_lladdr (void)
-{
- env->CP0_LLAddr = T2;
- FORCE_RET();
-}
-
void debug_pre_eret (void);
void debug_post_eret (void);
void op_eret (void)