VirtualBox

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

最後變更 在這個檔案從41715是 41715,由 vboxsync 提交於 13 年 前

Made _EndProc zero-sized functions; fixed tstDisasm.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.0 KB
 
1; $Id: DisasmTestA.asm 41715 2012-06-14 17:42:26Z vboxsync $
2;; @file
3; VBox disassembler: Assembler test routines
4;
5
6;
7; Copyright (C) 2006-2010 Oracle Corporation
8;
9; This file is part of VirtualBox Open Source Edition (OSE), as
10; available from http://www.alldomusa.eu.org. This file is free software;
11; you can redistribute it and/or modify it under the terms of the GNU
12; General Public License (GPL) as published by the Free Software
13; Foundation, in version 2 as it comes in the "COPYING" file of the
14; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16;
17
18;*******************************************************************************
19;* Header Files *
20;*******************************************************************************
21%include "iprt/asmdefs.mac"
22;%include "VBox/vmm/vm.mac"
23;%include "VBox/err.mac"
24;%include "VBox/vmm/stam.mac"
25;%include "iprt/x86.mac"
26
27BITS 32
28
29
30BEGINCODE
31
32align 16
33BEGINPROC TestProc32
34 xor eax, eax
35 mov al, 4
36 lea edx, [4]
37 mov edx, 4
38 mov eax, 4
39 shl eax, 4
40 shl edx, 4
41 shr edx, 4
42 mov eax, edx
43 mov eax, ecx
44 mov edx, eax
45 mov ecx, eax
46 DB 0xF0, 0x0F, 0x22, 0xC0
47 DB 0xF0, 0x0F, 0x20, 0xC0
48 smsw word [edx+16]
49; invept eax, qword [ecx]
50 DB 0x66, 0x0F, 0x38, 0x80, 0x1
51; invept eax, qword [ecx]
52 DB 0x66, 0x0F, 0x38, 0x81, 0x1
53 mov eax, dword [ecx]
54 mov word [edi], 0123ah
55 movzx eax,byte [edx]
56 movzx eax,word [edx]
57; mov dword es:[ebx + 1234h], 0789h
58; mov word fs:[ebx + ecx], 0654h
59; mov byte [esi + eax*4], 0654h
60; mov bl, byte ds:[ebp + 1234h]
61; mov al, cs:[1234h + ecx*8]
62; mov al, cs:[1234h]
63; mov ax, cs:[1234h]
64; mov eax, cs:[1234h]
65 lock cmpxchg [ecx], eax
66 lock cmpxchg [ecx], ax
67 lock cmpxchg [ecx], dl
68 movzx ESI,word [EAX]
69 in al, dx
70 in ax, dx
71 in eax, dx
72 mov ebx, [ecx + eax*4 + 17]
73 mov ebx, [ebp + eax*4 + 4]
74 mov ebx, [ebp + eax*4]
75 int 80h
76 in al, 60h
77 in ax, dx
78 out 64h, eax
79
80 movss xmm0, xmm1
81 movsd xmm6, xmm1
82
83 pause
84ENDPROC TestProc32
85
86
87%ifndef RT_OS_OS2
88BITS 64
89align 16
90BEGINPROC TestProc64
91 mov cr8, rax
92 mov cr8, rbx
93 mov [0xfffe0080], rax
94 mov [0xfffe0080], rbx
95 mov rax, cr8
96 mov rbx, cr8
97 mov rax, [0xfffe0080]
98 mov rbx, [0xfffe0080]
99 divsd xmm1, xmm0
100 ; invept rdi, qword [rsi]
101 DB 0x66, 0x0F, 0x38, 0x80, 0x3E
102; invept rcx, qword [rdx]
103 DB 0x66, 0x0F, 0x38, 0x80, 0xA
104 ;invvpid rdi, qword [rsi]
105 DB 0x66, 0x0F, 0x38, 0x81, 0x3E
106; invvpid rcx, qword [rdx]
107 DB 0x66, 0x0F, 0x38, 0x81, 0xA
108 mov rdi, [rsi]
109 mov rcx, [rdx]
110 db 48h
111 db 0c7h
112 db 42h
113 db 18h
114 db 20h
115 db 3eh
116 db 23h
117 db 80h
118 call qword [r8+10h]
119 ; test
120 db 48h
121 db 8bh
122 db 44h
123 db 0ah
124 db 0f8h
125 ;incorrectly assembled by yasm; REX.W should not be added!
126 ;test rax, dword 0cc90cc90h
127 db 8bh
128 db 04h
129 db 8dh
130 db 00h
131 db 00h
132 db 0feh
133 db 0ffh
134 mov qword [rcx+rdx], 0
135 mov dword [rcx+rdx], 0
136 and [r15], rax
137 movzx rcx, sil
138 and sil, 3
139 movzx ecx, ah
140 and ah, 3
141
142 sub rcx, 1234h
143 mov rax, qword [0cc90cc90h]
144 mov rax, qword [00c90cc90h]
145 mov rax, dword 0cc90cc90h
146 mov rax, qword 0ffffcc90cc90h
147
148 movzx rax,byte [edx]
149 movzx rax,word [edx]
150 movzx rax,byte [rdx]
151 lock cmpxchg [rcx], rax
152 lock cmpxchg [rcx], ax
153 lock cmpxchg [r15], dl
154 movzx RSI, word [R8]
155 in al, dx
156 in ax, dx
157 in eax, dx
158 mov rbx, [rcx + rax*4 + 17]
159 mov rbx, [rbp + rax*4 + 4]
160 mov rbx, [rbp + rax*4]
161 mov rbx, [ebp + eax*4]
162 int 80h
163 in al, 60h
164 in ax, dx
165 out 64h, eax
166
167 movss xmm0, xmm14
168 movsd xmm6, xmm1
169
170 ret
171ENDPROC TestProc64
172%endif ; !OS2
173
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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