DisasmTestA.asm revision 7c8d6edd5a6442b904c7d6d8a33173dc4f2c12a8
af062818b47340eef15700d2f0211576ba3506eevboxsync;
af062818b47340eef15700d2f0211576ba3506eevboxsync; VBox disassembler:
af062818b47340eef15700d2f0211576ba3506eevboxsync; Assembler test routines
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync;
af062818b47340eef15700d2f0211576ba3506eevboxsync; Copyright (C) 2006-2007 Sun Microsystems, Inc.
af062818b47340eef15700d2f0211576ba3506eevboxsync;
af062818b47340eef15700d2f0211576ba3506eevboxsync; This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync; available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync; you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync; General Public License (GPL) as published by the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync; Foundation, in version 2 as it comes in the "COPYING" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
af062818b47340eef15700d2f0211576ba3506eevboxsync; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
af062818b47340eef15700d2f0211576ba3506eevboxsync;
af062818b47340eef15700d2f0211576ba3506eevboxsync; Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
af062818b47340eef15700d2f0211576ba3506eevboxsync; Clara, CA 95054 USA or visit http://www.sun.com if you need
af062818b47340eef15700d2f0211576ba3506eevboxsync; additional information or have any questions.
af062818b47340eef15700d2f0211576ba3506eevboxsync;
af062818b47340eef15700d2f0211576ba3506eevboxsync
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync;*******************************************************************************
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync;* Header Files *
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync;*******************************************************************************
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync%include "VBox/nasm.mac"
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync%include "VBox/vm.mac"
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync%include "VBox/err.mac"
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync%include "VBox/stam.mac"
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync%include "VBox/x86.mac"
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncBITS 32
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncBEGINCODE
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncalign 16
af062818b47340eef15700d2f0211576ba3506eevboxsyncBEGINPROC TestProc
af062818b47340eef15700d2f0211576ba3506eevboxsync; invept eax, qword [ecx]
af062818b47340eef15700d2f0211576ba3506eevboxsync DB 0x66, 0x0F, 0x38, 0x80, 0x1
af062818b47340eef15700d2f0211576ba3506eevboxsync; invept eax, qword [ecx]
af062818b47340eef15700d2f0211576ba3506eevboxsync DB 0x66, 0x0F, 0x38, 0x81, 0x1
af062818b47340eef15700d2f0211576ba3506eevboxsync mov eax, dword [ecx]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov word [edi], 0123ah
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx eax,byte [edx]
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx eax,word [edx]
af062818b47340eef15700d2f0211576ba3506eevboxsync; mov dword es:[ebx + 1234h], 0789h
af062818b47340eef15700d2f0211576ba3506eevboxsync; mov word fs:[ebx + ecx], 0654h
af062818b47340eef15700d2f0211576ba3506eevboxsync; mov byte [esi + eax*4], 0654h
af062818b47340eef15700d2f0211576ba3506eevboxsync; mov bl, byte ds:[ebp + 1234h]
af062818b47340eef15700d2f0211576ba3506eevboxsync; mov al, cs:[1234h + ecx*8]
af062818b47340eef15700d2f0211576ba3506eevboxsync; mov al, cs:[1234h]
af062818b47340eef15700d2f0211576ba3506eevboxsync; mov ax, cs:[1234h]
af062818b47340eef15700d2f0211576ba3506eevboxsync; mov eax, cs:[1234h]
af062818b47340eef15700d2f0211576ba3506eevboxsync lock cmpxchg [ecx], eax
af062818b47340eef15700d2f0211576ba3506eevboxsync lock cmpxchg [ecx], ax
af062818b47340eef15700d2f0211576ba3506eevboxsync lock cmpxchg [ecx], dl
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx ESI,word [EAX]
af062818b47340eef15700d2f0211576ba3506eevboxsync in al, dx
af062818b47340eef15700d2f0211576ba3506eevboxsync in ax, dx
af062818b47340eef15700d2f0211576ba3506eevboxsync in eax, dx
af062818b47340eef15700d2f0211576ba3506eevboxsync mov ebx, [ecx + eax*4 + 17]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov ebx, [ebp + eax*4 + 4]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov ebx, [ebp + eax*4]
af062818b47340eef15700d2f0211576ba3506eevboxsync int 80h
af062818b47340eef15700d2f0211576ba3506eevboxsync in al, 60h
af062818b47340eef15700d2f0211576ba3506eevboxsync in ax, dx
af062818b47340eef15700d2f0211576ba3506eevboxsync out 64h, eax
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync movss xmm0, xmm1
af062818b47340eef15700d2f0211576ba3506eevboxsync movsd xmm6, xmm1
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync pause
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncENDPROC TestProc
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync%ifndef RT_OS_OS2
af062818b47340eef15700d2f0211576ba3506eevboxsyncBITS 64
af062818b47340eef15700d2f0211576ba3506eevboxsyncalign 16
af062818b47340eef15700d2f0211576ba3506eevboxsyncBEGINPROC TestProc64
af062818b47340eef15700d2f0211576ba3506eevboxsync ; invept rdi, qword [rsi]
af062818b47340eef15700d2f0211576ba3506eevboxsync DB 0x66, 0x0F, 0x38, 0x80, 0x3E
af062818b47340eef15700d2f0211576ba3506eevboxsync; invept rcx, qword [rdx]
af062818b47340eef15700d2f0211576ba3506eevboxsync DB 0x66, 0x0F, 0x38, 0x80, 0xA
af062818b47340eef15700d2f0211576ba3506eevboxsync ;invvpid rdi, qword [rsi]
af062818b47340eef15700d2f0211576ba3506eevboxsync DB 0x66, 0x0F, 0x38, 0x81, 0x3E
af062818b47340eef15700d2f0211576ba3506eevboxsync; invvpid rcx, qword [rdx]
af062818b47340eef15700d2f0211576ba3506eevboxsync DB 0x66, 0x0F, 0x38, 0x81, 0xA
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rdi, [rsi]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rcx, [rdx]
af062818b47340eef15700d2f0211576ba3506eevboxsync db 48h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 0c7h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 42h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 18h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 20h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 3eh
af062818b47340eef15700d2f0211576ba3506eevboxsync db 23h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 80h
af062818b47340eef15700d2f0211576ba3506eevboxsync call qword [r8+10h]
af062818b47340eef15700d2f0211576ba3506eevboxsync ; test
af062818b47340eef15700d2f0211576ba3506eevboxsync db 48h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 8bh
af062818b47340eef15700d2f0211576ba3506eevboxsync db 44h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 0ah
af062818b47340eef15700d2f0211576ba3506eevboxsync db 0f8h
af062818b47340eef15700d2f0211576ba3506eevboxsync ;incorrectly assembled by yasm; REX.W should not be added!
af062818b47340eef15700d2f0211576ba3506eevboxsync ;test rax, dword 0cc90cc90h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 8bh
af062818b47340eef15700d2f0211576ba3506eevboxsync db 04h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 8dh
af062818b47340eef15700d2f0211576ba3506eevboxsync db 00h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 00h
af062818b47340eef15700d2f0211576ba3506eevboxsync db 0feh
af062818b47340eef15700d2f0211576ba3506eevboxsync db 0ffh
af062818b47340eef15700d2f0211576ba3506eevboxsync mov qword [rcx+rdx], 0
af062818b47340eef15700d2f0211576ba3506eevboxsync mov dword [rcx+rdx], 0
af062818b47340eef15700d2f0211576ba3506eevboxsync and [r15], rax
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx rcx, sil
af062818b47340eef15700d2f0211576ba3506eevboxsync and sil, 3
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx ecx, ah
af062818b47340eef15700d2f0211576ba3506eevboxsync and ah, 3
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync sub rcx, 1234h
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rax, qword [0cc90cc90h]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rax, qword [00c90cc90h]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rax, dword 0cc90cc90h
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rax, qword 0ffffcc90cc90h
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx rax,byte [edx]
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx rax,word [edx]
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx rax,byte [rdx]
af062818b47340eef15700d2f0211576ba3506eevboxsync lock cmpxchg [rcx], rax
af062818b47340eef15700d2f0211576ba3506eevboxsync lock cmpxchg [rcx], ax
af062818b47340eef15700d2f0211576ba3506eevboxsync lock cmpxchg [r15], dl
af062818b47340eef15700d2f0211576ba3506eevboxsync movzx RSI, word [R8]
af062818b47340eef15700d2f0211576ba3506eevboxsync in al, dx
af062818b47340eef15700d2f0211576ba3506eevboxsync in ax, dx
af062818b47340eef15700d2f0211576ba3506eevboxsync in eax, dx
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rbx, [rcx + rax*4 + 17]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rbx, [rbp + rax*4 + 4]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rbx, [rbp + rax*4]
af062818b47340eef15700d2f0211576ba3506eevboxsync mov rbx, [ebp + eax*4]
af062818b47340eef15700d2f0211576ba3506eevboxsync int 80h
af062818b47340eef15700d2f0211576ba3506eevboxsync in al, 60h
af062818b47340eef15700d2f0211576ba3506eevboxsync in ax, dx
af062818b47340eef15700d2f0211576ba3506eevboxsync out 64h, eax
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync movss xmm0, xmm14
af062818b47340eef15700d2f0211576ba3506eevboxsync movsd xmm6, xmm1
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync ret
af062818b47340eef15700d2f0211576ba3506eevboxsyncENDPROC TestProc64
af062818b47340eef15700d2f0211576ba3506eevboxsync%endif