VirtualBox

source: vbox/trunk/src/VBox/Disassembler/DisasmTestA.asm@ 19796

Last change on this file since 19796 was 18768, checked in by vboxsync, 16 years ago

Typo for rdpmc

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1;
2; VBox disassembler:
3; Assembler test routines
4
5;
6; Copyright (C) 2006-2007 Sun Microsystems, Inc.
7;
8; This file is part of VirtualBox Open Source Edition (OSE), as
9; available from http://www.virtualbox.org. This file is free software;
10; you can redistribute it and/or modify it under the terms of the GNU
11; General Public License (GPL) as published by the Free Software
12; Foundation, in version 2 as it comes in the "COPYING" file of the
13; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15;
16; Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
17; Clara, CA 95054 USA or visit http://www.sun.com if you need
18; additional information or have any questions.
19;
20
21;*******************************************************************************
22;* Header Files *
23;*******************************************************************************
24%include "VBox/nasm.mac"
25%include "VBox/vm.mac"
26%include "VBox/err.mac"
27%include "VBox/stam.mac"
28%include "VBox/x86.mac"
29
30BITS 32
31
32BEGINCODE
33
34align 16
35BEGINPROC TestProc
36 smsw word [edx+16]
37; invept eax, qword [ecx]
38 DB 0x66, 0x0F, 0x38, 0x80, 0x1
39; invept eax, qword [ecx]
40 DB 0x66, 0x0F, 0x38, 0x81, 0x1
41 mov eax, dword [ecx]
42 mov word [edi], 0123ah
43 movzx eax,byte [edx]
44 movzx eax,word [edx]
45; mov dword es:[ebx + 1234h], 0789h
46; mov word fs:[ebx + ecx], 0654h
47; mov byte [esi + eax*4], 0654h
48; mov bl, byte ds:[ebp + 1234h]
49; mov al, cs:[1234h + ecx*8]
50; mov al, cs:[1234h]
51; mov ax, cs:[1234h]
52; mov eax, cs:[1234h]
53 lock cmpxchg [ecx], eax
54 lock cmpxchg [ecx], ax
55 lock cmpxchg [ecx], dl
56 movzx ESI,word [EAX]
57 in al, dx
58 in ax, dx
59 in eax, dx
60 mov ebx, [ecx + eax*4 + 17]
61 mov ebx, [ebp + eax*4 + 4]
62 mov ebx, [ebp + eax*4]
63 int 80h
64 in al, 60h
65 in ax, dx
66 out 64h, eax
67
68 movss xmm0, xmm1
69 movsd xmm6, xmm1
70
71 pause
72
73ENDPROC TestProc
74
75%ifndef RT_OS_OS2
76BITS 64
77align 16
78BEGINPROC TestProc64
79 divsd xmm1, xmm0
80 ; invept rdi, qword [rsi]
81 DB 0x66, 0x0F, 0x38, 0x80, 0x3E
82; invept rcx, qword [rdx]
83 DB 0x66, 0x0F, 0x38, 0x80, 0xA
84 ;invvpid rdi, qword [rsi]
85 DB 0x66, 0x0F, 0x38, 0x81, 0x3E
86; invvpid rcx, qword [rdx]
87 DB 0x66, 0x0F, 0x38, 0x81, 0xA
88 mov rdi, [rsi]
89 mov rcx, [rdx]
90 db 48h
91 db 0c7h
92 db 42h
93 db 18h
94 db 20h
95 db 3eh
96 db 23h
97 db 80h
98 call qword [r8+10h]
99 ; test
100 db 48h
101 db 8bh
102 db 44h
103 db 0ah
104 db 0f8h
105 ;incorrectly assembled by yasm; REX.W should not be added!
106 ;test rax, dword 0cc90cc90h
107 db 8bh
108 db 04h
109 db 8dh
110 db 00h
111 db 00h
112 db 0feh
113 db 0ffh
114 mov qword [rcx+rdx], 0
115 mov dword [rcx+rdx], 0
116 and [r15], rax
117 movzx rcx, sil
118 and sil, 3
119 movzx ecx, ah
120 and ah, 3
121
122 sub rcx, 1234h
123 mov rax, qword [0cc90cc90h]
124 mov rax, qword [00c90cc90h]
125 mov rax, dword 0cc90cc90h
126 mov rax, qword 0ffffcc90cc90h
127
128 movzx rax,byte [edx]
129 movzx rax,word [edx]
130 movzx rax,byte [rdx]
131 lock cmpxchg [rcx], rax
132 lock cmpxchg [rcx], ax
133 lock cmpxchg [r15], dl
134 movzx RSI, word [R8]
135 in al, dx
136 in ax, dx
137 in eax, dx
138 mov rbx, [rcx + rax*4 + 17]
139 mov rbx, [rbp + rax*4 + 4]
140 mov rbx, [rbp + rax*4]
141 mov rbx, [ebp + eax*4]
142 int 80h
143 in al, 60h
144 in ax, dx
145 out 64h, eax
146
147 movss xmm0, xmm14
148 movsd xmm6, xmm1
149
150 ret
151ENDPROC TestProc64
152%endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette