std
ret
-
+/* Clear/set the carry flag. */
+.global VG_(helper_CLC)
+VG_(helper_CLC):
+ clc
+ ret
+
+.global VG_(helper_STC)
+VG_(helper_STC):
+ stc
+ ret
/* Signed 32-to-64 multiply. */
.globl VG_(helper_imul_32_64)
extern void VG_(helper_STD);
extern void VG_(helper_get_dirflag);
+extern void VG_(helper_CLC);
+extern void VG_(helper_STC);
+
extern void VG_(helper_shldl);
extern void VG_(helper_shldw);
extern void VG_(helper_shrdl);
extern Int VGOFF_(helper_STD);
extern Int VGOFF_(helper_get_dirflag);
+extern Int VGOFF_(helper_CLC);
+extern Int VGOFF_(helper_STC);
+
extern Int VGOFF_(helper_shldl);
extern Int VGOFF_(helper_shldw);
extern Int VGOFF_(helper_shrdl);
Int VGOFF_(helper_CLD) = INVALID_OFFSET;
Int VGOFF_(helper_STD) = INVALID_OFFSET;
Int VGOFF_(helper_get_dirflag) = INVALID_OFFSET;
+Int VGOFF_(helper_CLC) = INVALID_OFFSET;
+Int VGOFF_(helper_STC) = INVALID_OFFSET;
Int VGOFF_(helper_shldl) = INVALID_OFFSET;
Int VGOFF_(helper_shldw) = INVALID_OFFSET;
Int VGOFF_(helper_shrdl) = INVALID_OFFSET;
VGOFF_(helper_get_dirflag)
= alloc_BaB_1_set( (Addr) & VG_(helper_get_dirflag) );
+ VGOFF_(helper_CLC)
+ = alloc_BaB_1_set( (Addr) & VG_(helper_CLC) );
+ VGOFF_(helper_STC)
+ = alloc_BaB_1_set( (Addr) & VG_(helper_STC) );
+
VGOFF_(helper_shldl)
= alloc_BaB_1_set( (Addr) & VG_(helper_shldl) );
VGOFF_(helper_shldw)
if (dis) VG_(printf)("std\n");
break;
+ case 0xF8: /* CLC */
+ uInstr0(cb, CALLM_S, 0);
+ uInstr1(cb, CALLM, 0, Lit16, VGOFF_(helper_CLC));
+ uFlagsRWU(cb, FlagsEmpty, FlagC, FlagsOSZAP);
+ uInstr0(cb, CALLM_E, 0);
+ if (dis) VG_(printf)("clc\n");
+ break;
+
+ case 0xF9: /* STC */
+ uInstr0(cb, CALLM_S, 0);
+ uInstr1(cb, CALLM, 0, Lit16, VGOFF_(helper_STC));
+ uFlagsRWU(cb, FlagsEmpty, FlagC, FlagsOSZCP);
+ uInstr0(cb, CALLM_E, 0);
+ if (dis) VG_(printf)("stc\n");
+ break;
+
case 0xF2: { /* REPNE prefix insn */
Addr eip_orig = eip - 1;
abyte = getUChar(eip); eip++;
std
ret
-
+/* Clear/set the carry flag. */
+.global VG_(helper_CLC)
+VG_(helper_CLC):
+ clc
+ ret
+
+.global VG_(helper_STC)
+VG_(helper_STC):
+ stc
+ ret
/* Signed 32-to-64 multiply. */
.globl VG_(helper_imul_32_64)
extern void VG_(helper_STD);
extern void VG_(helper_get_dirflag);
+extern void VG_(helper_CLC);
+extern void VG_(helper_STC);
+
extern void VG_(helper_shldl);
extern void VG_(helper_shldw);
extern void VG_(helper_shrdl);
extern Int VGOFF_(helper_STD);
extern Int VGOFF_(helper_get_dirflag);
+extern Int VGOFF_(helper_CLC);
+extern Int VGOFF_(helper_STC);
+
extern Int VGOFF_(helper_shldl);
extern Int VGOFF_(helper_shldw);
extern Int VGOFF_(helper_shrdl);
Int VGOFF_(helper_CLD) = INVALID_OFFSET;
Int VGOFF_(helper_STD) = INVALID_OFFSET;
Int VGOFF_(helper_get_dirflag) = INVALID_OFFSET;
+Int VGOFF_(helper_CLC) = INVALID_OFFSET;
+Int VGOFF_(helper_STC) = INVALID_OFFSET;
Int VGOFF_(helper_shldl) = INVALID_OFFSET;
Int VGOFF_(helper_shldw) = INVALID_OFFSET;
Int VGOFF_(helper_shrdl) = INVALID_OFFSET;
VGOFF_(helper_get_dirflag)
= alloc_BaB_1_set( (Addr) & VG_(helper_get_dirflag) );
+ VGOFF_(helper_CLC)
+ = alloc_BaB_1_set( (Addr) & VG_(helper_CLC) );
+ VGOFF_(helper_STC)
+ = alloc_BaB_1_set( (Addr) & VG_(helper_STC) );
+
VGOFF_(helper_shldl)
= alloc_BaB_1_set( (Addr) & VG_(helper_shldl) );
VGOFF_(helper_shldw)
if (dis) VG_(printf)("std\n");
break;
+ case 0xF8: /* CLC */
+ uInstr0(cb, CALLM_S, 0);
+ uInstr1(cb, CALLM, 0, Lit16, VGOFF_(helper_CLC));
+ uFlagsRWU(cb, FlagsEmpty, FlagC, FlagsOSZAP);
+ uInstr0(cb, CALLM_E, 0);
+ if (dis) VG_(printf)("clc\n");
+ break;
+
+ case 0xF9: /* STC */
+ uInstr0(cb, CALLM_S, 0);
+ uInstr1(cb, CALLM, 0, Lit16, VGOFF_(helper_STC));
+ uFlagsRWU(cb, FlagsEmpty, FlagC, FlagsOSZCP);
+ uInstr0(cb, CALLM_E, 0);
+ if (dis) VG_(printf)("stc\n");
+ break;
+
case 0xF2: { /* REPNE prefix insn */
Addr eip_orig = eip - 1;
abyte = getUChar(eip); eip++;