return cf | pf | af | zf | sf | of;
}
-#if DATA_BITS == 32
static int glue(compute_c_shl, SUFFIX)(void)
{
+ return (CC_SRC >> (DATA_BITS - 1)) & CC_C;
+}
+
+#if DATA_BITS == 32
+static int glue(compute_c_sar, SUFFIX)(void)
+{
return CC_SRC & 1;
}
#endif
src2 = CC_SRC - CC_DST;
if ((DATA_TYPE)src1 < (DATA_TYPE)src2)
- EIP = PARAM1;
+ JUMP_TB(PARAM1, 0, PARAM2);
else
- EIP = PARAM2;
+ JUMP_TB(PARAM1, 1, PARAM3);
FORCE_RET();
}
void OPPROTO glue(op_jz_sub, SUFFIX)(void)
{
if ((DATA_TYPE)CC_DST == 0)
- EIP = PARAM1;
+ JUMP_TB(PARAM1, 0, PARAM2);
else
- EIP = PARAM2;
+ JUMP_TB(PARAM1, 1, PARAM3);
FORCE_RET();
}
src2 = CC_SRC - CC_DST;
if ((DATA_TYPE)src1 <= (DATA_TYPE)src2)
- EIP = PARAM1;
+ JUMP_TB(PARAM1, 0, PARAM2);
else
- EIP = PARAM2;
+ JUMP_TB(PARAM1, 1, PARAM3);
FORCE_RET();
}
void OPPROTO glue(op_js_sub, SUFFIX)(void)
{
if (CC_DST & SIGN_MASK)
- EIP = PARAM1;
+ JUMP_TB(PARAM1, 0, PARAM2);
else
- EIP = PARAM2;
+ JUMP_TB(PARAM1, 1, PARAM3);
FORCE_RET();
}
src2 = CC_SRC - CC_DST;
if ((DATA_STYPE)src1 < (DATA_STYPE)src2)
- EIP = PARAM1;
+ JUMP_TB(PARAM1, 0, PARAM2);
else
- EIP = PARAM2;
+ JUMP_TB(PARAM1, 1, PARAM3);
FORCE_RET();
}
src2 = CC_SRC - CC_DST;
if ((DATA_STYPE)src1 <= (DATA_STYPE)src2)
- EIP = PARAM1;
+ JUMP_TB(PARAM1, 0, PARAM2);
else
- EIP = PARAM2;
+ JUMP_TB(PARAM1, 1, PARAM3);
FORCE_RET();
}
CC_DST = T0;
CC_OP = CC_OP_SARB + SHIFT;
}
+ FORCE_RET();
}
void OPPROTO glue(glue(op_shrd, SUFFIX), _T0_T1_im_cc)(void)
CC_DST = T0;
CC_OP = CC_OP_SARB + SHIFT;
}
+ FORCE_RET();
}
#endif
CC_DST = T0;
CC_OP = CC_OP_SHLB + SHIFT;
}
+ FORCE_RET();
}
void OPPROTO glue(glue(op_shrd, SUFFIX), _T0_T1_im_cc)(void)
CC_DST = T0;
CC_OP = CC_OP_SARB + SHIFT;
}
+ FORCE_RET();
}
#endif
#define STRING_SUFFIX _a32
#define SI_ADDR (uint8_t *)A0 + ESI
-#define DI_ADDR env->seg_cache[R_ES].base + EDI
+#define DI_ADDR env->segs[R_ES].base + EDI
#define INC_SI() ESI += inc
#define INC_DI() EDI += inc
#define CX ECX
#define STRING_SUFFIX _a16
#define SI_ADDR (uint8_t *)A0 + (ESI & 0xffff)
-#define DI_ADDR env->seg_cache[R_ES].base + (EDI & 0xffff)
+#define DI_ADDR env->segs[R_ES].base + (EDI & 0xffff)
#define INC_SI() ESI = (ESI & ~0xffff) | ((ESI + inc) & 0xffff)
#define INC_DI() EDI = (EDI & ~0xffff) | ((EDI + inc) & 0xffff)
#define CX (ECX & 0xffff)
void OPPROTO glue(glue(op_out, SUFFIX), _T0_T1)(void)
{
- glue(cpu_x86_out, SUFFIX)(T0 & 0xffff, T1 & DATA_MASK);
+ glue(cpu_x86_out, SUFFIX)(env, T0 & 0xffff, T1 & DATA_MASK);
}
void OPPROTO glue(glue(op_in, SUFFIX), _T0_T1)(void)
{
- T1 = glue(cpu_x86_in, SUFFIX)(T0 & 0xffff);
+ T1 = glue(cpu_x86_in, SUFFIX)(env, T0 & 0xffff);
}
#undef DATA_BITS