VirtualBox

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

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

tstDisasm: Better checks.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.4 KB
 
1; $Id: DisasmTestA.asm 41716 2012-06-14 17:58:39Z 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], 054h
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
84 nop
85ENDPROC TestProc32
86
87
88%ifndef RT_OS_OS2
89BITS 64
90align 16
91BEGINPROC TestProc64
92 mov cr8, rax
93 mov cr8, rbx
94 mov [0xfffe0080], rax
95 mov [0xfffe0080], rbx
96 mov rax, cr8
97 mov rbx, cr8
98 mov rax, [0xfffe0080]
99 mov rbx, [0xfffe0080]
100 divsd xmm1, xmm0
101 ; invept rdi, qword [rsi]
102 DB 0x66, 0x0F, 0x38, 0x80, 0x3E
103 ; invept rcx, qword [rdx]
104 DB 0x66, 0x0F, 0x38, 0x80, 0xA
105 ;invvpid rdi, qword [rsi]
106 DB 0x66, 0x0F, 0x38, 0x81, 0x3E
107 ; invvpid rcx, qword [rdx]
108 DB 0x66, 0x0F, 0x38, 0x81, 0xA
109 mov rdi, [rsi]
110 mov rcx, [rdx]
111 db 48h
112 db 0c7h
113 db 42h
114 db 18h
115 db 20h
116 db 3eh
117 db 23h
118 db 80h
119 call qword [r8+10h]
120 ; test
121 db 48h
122 db 8bh
123 db 44h
124 db 0ah
125 db 0f8h
126 ;incorrectly assembled by yasm; REX.W should not be added!
127 ;test rax, dword 0cc90cc90h
128 db 8bh
129 db 04h
130 db 8dh
131 db 00h
132 db 00h
133 db 0feh
134 db 0ffh
135 mov qword [rcx+rdx], 0
136 mov dword [rcx+rdx], 0
137 and [r15], rax
138 movzx rcx, sil
139 and sil, 3
140 movzx ecx, ah
141 and ah, 3
142
143 sub rcx, 1234h
144 mov rax, qword [0cc90cc90h]
145 mov rax, qword [00c90cc90h]
146 mov rax, dword 0cc90cc90h
147 mov rax, qword 0ffffcc90cc90h
148
149 movzx rax,byte [edx]
150 movzx rax,word [edx]
151 movzx rax,byte [rdx]
152 lock cmpxchg [rcx], rax
153 lock cmpxchg [rcx], ax
154 lock cmpxchg [r15], dl
155 movzx RSI, word [R8]
156 in al, dx
157 in ax, dx
158 in eax, dx
159 mov rbx, [rcx + rax*4 + 17]
160 mov rbx, [rbp + rax*4 + 4]
161 mov rbx, [rbp + rax*4]
162 mov rbx, [ebp + eax*4]
163 int 80h
164 in al, 60h
165 in ax, dx
166 out 64h, eax
167
168 movss xmm0, xmm14
169 movsd xmm6, xmm1
170
171 ret
172ENDPROC TestProc64
173%endif ; !OS2
174
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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