diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
---|---|---|
committer | <> | 2014-05-08 15:03:54 +0000 |
commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Disassembler/testcase | |
parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
download | VirtualBox-master.tar.gz |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Disassembler/testcase')
-rw-r--r-- | src/VBox/Disassembler/testcase/Makefile.kmk | 1 | ||||
-rw-r--r-- | src/VBox/Disassembler/testcase/tstAsm.mac | 14 | ||||
-rw-r--r-- | src/VBox/Disassembler/testcase/tstAsmLock-1.asm | 2 | ||||
-rw-r--r-- | src/VBox/Disassembler/testcase/tstAsmLock-2.asm | 2 | ||||
-rw-r--r-- | src/VBox/Disassembler/testcase/tstAsmLock-3.asm | 2 | ||||
-rw-r--r-- | src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm | 103 | ||||
-rw-r--r-- | src/VBox/Disassembler/testcase/tstAsmRegs-1.asm | 2 | ||||
-rw-r--r-- | src/VBox/Disassembler/testcase/tstDisasm-1A.asm | 6 | ||||
-rw-r--r-- | src/VBox/Disassembler/testcase/tstDisasm-2.cpp | 4 |
9 files changed, 124 insertions, 12 deletions
diff --git a/src/VBox/Disassembler/testcase/Makefile.kmk b/src/VBox/Disassembler/testcase/Makefile.kmk index 56da195f..d6f451f1 100644 --- a/src/VBox/Disassembler/testcase/Makefile.kmk +++ b/src/VBox/Disassembler/testcase/Makefile.kmk @@ -44,6 +44,7 @@ tstDisasm-2_LIBS = \ VBOX_DISAS_TESTS_BUILD = \ tstAsmFnstsw-1.asm \ tstAsmLock-1.asm \ + tstAsmMovFixedReg-1.asm \ tstAsmMovSeg-1.asm \ tstAsmMovzx-1.asm \ tstAsmPop-1.asm \ diff --git a/src/VBox/Disassembler/testcase/tstAsm.mac b/src/VBox/Disassembler/testcase/tstAsm.mac index 0854d861..0f9b292f 100644 --- a/src/VBox/Disassembler/testcase/tstAsm.mac +++ b/src/VBox/Disassembler/testcase/tstAsm.mac @@ -4,7 +4,7 @@ ; ; -; Copyright (C) 2008 Oracle Corporation +; Copyright (C) 2008-2013 Oracle Corporation ; ; This file is part of VirtualBox Open Source Edition (OSE), as ; available from http://www.virtualbox.org. This file is free software; @@ -16,7 +16,7 @@ ; %if TEST_BITS == 64 - %define xS 8 + %define xCB 8 %define xSP rsp %define xBP rbp %define xAX rax @@ -27,7 +27,7 @@ %define xSI rsi %endif %if TEST_BITS == 32 - %define xS 4 + %define xCB 4 %define xSP esp %define xBP ebp %define xAX eax @@ -38,7 +38,7 @@ %define xSI esi %endif %if TEST_BITS == 16 - %define xS 1 + %define xCB 2 %define xSP sp %define xBP bp %define xAX ax @@ -48,7 +48,11 @@ %define xDI di %define xSI si %endif -%ifndef xS +%ifndef xCB %error "TEST_BITS is missing or wrong." %endif +%if __YASM_VERSION_ID__ >= 001020001h ; v1.2.0.1 and greater, make sure to exclude v1.2.0.0. + %define pmulhrwa pmulhrw +%endif + diff --git a/src/VBox/Disassembler/testcase/tstAsmLock-1.asm b/src/VBox/Disassembler/testcase/tstAsmLock-1.asm index 53359201..218477cb 100644 --- a/src/VBox/Disassembler/testcase/tstAsmLock-1.asm +++ b/src/VBox/Disassembler/testcase/tstAsmLock-1.asm @@ -8,7 +8,7 @@ ; ; -; Copyright (C) 2008 Oracle Corporation +; Copyright (C) 2008-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; diff --git a/src/VBox/Disassembler/testcase/tstAsmLock-2.asm b/src/VBox/Disassembler/testcase/tstAsmLock-2.asm index f692b7e1..10ea6567 100644 --- a/src/VBox/Disassembler/testcase/tstAsmLock-2.asm +++ b/src/VBox/Disassembler/testcase/tstAsmLock-2.asm @@ -11,7 +11,7 @@ ; ; -; Copyright (C) 2008 Oracle Corporation +; Copyright (C) 2008-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; diff --git a/src/VBox/Disassembler/testcase/tstAsmLock-3.asm b/src/VBox/Disassembler/testcase/tstAsmLock-3.asm index ece8485a..f7fa171c 100644 --- a/src/VBox/Disassembler/testcase/tstAsmLock-3.asm +++ b/src/VBox/Disassembler/testcase/tstAsmLock-3.asm @@ -7,7 +7,7 @@ ; ; -; Copyright (C) 2008 Oracle Corporation +; Copyright (C) 2008-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; diff --git a/src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm b/src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm new file mode 100644 index 00000000..70c05aee --- /dev/null +++ b/src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm @@ -0,0 +1,103 @@ +; $Id: tstAsmMovFixedReg-1.asm $ +;; @file +; Disassembly testcase - Valid mov immediate to fixed registers. +; +; This is a build test, that means it will be assembled, disassembled, +; then the disassembly output will be assembled and the new binary will +; compared with the original. +; + +; +; Copyright (C) 2013 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. +; + + BITS TEST_BITS + + mov al, 01h + mov cl, 02h + mov dl, 03h + mov bl, 04h + mov ah, 05h + mov ch, 06h + mov dh, 07h + mov bh, 08h +%if TEST_BITS == 64 + mov spl, 09h + mov bpl, 0ah + mov sil, 0bh + mov dil, 0ch + mov r8b, 0dh + mov r9b, 0eh + mov r10b, 0fh + mov r11b, 010h + mov r12b, 011h + mov r13b, 012h + mov r14b, 013h + mov r15b, 014h +%endif + + mov ax, 0f701h + mov cx, 0f702h + mov dx, 0f703h + mov bx, 0f704h + mov sp, 0f705h + mov bp, 0f706h + mov si, 0f707h + mov di, 0f708h +%if TEST_BITS == 64 + mov r8w, 0f709h + mov r9w, 0f70ah + mov r10w, 0f70bh + mov r11w, 0f70ch + mov r12w, 0f70dh + mov r13w, 0f70eh + mov r14w, 0f70fh + mov r15w, 0f710h +%endif + + mov eax, 0beeff701h + mov ecx, 0beeff702h + mov edx, 0beeff703h + mov ebx, 0beeff704h + mov esp, 0beeff705h + mov ebp, 0beeff706h + mov esi, 0beeff707h + mov edi, 0beeff708h +%if TEST_BITS == 64 + mov r8d, 0beeff709h + mov r9d, 0beeff70ah + mov r10d, 0beeff70bh + mov r11d, 0beeff70ch + mov r12d, 0beeff70dh + mov r13d, 0beeff70eh + mov r14d, 0beeff70fh + mov r15d, 0beeff710h +%endif + +%if TEST_BITS == 64 + mov rax, 0feedbabef00df701h + mov rcx, 0feedbabef00df702h + mov rdx, 0feedbabef00df703h + mov rbx, 0feedbabef00df704h + mov rsp, 0feedbabef00df705h + mov rbp, 0feedbabef00df706h + mov rsi, 0feedbabef00df707h + mov rdi, 0feedbabef00df708h + mov r8, 0feedbabef00df709h + mov r9, 0feedbabef00df70ah + mov r10, 0feedbabef00df70bh + mov r11, 0feedbabef00df70ch + mov r12, 0feedbabef00df70dh + mov r13, 0feedbabef00df70eh + mov r14, 0feedbabef00df70fh + mov r15, 0feedbabef00df710h +%endif + diff --git a/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm b/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm index daba0fad..1cc28ae9 100644 --- a/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm +++ b/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm @@ -8,7 +8,7 @@ ; ; -; Copyright (C) 2008 Oracle Corporation +; Copyright (C) 2008-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; diff --git a/src/VBox/Disassembler/testcase/tstDisasm-1A.asm b/src/VBox/Disassembler/testcase/tstDisasm-1A.asm index 89829c85..c4ac578e 100644 --- a/src/VBox/Disassembler/testcase/tstDisasm-1A.asm +++ b/src/VBox/Disassembler/testcase/tstDisasm-1A.asm @@ -4,7 +4,7 @@ ; ; -; Copyright (C) 2006-2010 Oracle Corporation +; 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; @@ -26,6 +26,10 @@ BITS 32 +%if __YASM_VERSION_ID__ >= 001020001h ; v1.2.0.1 and greater, make sure to exclude v1.2.0.0. + %define pmulhrwa pmulhrw +%endif + BEGINCODE diff --git a/src/VBox/Disassembler/testcase/tstDisasm-2.cpp b/src/VBox/Disassembler/testcase/tstDisasm-2.cpp index d2c50d60..3d428a34 100644 --- a/src/VBox/Disassembler/testcase/tstDisasm-2.cpp +++ b/src/VBox/Disassembler/testcase/tstDisasm-2.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2008 Oracle Corporation + * Copyright (C) 2008-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; @@ -570,7 +570,7 @@ int main(int argc, char **argv) break; case 'V': - RTPrintf("$Revision: $\n"); + RTPrintf("$Revision: 89645 $\n"); return 0; default: |