Index: trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
===================================================================
--- trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm	(revision 104206)
+++ trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm	(revision 104207)
@@ -1317,6 +1317,6 @@
 ; coding.
 ;
-; All the functions takes a pointer to the destination memory operand in A0,
-; the source register operand in A1 and a pointer to eflags in A2.
+; All the functions takes a pointer to the destination memory operand in A1,
+; the source register operand in A2 and incoming eflags in A0.
 ;
 ; @param        1       The instruction mnemonic.
@@ -1329,7 +1329,7 @@
 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u16, 12
         PROLOGUE_3_ARGS
-        IEM_MAYBE_LOAD_FLAGS_OLD           A2, %3, %4, 0
-        %1      word [A0], A1_16
-        IEM_SAVE_FLAGS_OLD                 A2, %3, %4, 0
+        IEM_MAYBE_LOAD_FLAGS               A0_32, %3, %4, 0
+        %1      word [A1], A2_16
+        IEM_SAVE_FLAGS_RETVAL              A0_32, %3, %4, 0
         EPILOGUE_3_ARGS
 ENDPROC iemAImpl_ %+ %1 %+ _u16
@@ -1337,7 +1337,7 @@
 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u32, 12
         PROLOGUE_3_ARGS
-        IEM_MAYBE_LOAD_FLAGS_OLD           A2, %3, %4, 0
-        %1      dword [A0], A1_32
-        IEM_SAVE_FLAGS_OLD                 A2, %3, %4, 0
+        IEM_MAYBE_LOAD_FLAGS               A0_32, %3, %4, 0
+        %1      dword [A1], A2_32
+        IEM_SAVE_FLAGS_RETVAL              A0_32, %3, %4, 0
         EPILOGUE_3_ARGS
 ENDPROC iemAImpl_ %+ %1 %+ _u32
@@ -1346,7 +1346,7 @@
 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u64, 16
         PROLOGUE_3_ARGS
-        IEM_MAYBE_LOAD_FLAGS_OLD           A2, %3, %4, 0
-        %1      qword [A0], A1
-        IEM_SAVE_FLAGS_OLD                 A2, %3, %4, 0
+        IEM_MAYBE_LOAD_FLAGS               A0_32, %3, %4, 0
+        %1      qword [A1], A2
+        IEM_SAVE_FLAGS_RETVAL              A0_32, %3, %4, 0
         EPILOGUE_3_ARGS_EX 8
 ENDPROC iemAImpl_ %+ %1 %+ _u64
@@ -1357,7 +1357,7 @@
 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u16_locked, 12
         PROLOGUE_3_ARGS
-        IEM_MAYBE_LOAD_FLAGS_OLD           A2, %3, %4, 0
-        lock %1 word [A0], A1_16
-        IEM_SAVE_FLAGS_OLD                 A2, %3, %4, 0
+        IEM_MAYBE_LOAD_FLAGS               A0_32, %3, %4, 0
+        lock %1 word [A1], A2_16
+        IEM_SAVE_FLAGS_RETVAL              A0_32, %3, %4, 0
         EPILOGUE_3_ARGS
 ENDPROC iemAImpl_ %+ %1 %+ _u16_locked
@@ -1365,7 +1365,7 @@
 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u32_locked, 12
         PROLOGUE_3_ARGS
-        IEM_MAYBE_LOAD_FLAGS_OLD           A2, %3, %4, 0
-        lock %1 dword [A0], A1_32
-        IEM_SAVE_FLAGS_OLD                 A2, %3, %4, 0
+        IEM_MAYBE_LOAD_FLAGS               A0_32, %3, %4, 0
+        lock %1 dword [A1], A2_32
+        IEM_SAVE_FLAGS_RETVAL              A0_32, %3, %4, 0
         EPILOGUE_3_ARGS
 ENDPROC iemAImpl_ %+ %1 %+ _u32_locked
@@ -1374,7 +1374,7 @@
 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u64_locked, 16
         PROLOGUE_3_ARGS
-        IEM_MAYBE_LOAD_FLAGS_OLD           A2, %3, %4, 0
-        lock %1 qword [A0], A1
-        IEM_SAVE_FLAGS_OLD                 A2, %3, %4, 0
+        IEM_MAYBE_LOAD_FLAGS               A0_32, %3, %4, 0
+        lock %1 qword [A1], A2
+        IEM_SAVE_FLAGS_RETVAL              A0_32, %3, %4, 0
         EPILOGUE_3_ARGS_EX 8
 ENDPROC iemAImpl_ %+ %1 %+ _u64_locked
Index: trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
===================================================================
--- trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp	(revision 104206)
+++ trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp	(revision 104207)
@@ -1205,5 +1205,5 @@
  */
 
-IEM_DECL_IMPL_DEF(void, iemAImpl_bt_u64,(uint64_t const *puDst, uint64_t uSrc, uint32_t *pfEFlags))
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_bt_u64,(uint32_t fEFlags, uint64_t const *puDst, uint64_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  However, it seems they're
@@ -1212,12 +1212,13 @@
     uint64_t uDst = *puDst;
     if (uDst & RT_BIT_64(uSrc))
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     else
-        *pfEFlags &= ~X86_EFL_CF;
+        fEFlags &= ~X86_EFL_CF;
+    return fEFlags;
 }
 
 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY)
 
-IEM_DECL_IMPL_DEF(void, iemAImpl_bt_u32,(uint32_t const *puDst, uint32_t uSrc, uint32_t *pfEFlags))
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_bt_u32,(uint32_t fEFlags, uint32_t const *puDst, uint32_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  However, it seems they're
@@ -1226,10 +1227,11 @@
     uint32_t uDst = *puDst;
     if (uDst & RT_BIT_32(uSrc))
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     else
-        *pfEFlags &= ~X86_EFL_CF;
-}
-
-IEM_DECL_IMPL_DEF(void, iemAImpl_bt_u16,(uint16_t const *puDst, uint16_t uSrc, uint32_t *pfEFlags))
+        fEFlags &= ~X86_EFL_CF;
+    return fEFlags;
+}
+
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_bt_u16,(uint32_t fEFlags, uint16_t const *puDst, uint16_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  However, it seems they're
@@ -1238,7 +1240,8 @@
     uint16_t uDst = *puDst;
     if (uDst & RT_BIT_32(uSrc))
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     else
-        *pfEFlags &= ~X86_EFL_CF;
+        fEFlags &= ~X86_EFL_CF;
+    return fEFlags;
 }
 
@@ -1249,5 +1252,5 @@
  */
 
-IEM_DECL_IMPL_DEF(void, iemAImpl_btc_u64,(uint64_t *puDst, uint64_t uSrc, uint32_t *pfEFlags))
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_btc_u64,(uint32_t fEFlags, uint64_t *puDst, uint64_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  However, it seems they're
@@ -1260,5 +1263,5 @@
         uDst &= ~fMask;
         *puDst = uDst;
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     }
     else
@@ -1266,11 +1269,12 @@
         uDst |= fMask;
         *puDst = uDst;
-        *pfEFlags &= ~X86_EFL_CF;
-    }
+        fEFlags &= ~X86_EFL_CF;
+    }
+    return fEFlags;
 }
 
 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY)
 
-IEM_DECL_IMPL_DEF(void, iemAImpl_btc_u32,(uint32_t *puDst, uint32_t uSrc, uint32_t *pfEFlags))
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_btc_u32,(uint32_t fEFlags, uint32_t *puDst, uint32_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  However, it seems they're
@@ -1283,5 +1287,5 @@
         uDst &= ~fMask;
         *puDst = uDst;
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     }
     else
@@ -1289,10 +1293,11 @@
         uDst |= fMask;
         *puDst = uDst;
-        *pfEFlags &= ~X86_EFL_CF;
-    }
-}
-
-
-IEM_DECL_IMPL_DEF(void, iemAImpl_btc_u16,(uint16_t *puDst, uint16_t uSrc, uint32_t *pfEFlags))
+        fEFlags &= ~X86_EFL_CF;
+    }
+    return fEFlags;
+}
+
+
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_btc_u16,(uint32_t fEFlags, uint16_t *puDst, uint16_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  However, it seems they're
@@ -1305,5 +1310,5 @@
         uDst &= ~fMask;
         *puDst = uDst;
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     }
     else
@@ -1311,6 +1316,7 @@
         uDst |= fMask;
         *puDst = uDst;
-        *pfEFlags &= ~X86_EFL_CF;
-    }
+        fEFlags &= ~X86_EFL_CF;
+    }
+    return fEFlags;
 }
 
@@ -1321,5 +1327,5 @@
  */
 
-IEM_DECL_IMPL_DEF(void, iemAImpl_btr_u64,(uint64_t *puDst, uint64_t uSrc, uint32_t *pfEFlags))
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_btr_u64,(uint32_t fEFlags, uint64_t *puDst, uint64_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  We set them as after an
@@ -1332,13 +1338,14 @@
         uDst &= ~fMask;
         *puDst = uDst;
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     }
     else
-        *pfEFlags &= ~X86_EFL_CF;
+        fEFlags &= ~X86_EFL_CF;
+    return fEFlags;
 }
 
 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY)
 
-IEM_DECL_IMPL_DEF(void, iemAImpl_btr_u32,(uint32_t *puDst, uint32_t uSrc, uint32_t *pfEFlags))
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_btr_u32,(uint32_t fEFlags, uint32_t *puDst, uint32_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  We set them as after an
@@ -1351,12 +1358,13 @@
         uDst &= ~fMask;
         *puDst = uDst;
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     }
     else
-        *pfEFlags &= ~X86_EFL_CF;
-}
-
-
-IEM_DECL_IMPL_DEF(void, iemAImpl_btr_u16,(uint16_t *puDst, uint16_t uSrc, uint32_t *pfEFlags))
+        fEFlags &= ~X86_EFL_CF;
+    return fEFlags;
+}
+
+
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_btr_u16,(uint32_t fEFlags, uint16_t *puDst, uint16_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  We set them as after an
@@ -1369,8 +1377,9 @@
         uDst &= ~fMask;
         *puDst = uDst;
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     }
     else
-        *pfEFlags &= ~X86_EFL_CF;
+        fEFlags &= ~X86_EFL_CF;
+    return fEFlags;
 }
 
@@ -1381,5 +1390,5 @@
  */
 
-IEM_DECL_IMPL_DEF(void, iemAImpl_bts_u64,(uint64_t *puDst, uint64_t uSrc, uint32_t *pfEFlags))
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_bts_u64,(uint32_t fEFlags, uint64_t *puDst, uint64_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  We set them as after an
@@ -1389,16 +1398,17 @@
     uint64_t uDst = *puDst;
     if (uDst & fMask)
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     else
     {
         uDst |= fMask;
         *puDst = uDst;
-        *pfEFlags &= ~X86_EFL_CF;
-    }
+        fEFlags &= ~X86_EFL_CF;
+    }
+    return fEFlags;
 }
 
 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY)
 
-IEM_DECL_IMPL_DEF(void, iemAImpl_bts_u32,(uint32_t *puDst, uint32_t uSrc, uint32_t *pfEFlags))
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_bts_u32,(uint32_t fEFlags, uint32_t *puDst, uint32_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  We set them as after an
@@ -1408,15 +1418,16 @@
     uint32_t uDst = *puDst;
     if (uDst & fMask)
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     else
     {
         uDst |= fMask;
         *puDst = uDst;
-        *pfEFlags &= ~X86_EFL_CF;
-    }
-}
-
-
-IEM_DECL_IMPL_DEF(void, iemAImpl_bts_u16,(uint16_t *puDst, uint16_t uSrc, uint32_t *pfEFlags))
+        fEFlags &= ~X86_EFL_CF;
+    }
+    return fEFlags;
+}
+
+
+IEM_DECL_IMPL_DEF(uint32_t, iemAImpl_bts_u16,(uint32_t fEFlags, uint16_t *puDst, uint16_t uSrc))
 {
     /* Note! "undefined" flags: OF, SF, ZF, AF, PF.  We set them as after an
@@ -1426,52 +1437,27 @@
     uint32_t uDst = *puDst;
     if (uDst & fMask)
-        *pfEFlags |= X86_EFL_CF;
+        fEFlags |= X86_EFL_CF;
     else
     {
         uDst |= fMask;
         *puDst = uDst;
-        *pfEFlags &= ~X86_EFL_CF;
-    }
+        fEFlags &= ~X86_EFL_CF;
+    }
+    return fEFlags;
 }
 
 # endif /* !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) */
 
-
-/** 64-bit locked binary operand operation. */
-# define DO_LOCKED_BIN_TODO_OP(a_Mnemonic, a_cBitsWidth) \
-    do { \
-        uint ## a_cBitsWidth ## _t uOld = ASMAtomicUoReadU ## a_cBitsWidth(puDst); \
-        uint ## a_cBitsWidth ## _t uTmp; \
-        uint32_t fEflTmp; \
-        do \
-        { \
-            uTmp = uOld; \
-            fEflTmp = *pfEFlags; \
-            iemAImpl_ ## a_Mnemonic ## _u ## a_cBitsWidth(&uTmp, uSrc, &fEflTmp); \
-        } while (!ASMAtomicCmpXchgExU ## a_cBitsWidth(puDst, uTmp, uOld, &uOld)); \
-        *pfEFlags = fEflTmp; \
-    } while (0)
-
-
-#define EMIT_LOCKED_BIN_TODO_OP(a_Mnemonic, a_cBitsWidth) \
-    IEM_DECL_IMPL_DEF(void, iemAImpl_ ## a_Mnemonic ## _u ## a_cBitsWidth ##  _locked,(uint ## a_cBitsWidth ## _t *puDst, \
-                                                                                       uint ## a_cBitsWidth ## _t uSrc, \
-                                                                                       uint32_t *pfEFlags)) \
-    { \
-        DO_LOCKED_BIN_TODO_OP(a_Mnemonic, a_cBitsWidth); \
-    }
-
-
-EMIT_LOCKED_BIN_TODO_OP(btc, 64)
-EMIT_LOCKED_BIN_TODO_OP(btr, 64)
-EMIT_LOCKED_BIN_TODO_OP(bts, 64)
+EMIT_LOCKED_BIN_OP(btc, 64)
+EMIT_LOCKED_BIN_OP(btr, 64)
+EMIT_LOCKED_BIN_OP(bts, 64)
 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY)
-EMIT_LOCKED_BIN_TODO_OP(btc, 32)
-EMIT_LOCKED_BIN_TODO_OP(btr, 32)
-EMIT_LOCKED_BIN_TODO_OP(bts, 32)
-
-EMIT_LOCKED_BIN_TODO_OP(btc, 16)
-EMIT_LOCKED_BIN_TODO_OP(btr, 16)
-EMIT_LOCKED_BIN_TODO_OP(bts, 16)
+EMIT_LOCKED_BIN_OP(btc, 32)
+EMIT_LOCKED_BIN_OP(btr, 32)
+EMIT_LOCKED_BIN_OP(bts, 32)
+
+EMIT_LOCKED_BIN_OP(btc, 16)
+EMIT_LOCKED_BIN_OP(btr, 16)
+EMIT_LOCKED_BIN_OP(bts, 16)
 # endif /* !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) */
 
Index: trunk/src/VBox/VMM/VMMAll/IEMAllInstTwoByte0f.cpp.h
===================================================================
--- trunk/src/VBox/VMM/VMMAll/IEMAllInstTwoByte0f.cpp.h	(revision 104206)
+++ trunk/src/VBox/VMM/VMMAll/IEMAllInstTwoByte0f.cpp.h	(revision 104207)
@@ -8740,13 +8740,13 @@
                 IEM_MC_BEGIN(IEM_MC_F_MIN_386, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint16_t *,      pu16Dst,                0); \
-                IEM_MC_ARG(uint16_t,        u16Src,                 1); \
-                IEM_MC_ARG(uint32_t *,      pEFlags,                2); \
                 \
+                IEM_MC_ARG(uint16_t,        u16Src,                 2); \
                 IEM_MC_FETCH_GREG_U16(u16Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                 IEM_MC_AND_LOCAL_U16(u16Src, 0xf); \
+                IEM_MC_ARG(uint16_t *,      pu16Dst,                1); \
                 IEM_MC_REF_GREG_U16(pu16Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU16, pu16Dst, u16Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(          fEFlagsIn,              0); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU16, fEFlagsIn, pu16Dst, u16Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -8757,13 +8757,13 @@
                 IEM_MC_BEGIN(IEM_MC_F_MIN_386, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint32_t *,      pu32Dst,                0); \
-                IEM_MC_ARG(uint32_t,        u32Src,                 1); \
-                IEM_MC_ARG(uint32_t *,      pEFlags,                2); \
                 \
+                IEM_MC_ARG(uint32_t,        u32Src,                 2); \
                 IEM_MC_FETCH_GREG_U32(u32Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                 IEM_MC_AND_LOCAL_U32(u32Src, 0x1f); \
+                IEM_MC_ARG(uint32_t *,      pu32Dst,                1); \
                 IEM_MC_REF_GREG_U32(pu32Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU32, pu32Dst, u32Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(          fEFlagsIn,              0); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU32, fEFlagsIn, pu32Dst, u32Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_CLEAR_HIGH_GREG_U64(IEM_GET_MODRM_RM(pVCpu, bRm)); \
@@ -8775,13 +8775,13 @@
                 IEM_MC_BEGIN(IEM_MC_F_64BIT, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint64_t *,      pu64Dst,                0); \
-                IEM_MC_ARG(uint64_t,        u64Src,                 1); \
-                IEM_MC_ARG(uint32_t *,      pEFlags,                2); \
                 \
+                IEM_MC_ARG(uint64_t,        u64Src,                 2); \
                 IEM_MC_FETCH_GREG_U64(u64Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                 IEM_MC_AND_LOCAL_U64(u64Src, 0x3f); \
+                IEM_MC_ARG(uint64_t *,      pu64Dst,                1); \
                 IEM_MC_REF_GREG_U64(pu64Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU64, pu64Dst, u64Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(          fEFlagsIn,              0); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU64, fEFlagsIn, pu64Dst, u64Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -8806,5 +8806,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint16_t,                u16Src,                 1); \
+                    IEM_MC_ARG(uint16_t,                u16Src,                 2); \
                     IEM_MC_FETCH_GREG_U16(u16Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int16_t,        i16AddrAdj, /*=*/ u16Src); \
@@ -8815,12 +8815,12 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint16_t *,              pu16Dst,                0); \
+                    IEM_MC_ARG(uint16_t *,              pu16Dst,                1); \
                     IEM_MC_MEM_MAP_U16_RW(pu16Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU16, pu16Dst, u16Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU16, fEFlagsIn, pu16Dst, u16Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RW(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -8833,5 +8833,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint32_t,                u32Src,                 1); \
+                    IEM_MC_ARG(uint32_t,                u32Src,                 2); \
                     IEM_MC_FETCH_GREG_U32(u32Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int32_t,        i32AddrAdj, /*=*/ u32Src); \
@@ -8842,12 +8842,12 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint32_t *,              pu32Dst,                0); \
+                    IEM_MC_ARG(uint32_t *,              pu32Dst,                1); \
                     IEM_MC_MEM_MAP_U32_RW(pu32Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU32, pu32Dst, u32Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU32, fEFlagsIn, pu32Dst, u32Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RW(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -8860,5 +8860,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint64_t,                u64Src,                 1); \
+                    IEM_MC_ARG(uint64_t,                u64Src,                 2); \
                     IEM_MC_FETCH_GREG_U64(u64Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int64_t,        i64AddrAdj, /*=*/ u64Src); \
@@ -8869,12 +8869,12 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint64_t *,              pu64Dst,                0); \
+                    IEM_MC_ARG(uint64_t *,              pu64Dst,                1); \
                     IEM_MC_MEM_MAP_U64_RW(pu64Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU64, pu64Dst, u64Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU64, fEFlagsIn, pu64Dst, u64Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RW(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -8897,5 +8897,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint16_t,                u16Src,                 1); \
+                    IEM_MC_ARG(uint16_t,                u16Src,                 2); \
                     IEM_MC_FETCH_GREG_U16(u16Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int16_t,        i16AddrAdj, /*=*/ u16Src); \
@@ -8906,12 +8906,12 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint16_t *,              pu16Dst,                0); \
+                    IEM_MC_ARG(uint16_t *,              pu16Dst,                1); \
                     IEM_MC_MEM_MAP_U16_ATOMIC(pu16Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnLockedU16, pu16Dst, u16Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnLockedU16, fEFlagsIn, pu16Dst, u16Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_ATOMIC(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -8924,5 +8924,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint32_t,                u32Src,                 1); \
+                    IEM_MC_ARG(uint32_t,                u32Src,                 2); \
                     IEM_MC_FETCH_GREG_U32(u32Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int32_t,        i32AddrAdj, /*=*/ u32Src); \
@@ -8933,12 +8933,12 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint32_t *,              pu32Dst,                0); \
+                    IEM_MC_ARG(uint32_t *,              pu32Dst,                1); \
                     IEM_MC_MEM_MAP_U32_ATOMIC(pu32Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnLockedU32, pu32Dst, u32Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnLockedU32, fEFlagsIn, pu32Dst, u32Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_ATOMIC(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -8951,5 +8951,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint64_t,                u64Src,                 1); \
+                    IEM_MC_ARG(uint64_t,                u64Src,                 2); \
                     IEM_MC_FETCH_GREG_U64(u64Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int64_t,        i64AddrAdj, /*=*/ u64Src); \
@@ -8960,12 +8960,12 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint64_t *,              pu64Dst,                0); \
+                    IEM_MC_ARG(uint64_t *,              pu64Dst,                1); \
                     IEM_MC_MEM_MAP_U64_ATOMIC(pu64Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnLockedU64, pu64Dst, u64Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnLockedU64, fEFlagsIn, pu64Dst, u64Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_ATOMIC(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -8991,13 +8991,13 @@
                 IEM_MC_BEGIN(IEM_MC_F_MIN_386, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint16_t const *, pu16Dst,               0); \
-                IEM_MC_ARG(uint16_t,         u16Src,                1); \
-                IEM_MC_ARG(uint32_t *,       pEFlags,               2); \
                 \
+                IEM_MC_ARG(uint16_t,            u16Src,     2); \
                 IEM_MC_FETCH_GREG_U16(u16Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                 IEM_MC_AND_LOCAL_U16(u16Src, 0xf); \
+                IEM_MC_ARG(uint16_t const *,    pu16Dst,    1); \
                 IEM_MC_REF_GREG_U16_CONST(pu16Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU16, pu16Dst, u16Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(              fEFlagsIn,  0); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU16, fEFlagsIn, pu16Dst, u16Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -9008,13 +9008,13 @@
                 IEM_MC_BEGIN(IEM_MC_F_MIN_386, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint32_t const *, pu32Dst,               0); \
-                IEM_MC_ARG(uint32_t,         u32Src,                1); \
-                IEM_MC_ARG(uint32_t *,       pEFlags,               2); \
                 \
+                IEM_MC_ARG(uint32_t,            u32Src,     2); \
                 IEM_MC_FETCH_GREG_U32(u32Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                 IEM_MC_AND_LOCAL_U32(u32Src, 0x1f); \
+                IEM_MC_ARG(uint32_t const *,    pu32Dst,    1); \
                 IEM_MC_REF_GREG_U32_CONST(pu32Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU32, pu32Dst, u32Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(              fEFlagsIn,  0); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU32, fEFlagsIn, pu32Dst, u32Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -9025,13 +9025,13 @@
                 IEM_MC_BEGIN(IEM_MC_F_64BIT, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint64_t const *, pu64Dst,               0); \
-                IEM_MC_ARG(uint64_t,         u64Src,                1); \
-                IEM_MC_ARG(uint32_t *,       pEFlags,               2); \
                 \
+                IEM_MC_ARG(uint64_t,            u64Src,     2); \
                 IEM_MC_FETCH_GREG_U64(u64Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                 IEM_MC_AND_LOCAL_U64(u64Src, 0x3f); \
+                IEM_MC_ARG(uint64_t const *,    pu64Dst,    1); \
                 IEM_MC_REF_GREG_U64_CONST(pu64Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU64, pu64Dst, u64Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(              fEFlagsIn,  0); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU64, fEFlagsIn, pu64Dst, u64Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -9056,5 +9056,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint16_t,                u16Src,                 1); \
+                    IEM_MC_ARG(uint16_t,                u16Src,                 2); \
                     IEM_MC_FETCH_GREG_U16(u16Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int16_t,        i16AddrAdj, /*=*/ u16Src); \
@@ -9065,12 +9065,12 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint16_t const *,        pu16Dst,                0); \
+                    IEM_MC_ARG(uint16_t const *,        pu16Dst,                1); \
                     IEM_MC_MEM_MAP_U16_RO(pu16Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU16, pu16Dst, u16Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU16, fEFlagsIn, pu16Dst, u16Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RO(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -9083,5 +9083,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint32_t,                u32Src,                 1); \
+                    IEM_MC_ARG(uint32_t,                u32Src,                 2); \
                     IEM_MC_FETCH_GREG_U32(u32Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int32_t,        i32AddrAdj, /*=*/ u32Src); \
@@ -9091,13 +9091,13 @@
                     IEM_MC_ADD_LOCAL_S32_TO_EFF_ADDR(GCPtrEffDst, i32AddrAdj); \
                     \
-                    IEM_MC_ARG(uint32_t const *,        pu32Dst,                0); \
+                    IEM_MC_ARG(uint32_t const *,        pu32Dst,                1); \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
                     IEM_MC_MEM_MAP_U32_RO(pu32Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU32, pu32Dst, u32Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU32, fEFlagsIn, pu32Dst, u32Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RO(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -9110,5 +9110,5 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint64_t,                u64Src,                 1); \
+                    IEM_MC_ARG(uint64_t,                u64Src,                 2); \
                     IEM_MC_FETCH_GREG_U64(u64Src, IEM_GET_MODRM_REG(pVCpu, bRm)); \
                     IEM_MC_LOCAL_ASSIGN(int64_t,        i64AddrAdj, /*=*/ u64Src); \
@@ -9119,12 +9119,12 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint64_t const *,        pu64Dst,                0); \
+                    IEM_MC_ARG(uint64_t const *,        pu64Dst,                1); \
                     IEM_MC_MEM_MAP_U64_RO(pu64Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,        2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU64, pu64Dst, u64Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,              0); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU64, fEFlagsIn, pu64Dst, u64Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RO(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10546,11 +10546,10 @@
                 IEM_MC_BEGIN(IEM_MC_F_MIN_386, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint16_t *,      pu16Dst,                    0); \
-                IEM_MC_ARG_CONST(uint16_t,  u16Src, /*=*/ bImm & 0x0f,  1); \
-                IEM_MC_ARG(uint32_t *,      pEFlags,                    2); \
-                \
+                IEM_MC_ARG(uint16_t *,      pu16Dst,                    1); \
                 IEM_MC_REF_GREG_U16(pu16Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU16, pu16Dst, u16Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(          fEFlagsIn,                  0); \
+                IEM_MC_ARG_CONST(uint16_t,  u16Src, /*=*/ bImm & 0x0f,  2); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU16, fEFlagsIn, pu16Dst, u16Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -10561,11 +10560,10 @@
                 IEM_MC_BEGIN(IEM_MC_F_MIN_386, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint32_t *,      pu32Dst,                    0); \
-                IEM_MC_ARG_CONST(uint32_t,  u32Src, /*=*/ bImm & 0x1f,  1); \
-                IEM_MC_ARG(uint32_t *,      pEFlags,                    2); \
-                \
+                IEM_MC_ARG(uint32_t *,      pu32Dst,                    1); \
                 IEM_MC_REF_GREG_U32(pu32Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU32, pu32Dst, u32Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(          fEFlagsIn,                  0); \
+                IEM_MC_ARG_CONST(uint32_t,  u32Src, /*=*/ bImm & 0x1f,  2); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU32, fEFlagsIn, pu32Dst, u32Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_CLEAR_HIGH_GREG_U64(IEM_GET_MODRM_RM(pVCpu, bRm)); \
@@ -10577,11 +10575,10 @@
                 IEM_MC_BEGIN(IEM_MC_F_64BIT, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint64_t *,      pu64Dst,                    0); \
-                IEM_MC_ARG_CONST(uint64_t,  u64Src, /*=*/ bImm & 0x3f,  1); \
-                IEM_MC_ARG(uint32_t *,      pEFlags,                    2); \
-                \
+                IEM_MC_ARG(uint64_t *,      pu64Dst,                    1); \
                 IEM_MC_REF_GREG_U64(pu64Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU64, pu64Dst, u64Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(          fEFlagsIn,                  0); \
+                IEM_MC_ARG_CONST(uint64_t,  u64Src, /*=*/ bImm & 0x3f,  2); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU64, fEFlagsIn, pu64Dst, u64Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -10609,13 +10606,13 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint16_t *,              pu16Dst,                    0); \
+                    IEM_MC_ARG(uint16_t *,              pu16Dst,                    1); \
                     IEM_MC_MEM_MAP_U16_RW(pu16Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint16_t,          u16Src, /*=*/ bImm & 0x0f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU16, pu16Dst, u16Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint16_t,          u16Src, /*=*/ bImm & 0x0f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU16, fEFlagsIn, pu16Dst, u16Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RW(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10631,13 +10628,13 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint32_t *,              pu32Dst,                0); \
+                    IEM_MC_ARG(uint32_t *,              pu32Dst,                    1); \
                     IEM_MC_MEM_MAP_U32_RW(pu32Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint32_t,          u32Src, /*=*/ bImm & 0x1f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU32, pu32Dst, u32Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint32_t,          u32Src, /*=*/ bImm & 0x1f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU32, fEFlagsIn, pu32Dst, u32Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RW(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10653,13 +10650,13 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint64_t *,              pu64Dst,                    0); \
+                    IEM_MC_ARG(uint64_t *,              pu64Dst,                    1); \
                     IEM_MC_MEM_MAP_U64_RW(pu64Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint64_t,          u64Src, /*=*/ bImm & 0x3f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU64, pu64Dst, u64Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint64_t,          u64Src, /*=*/ bImm & 0x3f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU64, fEFlagsIn, pu64Dst, u64Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RW(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10684,14 +10681,14 @@
                     IEMOP_HLP_DONE_DECODING(); \
                     \
-                    IEM_MC_ARG(uint16_t *,              pu16Dst,                    0); \
+                    IEM_MC_ARG(uint16_t *,              pu16Dst,                    1); \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
                     IEM_MC_MEM_MAP_U16_ATOMIC(pu16Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint16_t,          u16Src, /*=*/ bImm & 0x0f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnLockedU16, pu16Dst, u16Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint16_t,          u16Src, /*=*/ bImm & 0x0f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnLockedU16, fEFlagsIn, pu16Dst, u16Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_ATOMIC(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10707,13 +10704,13 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint32_t *,              pu32Dst,                    0); \
+                    IEM_MC_ARG(uint32_t *,              pu32Dst,                    1); \
                     IEM_MC_MEM_MAP_U32_ATOMIC(pu32Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint32_t,          u32Src, /*=*/ bImm & 0x1f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnLockedU32, pu32Dst, u32Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint32_t,          u32Src, /*=*/ bImm & 0x1f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnLockedU32, fEFlagsIn, pu32Dst, u32Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_ATOMIC(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10729,13 +10726,13 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint64_t *,              pu64Dst,                    0); \
+                    IEM_MC_ARG(uint64_t *,              pu64Dst,                    1); \
                     IEM_MC_MEM_MAP_U64_ATOMIC(pu64Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint64_t,          u64Src, /*=*/ bImm & 0x3f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnLockedU64, pu64Dst, u64Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint64_t,          u64Src, /*=*/ bImm & 0x3f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnLockedU64, fEFlagsIn, pu64Dst, u64Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_ATOMIC(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10762,11 +10759,10 @@
                 IEM_MC_BEGIN(IEM_MC_F_MIN_386, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint16_t const *, pu16Dst,                   0); \
-                IEM_MC_ARG_CONST(uint16_t,   u16Src, /*=*/ bImm & 0x0f, 1); \
-                IEM_MC_ARG(uint32_t *,       pEFlags,                   2); \
-                \
+                IEM_MC_ARG(uint16_t const *,    pu16Dst,                    1); \
                 IEM_MC_REF_GREG_U16_CONST(pu16Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU16, pu16Dst, u16Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(              fEFlagsIn,                  0); \
+                IEM_MC_ARG_CONST(uint16_t,      u16Src, /*=*/ bImm & 0x0f,  2); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU16, fEFlagsIn, pu16Dst, u16Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -10777,11 +10773,10 @@
                 IEM_MC_BEGIN(IEM_MC_F_MIN_386, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint32_t const *, pu32Dst,                   0); \
-                IEM_MC_ARG_CONST(uint32_t,   u32Src, /*=*/ bImm & 0x1f, 1); \
-                IEM_MC_ARG(uint32_t *,       pEFlags,                   2); \
-                \
+                IEM_MC_ARG(uint32_t const *,    pu32Dst,                    1); \
                 IEM_MC_REF_GREG_U32_CONST(pu32Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU32, pu32Dst, u32Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(              fEFlagsIn,                  0); \
+                IEM_MC_ARG_CONST(uint32_t,      u32Src, /*=*/ bImm & 0x1f,  2); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU32, fEFlagsIn, pu32Dst, u32Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -10792,11 +10787,10 @@
                 IEM_MC_BEGIN(IEM_MC_F_64BIT, 0); \
                 IEMOP_HLP_DONE_DECODING_NO_LOCK_PREFIX(); \
-                IEM_MC_ARG(uint64_t const *, pu64Dst,                   0); \
-                IEM_MC_ARG_CONST(uint64_t,   u64Src, /*=*/ bImm & 0x3f, 1); \
-                IEM_MC_ARG(uint32_t *,       pEFlags,                   2); \
-                \
+                IEM_MC_ARG(uint64_t const *,    pu64Dst,                    1); \
                 IEM_MC_REF_GREG_U64_CONST(pu64Dst, IEM_GET_MODRM_RM(pVCpu, bRm)); \
-                IEM_MC_REF_EFLAGS(pEFlags); \
-                IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU64, pu64Dst, u64Src, pEFlags); \
+                IEM_MC_ARG_EFLAGS(              fEFlagsIn,                  0); \
+                IEM_MC_ARG_CONST(uint64_t,      u64Src, /*=*/ bImm & 0x3f,  2); \
+                IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU64, fEFlagsIn, pu64Dst, u64Src); \
+                IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                 \
                 IEM_MC_ADVANCE_RIP_AND_FINISH(); \
@@ -10824,13 +10818,13 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint16_t const *,        pu16Dst,                    0); \
+                    IEM_MC_ARG(uint16_t const *,        pu16Dst,                    1); \
                     IEM_MC_MEM_MAP_U16_RO(pu16Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint16_t,          u16Src, /*=*/ bImm & 0x0f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU16, pu16Dst, u16Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint16_t,          u16Src, /*=*/ bImm & 0x0f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU16, fEFlagsIn, pu16Dst, u16Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RO(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10846,13 +10840,13 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint32_t const *,        pu32Dst,                    0); \
+                    IEM_MC_ARG(uint32_t const *,        pu32Dst,                    1); \
                     IEM_MC_MEM_MAP_U32_RO(pu32Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint32_t,          u32Src, /*=*/ bImm & 0x1f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU32, pu32Dst, u32Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint32_t,          u32Src, /*=*/ bImm & 0x1f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU32, fEFlagsIn, pu32Dst, u32Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RO(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
@@ -10868,13 +10862,13 @@
                     \
                     IEM_MC_LOCAL(uint8_t,               bUnmapInfo); \
-                    IEM_MC_ARG(uint64_t const *,        pu64Dst,                    0); \
+                    IEM_MC_ARG(uint64_t const *,        pu64Dst,                    1); \
                     IEM_MC_MEM_MAP_U64_RO(pu64Dst, bUnmapInfo, pVCpu->iem.s.iEffSeg, GCPtrEffDst); \
                     \
-                    IEM_MC_ARG_CONST(uint64_t,          u64Src, /*=*/ bImm & 0x3f,  1); \
-                    IEM_MC_ARG_LOCAL_EFLAGS(            pEFlags, EFlags,            2); \
-                    IEM_MC_CALL_VOID_AIMPL_3(a_fnNormalU64, pu64Dst, u64Src, pEFlags); \
+                    IEM_MC_ARG_EFLAGS(                  fEFlagsIn,                  0); \
+                    IEM_MC_ARG_CONST(uint64_t,          u64Src, /*=*/ bImm & 0x3f,  2); \
+                    IEM_MC_CALL_AIMPL_3(uint32_t, fEFlagsRet, a_fnNormalU64, fEFlagsIn, pu64Dst, u64Src); \
                     \
                     IEM_MC_MEM_COMMIT_AND_UNMAP_RO(bUnmapInfo); \
-                    IEM_MC_COMMIT_EFLAGS(EFlags); \
+                    IEM_MC_COMMIT_EFLAGS(fEFlagsRet); \
                     IEM_MC_ADVANCE_RIP_AND_FINISH(); \
                     IEM_MC_END(); \
Index: trunk/src/VBox/VMM/include/IEMInternal.h
===================================================================
--- trunk/src/VBox/VMM/include/IEMInternal.h	(revision 104206)
+++ trunk/src/VBox/VMM/include/IEMInternal.h	(revision 104207)
@@ -2686,25 +2686,18 @@
 /** @}  */
 
-typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINTODOROU16,(uint16_t const *pu16Dst, uint16_t u16Src, uint32_t *pEFlags));
-typedef FNIEMAIMPLBINTODOROU16 *PFNIEMAIMPLBINTODOROU16;
-typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINTODOROU32,(uint32_t const *pu32Dst, uint32_t u32Src, uint32_t *pEFlags));
-typedef FNIEMAIMPLBINTODOROU32 *PFNIEMAIMPLBINTODOROU32;
-typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINTODOROU64,(uint64_t const *pu64Dst, uint64_t u64Src, uint32_t *pEFlags));
-typedef FNIEMAIMPLBINTODOROU64 *PFNIEMAIMPLBINTODOROU64;
-
 /** @name Bit operations operations (thrown in with the binary ops).
  * @{ */
-FNIEMAIMPLBINTODOROU16 iemAImpl_bt_u16;
-FNIEMAIMPLBINTODOROU32 iemAImpl_bt_u32;
-FNIEMAIMPLBINTODOROU64 iemAImpl_bt_u64;
-FNIEMAIMPLBINTODOU16 iemAImpl_btc_u16, iemAImpl_btc_u16_locked;
-FNIEMAIMPLBINTODOU32 iemAImpl_btc_u32, iemAImpl_btc_u32_locked;
-FNIEMAIMPLBINTODOU64 iemAImpl_btc_u64, iemAImpl_btc_u64_locked;
-FNIEMAIMPLBINTODOU16 iemAImpl_btr_u16, iemAImpl_btr_u16_locked;
-FNIEMAIMPLBINTODOU32 iemAImpl_btr_u32, iemAImpl_btr_u32_locked;
-FNIEMAIMPLBINTODOU64 iemAImpl_btr_u64, iemAImpl_btr_u64_locked;
-FNIEMAIMPLBINTODOU16 iemAImpl_bts_u16, iemAImpl_bts_u16_locked;
-FNIEMAIMPLBINTODOU32 iemAImpl_bts_u32, iemAImpl_bts_u32_locked;
-FNIEMAIMPLBINTODOU64 iemAImpl_bts_u64, iemAImpl_bts_u64_locked;
+FNIEMAIMPLBINROU16 iemAImpl_bt_u16;
+FNIEMAIMPLBINROU32 iemAImpl_bt_u32;
+FNIEMAIMPLBINROU64 iemAImpl_bt_u64;
+FNIEMAIMPLBINU16 iemAImpl_btc_u16, iemAImpl_btc_u16_locked;
+FNIEMAIMPLBINU32 iemAImpl_btc_u32, iemAImpl_btc_u32_locked;
+FNIEMAIMPLBINU64 iemAImpl_btc_u64, iemAImpl_btc_u64_locked;
+FNIEMAIMPLBINU16 iemAImpl_btr_u16, iemAImpl_btr_u16_locked;
+FNIEMAIMPLBINU32 iemAImpl_btr_u32, iemAImpl_btr_u32_locked;
+FNIEMAIMPLBINU64 iemAImpl_btr_u64, iemAImpl_btr_u64_locked;
+FNIEMAIMPLBINU16 iemAImpl_bts_u16, iemAImpl_bts_u16_locked;
+FNIEMAIMPLBINU32 iemAImpl_bts_u32, iemAImpl_bts_u32_locked;
+FNIEMAIMPLBINU64 iemAImpl_bts_u64, iemAImpl_bts_u64_locked;
 /** @}  */
 
Index: trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp
===================================================================
--- trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp	(revision 104206)
+++ trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp	(revision 104207)
@@ -1938,5 +1938,4 @@
     ENTRY_BIN_PFN_CAST(cmp_u16,   PFNIEMAIMPLBINU16),
     ENTRY_BIN_PFN_CAST(test_u16,  PFNIEMAIMPLBINU16),
-#if 0 /** @todo convert to new eflags format  */
     ENTRY_BIN_PFN_CAST_EX(bt_u16, PFNIEMAIMPLBINU16, 1),
     ENTRY_BIN_EX(btc_u16, 1),
@@ -1946,5 +1945,4 @@
     ENTRY_BIN_EX(bts_u16, 1),
     ENTRY_BIN_EX(bts_u16_locked, 1),
-#endif
     ENTRY_BIN_AMD(  bsf_u16, X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_SF | X86_EFL_OF),
     ENTRY_BIN_INTEL(bsf_u16, X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_SF | X86_EFL_OF),
@@ -1988,5 +1986,4 @@
     ENTRY_BIN_PFN_CAST(cmp_u32,   PFNIEMAIMPLBINU32),
     ENTRY_BIN_PFN_CAST(test_u32,  PFNIEMAIMPLBINU32),
-#if 0 /** @todo convert to new eflags format  */
     ENTRY_BIN_PFN_CAST_EX(bt_u32, PFNIEMAIMPLBINU32, 1),
     ENTRY_BIN_EX(btc_u32, 1),
@@ -1996,5 +1993,4 @@
     ENTRY_BIN_EX(bts_u32, 1),
     ENTRY_BIN_EX(bts_u32_locked, 1),
-#endif
     ENTRY_BIN_AMD(  bsf_u32, X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_SF | X86_EFL_OF),
     ENTRY_BIN_INTEL(bsf_u32, X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_SF | X86_EFL_OF),
@@ -2039,5 +2035,4 @@
     ENTRY_BIN_PFN_CAST(cmp_u64,   PFNIEMAIMPLBINU64),
     ENTRY_BIN_PFN_CAST(test_u64,  PFNIEMAIMPLBINU64),
-#if 0 /** @todo convert to new eflags format  */
     ENTRY_BIN_PFN_CAST_EX(bt_u64, PFNIEMAIMPLBINU64, 1),
     ENTRY_BIN_EX(btc_u64, 1),
@@ -2047,5 +2042,4 @@
     ENTRY_BIN_EX(bts_u64, 1),
     ENTRY_BIN_EX(bts_u64_locked, 1),
-#endif
     ENTRY_BIN_AMD(  bsf_u64, X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_SF | X86_EFL_OF),
     ENTRY_BIN_INTEL(bsf_u64, X86_EFL_CF | X86_EFL_PF | X86_EFL_AF | X86_EFL_SF | X86_EFL_OF),
