Index: /trunk/include/VBox/err.h
===================================================================
--- /trunk/include/VBox/err.h	(revision 56628)
+++ /trunk/include/VBox/err.h	(revision 56629)
@@ -2296,14 +2296,26 @@
  *  VERR, VERW).  This is not used outside the instruction implementations. */
 #define VINF_IEM_SELECTOR_NOT_OK                    (5305)
+/** Restart the current instruction. For testing only. */
+#define VERR_IEM_RESTART_INSTRUCTION                (-5389)
 /** This particular aspect of the instruction is not yet implemented by IEM. */
-#define VERR_IEM_ASPECT_NOT_IMPLEMENTED             (-5391)
-/** Internal processing error \#1 in the IEM code.. */
-#define VERR_IEM_IPE_1                              (-5392)
-/** Internal processing error \#2 in the IEM code.. */
-#define VERR_IEM_IPE_2                              (-5393)
-/** Internal processing error \#3 in the IEM code.. */
-#define VERR_IEM_IPE_3                              (-5394)
-/** Restart the current instruction. For testing only. */
-#define VERR_IEM_RESTART_INSTRUCTION                (-5395)
+#define VERR_IEM_ASPECT_NOT_IMPLEMENTED             (-5390)
+/** Internal processing error \#1 in the IEM code. */
+#define VERR_IEM_IPE_1                              (-5391)
+/** Internal processing error \#2 in the IEM code. */
+#define VERR_IEM_IPE_2                              (-5392)
+/** Internal processing error \#3 in the IEM code. */
+#define VERR_IEM_IPE_3                              (-5393)
+/** Internal processing error \#4 in the IEM code. */
+#define VERR_IEM_IPE_4                              (-5394)
+/** Internal processing error \#5 in the IEM code. */
+#define VERR_IEM_IPE_5                              (-5395)
+/** Internal processing error \#6 in the IEM code. */
+#define VERR_IEM_IPE_6                              (-5396)
+/** Internal processing error \#7 in the IEM code. */
+#define VERR_IEM_IPE_7                              (-5397)
+/** Internal processing error \#8 in the IEM code. */
+#define VERR_IEM_IPE_8                              (-5398)
+/** Internal processing error \#9 in the IEM code. */
+#define VERR_IEM_IPE_9                              (-5399)
 /** @} */
 
Index: /trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IEMAll.cpp	(revision 56628)
+++ /trunk/src/VBox/VMM/VMMAll/IEMAll.cpp	(revision 56629)
@@ -2150,5 +2150,5 @@
 
         default:
-            AssertFailedReturn(VERR_INTERNAL_ERROR_2);
+            AssertFailedReturn(VERR_IEM_IPE_4);
     }
     return rcStrict;
@@ -2172,5 +2172,5 @@
     *puRsp  = 0; /* make gcc happy */
 
-    AssertReturn(pCtx->tr.Attr.n.u4Type == AMD64_SEL_TYPE_SYS_TSS_BUSY, VERR_INTERNAL_ERROR_2);
+    AssertReturn(pCtx->tr.Attr.n.u4Type == AMD64_SEL_TYPE_SYS_TSS_BUSY, VERR_IEM_IPE_5);
 
     uint32_t off;
@@ -2229,5 +2229,5 @@
                             uint64_t    uCr2)
 {
-    AssertReturn(pIemCpu->enmCpuMode == IEMMODE_16BIT, VERR_INTERNAL_ERROR_3);
+    AssertReturn(pIemCpu->enmCpuMode == IEMMODE_16BIT, VERR_IEM_IPE_6);
     NOREF(uErr); NOREF(uCr2);
 
@@ -6238,5 +6238,5 @@
 
         default:
-            AssertFailedReturn(VERR_INTERNAL_ERROR_5);
+            AssertFailedReturn(VERR_IEM_IPE_7);
     }
 }
@@ -6832,5 +6832,5 @@
         && rcMap != VERR_PGM_PHYS_TLB_UNASSIGNED)
     {
-        AssertReturn(RT_FAILURE_NP(rcMap), VERR_INTERNAL_ERROR_3);
+        AssertReturn(RT_FAILURE_NP(rcMap), VERR_IEM_IPE_8);
         return rcMap;
     }
@@ -6968,5 +6968,5 @@
     {
         iMemMap = iemMemMapFindFree(pIemCpu);
-        AssertReturn(iMemMap < RT_ELEMENTS(pIemCpu->aMemMappings), VERR_INTERNAL_ERROR_3);
+        AssertReturn(iMemMap < RT_ELEMENTS(pIemCpu->aMemMappings), VERR_IEM_IPE_9);
     }
 
@@ -9442,5 +9442,5 @@
                     case 1:  IEM_OPCODE_GET_NEXT_S8_SX_U16(&u16EffAddr); break;
                     case 2:  IEM_OPCODE_GET_NEXT_U16(&u16EffAddr);       break;
-                    default: AssertFailedReturn(VERR_INTERNAL_ERROR_2); /* (caller checked for these) */
+                    default: AssertFailedReturn(VERR_IEM_IPE_1); /* (caller checked for these) */
                 }
 
@@ -9548,5 +9548,5 @@
                     }
                     default:
-                        AssertFailedReturn(VERR_INTERNAL_ERROR_2); /* (caller checked for these) */
+                        AssertFailedReturn(VERR_IEM_IPE_2); /* (caller checked for these) */
                 }
 
Index: /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h	(revision 56628)
+++ /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h	(revision 56629)
@@ -5288,5 +5288,5 @@
     {
         int rc = CPUMSetGuestDRx(IEMCPU_TO_VMCPU(pIemCpu), iDrReg, uNewDrX);
-        AssertRCSuccessReturn(rc, RT_SUCCESS_NP(rc) ? VERR_INTERNAL_ERROR : rc);
+        AssertRCSuccessReturn(rc, RT_SUCCESS_NP(rc) ? VERR_IEM_IPE_1 : rc);
     }
     else
@@ -5443,5 +5443,5 @@
         *pCtx2 = CtxTmp;
 #else
-        AssertReleaseFailedReturn(VERR_INTERNAL_ERROR_4);
+        AssertReleaseFailedReturn(VERR_IEM_IPE_2);
 #endif
     }
@@ -5504,5 +5504,5 @@
             case 2: pCtx->ax  = (uint16_t)u32Value; break;
             case 4: pCtx->rax = u32Value;           break;
-            default: AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+            default: AssertFailedReturn(VERR_IEM_IPE_3);
         }
         iemRegAddToRipAndClearRF(pIemCpu, cbInstr);
@@ -5568,5 +5568,5 @@
         case 2: u32Value = pCtx->ax;  break;
         case 4: u32Value = pCtx->eax; break;
-        default: AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+        default: AssertFailedReturn(VERR_IEM_IPE_4);
     }
     if (!IEM_VERIFICATION_ENABLED(pIemCpu))
Index: /trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h	(revision 56628)
+++ /trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h	(revision 56629)
@@ -8456,5 +8456,5 @@
         }
     }
-    AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+    AssertFailedReturn(VERR_IEM_IPE_9);
 }
 
@@ -8637,5 +8637,5 @@
             return VINF_SUCCESS;
     }
-    AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+    AssertFailedReturn(VERR_IEM_IPE_8);
 }
 
@@ -10105,5 +10105,5 @@
             return VINF_SUCCESS;
     }
-    AssertFailedReturn(VERR_INTERNAL_ERROR_5);
+    AssertFailedReturn(VERR_IEM_IPE_7);
 }
 
@@ -10844,5 +10844,5 @@
                 switch (pIemCpu->enmEffAddrMode)
                 {
-                    case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+                    case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_6);
                     case IEMMODE_32BIT: return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_rep_movs_op64_addr32, pIemCpu->iEffSeg);
                     case IEMMODE_64BIT: return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_rep_movs_op64_addr64, pIemCpu->iEffSeg);
@@ -10883,5 +10883,5 @@
             switch (pIemCpu->enmEffAddrMode)
             {
-                case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_4); /* cannot be encoded */ break;
+                case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_1); /* cannot be encoded */ break;
                 case IEMMODE_32BIT: IEM_MOVS_CASE(64, 32); break;
                 case IEMMODE_64BIT: IEM_MOVS_CASE(64, 64); break;
@@ -11003,5 +11003,5 @@
                 switch (pIemCpu->enmEffAddrMode)
                 {
-                    case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+                    case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_4);
                     case IEMMODE_32BIT: return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_repe_cmps_op64_addr32, pIemCpu->iEffSeg);
                     case IEMMODE_64BIT: return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_repe_cmps_op64_addr64, pIemCpu->iEffSeg);
@@ -11037,5 +11037,5 @@
                 switch (pIemCpu->enmEffAddrMode)
                 {
-                    case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+                    case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_2);
                     case IEMMODE_32BIT: return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_repne_cmps_op64_addr32, pIemCpu->iEffSeg);
                     case IEMMODE_64BIT: return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_repne_cmps_op64_addr64, pIemCpu->iEffSeg);
@@ -11077,5 +11077,5 @@
             switch (pIemCpu->enmEffAddrMode)
             {
-                case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_4); /* cannot be encoded */ break;
+                case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_1); /* cannot be encoded */ break;
                 case IEMMODE_32BIT: IEM_CMPS_CASE(64, 32); break;
                 case IEMMODE_64BIT: IEM_CMPS_CASE(64, 64); break;
@@ -11193,5 +11193,5 @@
                 switch (pIemCpu->enmEffAddrMode)
                 {
-                    case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+                    case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_9);
                     case IEMMODE_32BIT: return IEM_MC_DEFER_TO_CIMPL_0(iemCImpl_stos_rax_m32);
                     case IEMMODE_64BIT: return IEM_MC_DEFER_TO_CIMPL_0(iemCImpl_stos_rax_m64);
@@ -11232,5 +11232,5 @@
             switch (pIemCpu->enmEffAddrMode)
             {
-                case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_4); /* cannot be encoded */ break;
+                case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_1); /* cannot be encoded */ break;
                 case IEMMODE_32BIT: IEM_STOS_CASE(64, 32); break;
                 case IEMMODE_64BIT: IEM_STOS_CASE(64, 64); break;
@@ -11329,5 +11329,5 @@
                 switch (pIemCpu->enmEffAddrMode)
                 {
-                    case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+                    case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_7);
                     case IEMMODE_32BIT: return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_lods_rax_m32, pIemCpu->iEffSeg);
                     case IEMMODE_64BIT: return IEM_MC_DEFER_TO_CIMPL_1(iemCImpl_lods_rax_m64, pIemCpu->iEffSeg);
@@ -11368,5 +11368,5 @@
             switch (pIemCpu->enmEffAddrMode)
             {
-                case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_4); /* cannot be encoded */ break;
+                case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_1); /* cannot be encoded */ break;
                 case IEMMODE_32BIT: IEM_LODS_CASE(64, 32); break;
                 case IEMMODE_64BIT: IEM_LODS_CASE(64, 64); break;
@@ -11482,5 +11482,5 @@
                 switch (pIemCpu->enmEffAddrMode)
                 {
-                    case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_3); /** @todo It's this wrong, we can do 16-bit addressing in 64-bit mode, but not 32-bit. right? */
+                    case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_6); /** @todo It's this wrong, we can do 16-bit addressing in 64-bit mode, but not 32-bit. right? */
                     case IEMMODE_32BIT: return IEM_MC_DEFER_TO_CIMPL_0(iemCImpl_repe_scas_rax_m32);
                     case IEMMODE_64BIT: return IEM_MC_DEFER_TO_CIMPL_0(iemCImpl_repe_scas_rax_m64);
@@ -11515,5 +11515,5 @@
                 switch (pIemCpu->enmEffAddrMode)
                 {
-                    case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_3);
+                    case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_5);
                     case IEMMODE_32BIT: return IEM_MC_DEFER_TO_CIMPL_0(iemCImpl_repne_scas_rax_m32);
                     case IEMMODE_64BIT: return IEM_MC_DEFER_TO_CIMPL_0(iemCImpl_repne_scas_rax_m64);
@@ -11554,5 +11554,5 @@
             switch (pIemCpu->enmEffAddrMode)
             {
-                case IEMMODE_16BIT: AssertFailedReturn(VERR_INTERNAL_ERROR_4); /* cannot be encoded */ break;
+                case IEMMODE_16BIT: AssertFailedReturn(VERR_IEM_IPE_1); /* cannot be encoded */ break;
                 case IEMMODE_32BIT: IEM_SCAS_CASE(64, 32); break;
                 case IEMMODE_64BIT: IEM_SCAS_CASE(64, 64); break;
@@ -17301,5 +17301,5 @@
             return IEMOP_RAISE_INVALID_OPCODE();
     }
-    AssertFailedReturn(VERR_INTERNAL_ERROR_2);
+    AssertFailedReturn(VERR_IEM_IPE_3);
 }
 
