Index: unk/src/VBox/Disassembler/DisasmTest.cpp
===================================================================
--- /trunk/src/VBox/Disassembler/DisasmTest.cpp	(revision 41750)
+++ 	(revision )
@@ -1,94 +1,0 @@
-/* $Id$ */
-/** @file
- * VBox disassembler - Test application
- */
-
-/*
- * Copyright (C) 2006-2012 Oracle Corporation
- *
- * This file is part of VirtualBox Open Source Edition (OSE), as
- * available from http://www.virtualbox.org. This file is free software;
- * you can redistribute it and/or modify it under the terms of the GNU
- * General Public License (GPL) as published by the Free Software
- * Foundation, in version 2 as it comes in the "COPYING" file of the
- * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
- */
-
-/*******************************************************************************
-*   Header Files                                                               *
-*******************************************************************************/
-#include <VBox/dis.h>
-#include <iprt/test.h>
-#include <iprt/ctype.h>
-#include <iprt/string.h>
-#include <iprt/err.h>
-
-
-DECLASM(int) TestProc32(void);
-DECLASM(int) TestProc32_EndProc(void);
-#ifndef RT_OS_OS2
-DECLASM(int) TestProc64(void);
-DECLASM(int) TestProc64_EndProc(void);
-#endif
-//uint8_t aCode16[] = { 0x66, 0x67, 0x89, 0x07 };
-
-static void testDisas(const char *pszSub, uint8_t const *pabInstrs, uintptr_t uEndPtr, DISCPUMODE enmDisCpuMode)
-{
-    RTTestISub(pszSub);
-    size_t const cbInstrs = uEndPtr - (uintptr_t)pabInstrs;
-    for (size_t off = 0; off < cbInstrs;)
-    {
-        uint32_t const  cErrBefore = RTTestIErrorCount();
-        uint32_t        cb = 1;
-        DISCPUSTATE     Cpu;
-        char            szOutput[256] = {0};
-        int rc = DISInstrToStr(&pabInstrs[off], enmDisCpuMode, &Cpu, &cb, szOutput, sizeof(szOutput));
-
-        RTTESTI_CHECK_RC(rc, VINF_SUCCESS);
-        RTTESTI_CHECK(cb == Cpu.cbInstr);
-        RTTESTI_CHECK(cb > 0);
-        RTTESTI_CHECK(cb <= 16);
-        RTStrStripR(szOutput);
-        RTTESTI_CHECK(szOutput[0]);
-        if (szOutput[0])
-        {
-            char *pszBytes = strchr(szOutput, '[');
-            RTTESTI_CHECK(pszBytes);
-            if (pszBytes)
-            {
-                RTTESTI_CHECK(pszBytes[-1] == ' ');
-                RTTESTI_CHECK(RT_C_IS_XDIGIT(pszBytes[1]));
-                RTTESTI_CHECK(pszBytes[cb * 3] == ']');
-                RTTESTI_CHECK(pszBytes[cb * 3 + 1] == ' ');
-
-                size_t cch = strlen(szOutput);
-                RTTESTI_CHECK(szOutput[cch - 1] != ',');
-            }
-        }
-        if (cErrBefore != RTTestIErrorCount())
-            RTTestIFailureDetails("rc=%Rrc, off=%#x (%u) cbInstr=%u enmDisCpuMode=%d\n",
-                                  rc, off, Cpu.cbInstr, enmDisCpuMode);
-        RTTestIPrintf(RTTESTLVL_ALWAYS, "%s\n", szOutput);
-        off += cb;
-    }
-
-}
-
-
-int main(int argc, char **argv)
-{
-    RTTEST hTest;
-    RTEXITCODE rcExit = RTTestInitAndCreate("tstDisasm", &hTest);
-    if (rcExit)
-        return rcExit;
-    RTTestBanner(hTest);
-
-    testDisas("32-bit", (uint8_t const *)(uintptr_t)TestProc32, (uintptr_t)&TestProc32_EndProc, DISCPUMODE_32BIT);
-#ifndef RT_OS_OS2
-    testDisas("64-bit", (uint8_t const *)(uintptr_t)TestProc64, (uintptr_t)&TestProc64_EndProc, DISCPUMODE_64BIT);
-#endif
-
-    return RTTestSummaryAndDestroy(hTest);
-}
-
Index: unk/src/VBox/Disassembler/DisasmTestA.asm
===================================================================
--- /trunk/src/VBox/Disassembler/DisasmTestA.asm	(revision 41750)
+++ 	(revision )
@@ -1,176 +1,0 @@
-; $Id$
-;; @file
-; VBox disassembler: Assembler test routines
-;
-
-;
-; Copyright (C) 2006-2010 Oracle Corporation
-;
-; This file is part of VirtualBox Open Source Edition (OSE), as
-; available from http://www.virtualbox.org. This file is free software;
-; you can redistribute it and/or modify it under the terms of the GNU
-; General Public License (GPL) as published by the Free Software
-; Foundation, in version 2 as it comes in the "COPYING" file of the
-; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-;
-
-;*******************************************************************************
-;* Header Files                                                                *
-;*******************************************************************************
-%include "iprt/asmdefs.mac"
-;%include "VBox/vmm/vm.mac"
-;%include "VBox/err.mac"
-;%include "VBox/vmm/stam.mac"
-;%include "iprt/x86.mac"
-
-BITS 32
-
-
-BEGINCODE
-
-align 16
-BEGINPROC   TestProc32
-        xor eax, eax
-        mov al, 4
-        lea edx, [4]
-        mov edx, 4
-        mov eax, 4
-        shl eax, 4
-        shl edx, 4
-        shr edx, 4
-        mov eax, edx
-        mov eax, ecx
-        mov edx, eax
-        mov ecx, eax
-        DB 0xF0, 0x0F, 0x22, 0xC0
-        DB 0xF0, 0x0F, 0x20, 0xC0
-        smsw  word [edx+16]
-        ;    invept      eax, qword [ecx]
-        DB          0x66, 0x0F, 0x38, 0x80, 0x1
-        ;    invept      eax, qword [ecx]
-        DB          0x66, 0x0F, 0x38, 0x81, 0x1
-        mov   eax, dword [ecx]
-        mov   word [edi], 0123ah
-        movzx eax,byte  [edx]
-        movzx eax,word  [edx]
-        mov dword [es:ebx + 1234h], 0789h
-        mov word  [fs:ebx + ecx], 0654h
-        mov byte  [esi + eax*4], 054h
-        mov bl, byte [ds:ebp + 1234h]
-        mov al, [cs:1234h + ecx*8]
-        mov al, [cs:1234h]
-        mov ax, [cs:1234h]
-        mov eax, [cs:1234h]
-        lock cmpxchg [ecx], eax
-        lock cmpxchg [ecx], ax
-        lock cmpxchg [ecx], dl
-        movzx ESI,word  [EAX]
-        in al, dx
-        in ax, dx
-        in eax, dx
-        mov ebx, [ecx + eax*4 + 17]
-        mov ebx, [ebp + eax*4 + 4]
-        mov ebx, [ebp + eax*4]
-        int 80h
-        in  al, 60h
-        in  ax, dx
-        out 64h, eax
-
-        movss xmm0, xmm1
-        movss xmm3, [eax]
-        movss [eax], xmm4
-        movsd xmm6, xmm1
-
-        pause
-        nop
-ENDPROC   TestProc32
-
-
-%ifndef RT_OS_OS2
-BITS 64
-align 16
-BEGINPROC TestProc64
-        mov cr8, rax
-        mov cr8, rbx
-        mov [0xfffe0080], rax
-        mov [0xfffe0080], rbx
-        mov rax, cr8
-        mov rbx, cr8
-        mov rax, [0xfffe0080]
-        mov rbx, [0xfffe0080]
-        divsd xmm1, xmm0
-        ;    invept      rdi, qword [rsi]
-        DB          0x66, 0x0F, 0x38, 0x80, 0x3E
-        ;    invept      rcx, qword [rdx]
-        DB          0x66, 0x0F, 0x38, 0x80, 0xA
-        ;invvpid     rdi, qword [rsi]
-        DB          0x66, 0x0F, 0x38, 0x81, 0x3E
-        ;    invvpid     rcx, qword [rdx]
-        DB          0x66, 0x0F, 0x38, 0x81, 0xA
-        mov   rdi, [rsi]
-        mov   rcx, [rdx]
-        db 48h
-        db 0c7h
-        db 42h
-        db 18h
-        db 20h
-        db 3eh
-        db 23h
-        db 80h
-        call qword [r8+10h]
-        ; test
-        db 48h
-        db 8bh
-        db 44h
-        db 0ah
-        db 0f8h
-        ;incorrectly assembled by yasm; REX.W should not be added!
-        ;test rax, dword 0cc90cc90h
-        db 8bh
-        db 04h
-        db 8dh
-        db 00h
-        db 00h
-        db 0feh
-        db 0ffh
-        mov   qword [rcx+rdx], 0
-        mov   dword [rcx+rdx], 0
-        and   [r15], rax
-        movzx rcx, sil
-        and   sil, 3
-        movzx ecx, ah
-        and   ah, 3
-
-        sub rcx, 1234h
-        mov rax, qword [0cc90cc90h]
-        mov rax, qword [00c90cc90h]
-        mov rax, dword 0cc90cc90h
-        mov rax, qword 0ffffcc90cc90h
-
-        movzx rax,byte  [edx]
-        movzx rax,word  [edx]
-        movzx rax,byte  [rdx]
-        lock cmpxchg [rcx], rax
-        lock cmpxchg [rcx], ax
-        lock cmpxchg [r15], dl
-        movzx RSI, word [R8]
-        in al, dx
-        in ax, dx
-        in eax, dx
-        mov rbx, [rcx + rax*4 + 17]
-        mov rbx, [rbp + rax*4 + 4]
-        mov rbx, [rbp + rax*4]
-        mov rbx, [ebp + eax*4]
-        int 80h
-        in  al, 60h
-        in  ax, dx
-        out 64h, eax
-
-        movss xmm0, xmm14
-        movsd xmm6, xmm1
-
-        ret
-ENDPROC   TestProc64
-%endif ; !OS2
-
Index: /trunk/src/VBox/Disassembler/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Disassembler/Makefile.kmk	(revision 41750)
+++ /trunk/src/VBox/Disassembler/Makefile.kmk	(revision 41751)
@@ -66,17 +66,4 @@
 	DisasmTablesX64.cpp
 
-
-ifdef VBOX_WITH_TESTCASES
- # testcase that hasn't been moved yet.
- PROGRAMS              += tstDisasm
- tstDisasm_TEMPLATE     = VBOXR3TSTEXE
- tstDisasm_DEFS         = IN_DIS
- tstDisasm_SOURCES      = DisasmTest.cpp DisasmTestA.asm
- tstDisasm_LIBS         = \
- 	$(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
- 	$(LIB_RUNTIME)
-
- endif # VBOX_WITH_TESTCASES
-
 include $(FILE_KBUILD_SUB_FOOTER)
 
Index: /trunk/src/VBox/Disassembler/testcase/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Disassembler/testcase/Makefile.kmk	(revision 41750)
+++ /trunk/src/VBox/Disassembler/testcase/Makefile.kmk	(revision 41751)
@@ -19,4 +19,16 @@
 include $(KBUILD_PATH)/subheader.kmk
 ifdef VBOX_WITH_TESTCASES
+
+
+PROGRAMS               += tstDisasm-1
+tstDisasm-1_TEMPLATE    = VBOXR3TSTEXE
+tstDisasm-1_DEFS        = IN_DIS
+tstDisasm-1_SOURCES     = \
+	tstDisasm-1.cpp \
+	tstDisasm-1A.asm
+tstDisasm-1_LIBS        = \
+	$(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
+	$(LIB_RUNTIME)
+
 
 PROGRAMS += tstDisasm-2
Index: /trunk/src/VBox/Disassembler/testcase/tstDisasm-1.cpp
===================================================================
--- /trunk/src/VBox/Disassembler/testcase/tstDisasm-1.cpp	(revision 41751)
+++ /trunk/src/VBox/Disassembler/testcase/tstDisasm-1.cpp	(revision 41751)
@@ -0,0 +1,94 @@
+/* $Id$ */
+/** @file
+ * VBox disassembler - Test application
+ */
+
+/*
+ * Copyright (C) 2006-2012 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ */
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include <VBox/dis.h>
+#include <iprt/test.h>
+#include <iprt/ctype.h>
+#include <iprt/string.h>
+#include <iprt/err.h>
+
+
+DECLASM(int) TestProc32(void);
+DECLASM(int) TestProc32_EndProc(void);
+#ifndef RT_OS_OS2
+DECLASM(int) TestProc64(void);
+DECLASM(int) TestProc64_EndProc(void);
+#endif
+//uint8_t aCode16[] = { 0x66, 0x67, 0x89, 0x07 };
+
+static void testDisas(const char *pszSub, uint8_t const *pabInstrs, uintptr_t uEndPtr, DISCPUMODE enmDisCpuMode)
+{
+    RTTestISub(pszSub);
+    size_t const cbInstrs = uEndPtr - (uintptr_t)pabInstrs;
+    for (size_t off = 0; off < cbInstrs;)
+    {
+        uint32_t const  cErrBefore = RTTestIErrorCount();
+        uint32_t        cb = 1;
+        DISCPUSTATE     Cpu;
+        char            szOutput[256] = {0};
+        int rc = DISInstrToStr(&pabInstrs[off], enmDisCpuMode, &Cpu, &cb, szOutput, sizeof(szOutput));
+
+        RTTESTI_CHECK_RC(rc, VINF_SUCCESS);
+        RTTESTI_CHECK(cb == Cpu.cbInstr);
+        RTTESTI_CHECK(cb > 0);
+        RTTESTI_CHECK(cb <= 16);
+        RTStrStripR(szOutput);
+        RTTESTI_CHECK(szOutput[0]);
+        if (szOutput[0])
+        {
+            char *pszBytes = strchr(szOutput, '[');
+            RTTESTI_CHECK(pszBytes);
+            if (pszBytes)
+            {
+                RTTESTI_CHECK(pszBytes[-1] == ' ');
+                RTTESTI_CHECK(RT_C_IS_XDIGIT(pszBytes[1]));
+                RTTESTI_CHECK(pszBytes[cb * 3] == ']');
+                RTTESTI_CHECK(pszBytes[cb * 3 + 1] == ' ');
+
+                size_t cch = strlen(szOutput);
+                RTTESTI_CHECK(szOutput[cch - 1] != ',');
+            }
+        }
+        if (cErrBefore != RTTestIErrorCount())
+            RTTestIFailureDetails("rc=%Rrc, off=%#x (%u) cbInstr=%u enmDisCpuMode=%d\n",
+                                  rc, off, Cpu.cbInstr, enmDisCpuMode);
+        RTTestIPrintf(RTTESTLVL_ALWAYS, "%s\n", szOutput);
+        off += cb;
+    }
+
+}
+
+
+int main(int argc, char **argv)
+{
+    RTTEST hTest;
+    RTEXITCODE rcExit = RTTestInitAndCreate("tstDisasm", &hTest);
+    if (rcExit)
+        return rcExit;
+    RTTestBanner(hTest);
+
+    testDisas("32-bit", (uint8_t const *)(uintptr_t)TestProc32, (uintptr_t)&TestProc32_EndProc, DISCPUMODE_32BIT);
+#ifndef RT_OS_OS2
+    testDisas("64-bit", (uint8_t const *)(uintptr_t)TestProc64, (uintptr_t)&TestProc64_EndProc, DISCPUMODE_64BIT);
+#endif
+
+    return RTTestSummaryAndDestroy(hTest);
+}
+
Index: /trunk/src/VBox/Disassembler/testcase/tstDisasm-1A.asm
===================================================================
--- /trunk/src/VBox/Disassembler/testcase/tstDisasm-1A.asm	(revision 41751)
+++ /trunk/src/VBox/Disassembler/testcase/tstDisasm-1A.asm	(revision 41751)
@@ -0,0 +1,176 @@
+; $Id$
+;; @file
+; VBox disassembler: Assembler test routines
+;
+
+;
+; Copyright (C) 2006-2010 Oracle Corporation
+;
+; This file is part of VirtualBox Open Source Edition (OSE), as
+; available from http://www.virtualbox.org. This file is free software;
+; you can redistribute it and/or modify it under the terms of the GNU
+; General Public License (GPL) as published by the Free Software
+; Foundation, in version 2 as it comes in the "COPYING" file of the
+; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+;
+
+;*******************************************************************************
+;* Header Files                                                                *
+;*******************************************************************************
+%include "iprt/asmdefs.mac"
+;%include "VBox/vmm/vm.mac"
+;%include "VBox/err.mac"
+;%include "VBox/vmm/stam.mac"
+;%include "iprt/x86.mac"
+
+BITS 32
+
+
+BEGINCODE
+
+align 16
+BEGINPROC   TestProc32
+        xor eax, eax
+        mov al, 4
+        lea edx, [4]
+        mov edx, 4
+        mov eax, 4
+        shl eax, 4
+        shl edx, 4
+        shr edx, 4
+        mov eax, edx
+        mov eax, ecx
+        mov edx, eax
+        mov ecx, eax
+        DB 0xF0, 0x0F, 0x22, 0xC0
+        DB 0xF0, 0x0F, 0x20, 0xC0
+        smsw  word [edx+16]
+        ;    invept      eax, qword [ecx]
+        DB          0x66, 0x0F, 0x38, 0x80, 0x1
+        ;    invept      eax, qword [ecx]
+        DB          0x66, 0x0F, 0x38, 0x81, 0x1
+        mov   eax, dword [ecx]
+        mov   word [edi], 0123ah
+        movzx eax,byte  [edx]
+        movzx eax,word  [edx]
+        mov dword [es:ebx + 1234h], 0789h
+        mov word  [fs:ebx + ecx], 0654h
+        mov byte  [esi + eax*4], 054h
+        mov bl, byte [ds:ebp + 1234h]
+        mov al, [cs:1234h + ecx*8]
+        mov al, [cs:1234h]
+        mov ax, [cs:1234h]
+        mov eax, [cs:1234h]
+        lock cmpxchg [ecx], eax
+        lock cmpxchg [ecx], ax
+        lock cmpxchg [ecx], dl
+        movzx ESI,word  [EAX]
+        in al, dx
+        in ax, dx
+        in eax, dx
+        mov ebx, [ecx + eax*4 + 17]
+        mov ebx, [ebp + eax*4 + 4]
+        mov ebx, [ebp + eax*4]
+        int 80h
+        in  al, 60h
+        in  ax, dx
+        out 64h, eax
+
+        movss xmm0, xmm1
+        movss xmm3, [eax]
+        movss [eax], xmm4
+        movsd xmm6, xmm1
+
+        pause
+        nop
+ENDPROC   TestProc32
+
+
+%ifndef RT_OS_OS2
+BITS 64
+align 16
+BEGINPROC TestProc64
+        mov cr8, rax
+        mov cr8, rbx
+        mov [0xfffe0080], rax
+        mov [0xfffe0080], rbx
+        mov rax, cr8
+        mov rbx, cr8
+        mov rax, [0xfffe0080]
+        mov rbx, [0xfffe0080]
+        divsd xmm1, xmm0
+        ;    invept      rdi, qword [rsi]
+        DB          0x66, 0x0F, 0x38, 0x80, 0x3E
+        ;    invept      rcx, qword [rdx]
+        DB          0x66, 0x0F, 0x38, 0x80, 0xA
+        ;invvpid     rdi, qword [rsi]
+        DB          0x66, 0x0F, 0x38, 0x81, 0x3E
+        ;    invvpid     rcx, qword [rdx]
+        DB          0x66, 0x0F, 0x38, 0x81, 0xA
+        mov   rdi, [rsi]
+        mov   rcx, [rdx]
+        db 48h
+        db 0c7h
+        db 42h
+        db 18h
+        db 20h
+        db 3eh
+        db 23h
+        db 80h
+        call qword [r8+10h]
+        ; test
+        db 48h
+        db 8bh
+        db 44h
+        db 0ah
+        db 0f8h
+        ;incorrectly assembled by yasm; REX.W should not be added!
+        ;test rax, dword 0cc90cc90h
+        db 8bh
+        db 04h
+        db 8dh
+        db 00h
+        db 00h
+        db 0feh
+        db 0ffh
+        mov   qword [rcx+rdx], 0
+        mov   dword [rcx+rdx], 0
+        and   [r15], rax
+        movzx rcx, sil
+        and   sil, 3
+        movzx ecx, ah
+        and   ah, 3
+
+        sub rcx, 1234h
+        mov rax, qword [0cc90cc90h]
+        mov rax, qword [00c90cc90h]
+        mov rax, dword 0cc90cc90h
+        mov rax, qword 0ffffcc90cc90h
+
+        movzx rax,byte  [edx]
+        movzx rax,word  [edx]
+        movzx rax,byte  [rdx]
+        lock cmpxchg [rcx], rax
+        lock cmpxchg [rcx], ax
+        lock cmpxchg [r15], dl
+        movzx RSI, word [R8]
+        in al, dx
+        in ax, dx
+        in eax, dx
+        mov rbx, [rcx + rax*4 + 17]
+        mov rbx, [rbp + rax*4 + 4]
+        mov rbx, [rbp + rax*4]
+        mov rbx, [ebp + eax*4]
+        int 80h
+        in  al, 60h
+        in  ax, dx
+        out 64h, eax
+
+        movss xmm0, xmm14
+        movsd xmm6, xmm1
+
+        ret
+ENDPROC   TestProc64
+%endif ; !OS2
+
