VirtualBox

source: vbox/trunk/src/VBox/Disassembler/testcase/tstAsmRegs-1.asm@ 103914

Last change on this file since 103914 was 98103, checked in by vboxsync, 2 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1; $Id: tstAsmRegs-1.asm 98103 2023-01-17 14:15:46Z vboxsync $
2;; @file
3; Disassembly testcase - Accessing all the registers
4;
5; This is a build test, that means it will be assembled, disassembled,
6; then the disassembly output will be assembled and the new binary will
7; compared with the original.
8;
9
10;
11; Copyright (C) 2008-2023 Oracle and/or its affiliates.
12;
13; This file is part of VirtualBox base platform packages, as
14; available from https://www.virtualbox.org.
15;
16; This program is free software; you can redistribute it and/or
17; modify it under the terms of the GNU General Public License
18; as published by the Free Software Foundation, in version 3 of the
19; License.
20;
21; This program is distributed in the hope that it will be useful, but
22; WITHOUT ANY WARRANTY; without even the implied warranty of
23; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24; General Public License for more details.
25;
26; You should have received a copy of the GNU General Public License
27; along with this program; if not, see <https://www.gnu.org/licenses>.
28;
29; SPDX-License-Identifier: GPL-3.0-only
30;
31
32%include "tstAsm.mac"
33
34 BITS TEST_BITS
35
36 ;; @todo
37 ; Missing a bunch of permutations and encoding variants
38 ;
39
40 mov al, al
41 mov al, ah
42 mov al, bl
43 mov al, bh
44 mov al, cl
45 mov al, ch
46 mov al, dl
47 mov al, dh
48%if TEST_BITS == 64
49 mov al, dil
50 mov al, sil
51 mov al, bpl
52 mov al, spl
53 mov al, r8b
54 mov al, r9b
55 mov al, r10b
56 mov al, r11b
57 mov al, r12b
58 mov al, r13b
59 mov al, r14b
60 mov al, r15b
61%endif
62
63 mov ax, ax
64 mov ax, bx
65 mov ax, cx
66 mov ax, dx
67 mov ax, si
68 mov ax, di
69 mov ax, bp
70 mov ax, sp
71%if TEST_BITS == 64
72 mov ax, r8w
73 mov ax, r9w
74 mov ax, r10w
75 mov ax, r11w
76 mov ax, r12w
77 mov ax, r13w
78 mov ax, r14w
79 mov ax, r15w
80%endif
81
82 mov eax, eax
83 mov eax, ebx
84 mov eax, ecx
85 mov eax, edx
86 mov eax, esi
87 mov eax, edi
88 mov eax, ebp
89 mov eax, esp
90%if TEST_BITS == 64
91 mov eax, r8d
92 mov eax, r9d
93 mov eax, r10d
94 mov eax, r11d
95 mov eax, r12d
96 mov eax, r13d
97 mov eax, r14d
98 mov eax, r15d
99%endif
100
101%if TEST_BITS == 64
102 mov rax, rax
103 mov rax, rbx
104 mov rax, rcx
105 mov rax, rdx
106 mov rax, rsi
107 mov rax, rdi
108 mov rax, rbp
109 mov rax, rsp
110 mov rax, r8
111 mov rax, r9
112 mov rax, r10
113 mov rax, r11
114 mov rax, r12
115 mov rax, r13
116 mov rax, r14
117 mov rax, r15
118%endif
119
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