summaryrefslogtreecommitdiffstats
path: root/src/VBox/Disassembler/testcase/tstAsmMovFixedReg-1.asm
blob: 571994a4b12024026bca633caaaf3f439c109b85 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
; $Id: tstAsmMovFixedReg-1.asm $
;; @file
; Disassembly testcase - Valid mov immediate to fixed registers.
;
; This is a build test, that means it will be assembled, disassembled,
; then the disassembly output will be assembled and the new binary will
; compared with the original.
;

;
; Copyright (C) 2013-2023 Oracle and/or its affiliates.
;
; This file is part of VirtualBox base platform packages, as
; available from https://www.virtualbox.org.
;
; This program is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License
; as published by the Free Software Foundation, in version 3 of the
; License.
;
; This program is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
; General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, see <https://www.gnu.org/licenses>.
;
; SPDX-License-Identifier: GPL-3.0-only
;

    BITS TEST_BITS

    mov al, 01h
    mov cl, 02h
    mov dl, 03h
    mov bl, 04h
    mov ah, 05h
    mov ch, 06h
    mov dh, 07h
    mov bh, 08h
%if TEST_BITS == 64
    mov spl, 09h
    mov bpl, 0ah
    mov sil, 0bh
    mov dil, 0ch
    mov r8b, 0dh
    mov r9b, 0eh
    mov r10b, 0fh
    mov r11b, 010h
    mov r12b, 011h
    mov r13b, 012h
    mov r14b, 013h
    mov r15b, 014h
%endif

    mov ax, 0f701h
    mov cx, 0f702h
    mov dx, 0f703h
    mov bx, 0f704h
    mov sp, 0f705h
    mov bp, 0f706h
    mov si, 0f707h
    mov di, 0f708h
%if TEST_BITS == 64
    mov r8w,  0f709h
    mov r9w,  0f70ah
    mov r10w, 0f70bh
    mov r11w, 0f70ch
    mov r12w, 0f70dh
    mov r13w, 0f70eh
    mov r14w, 0f70fh
    mov r15w, 0f710h
%endif

    mov eax, 0beeff701h
    mov ecx, 0beeff702h
    mov edx, 0beeff703h
    mov ebx, 0beeff704h
    mov esp, 0beeff705h
    mov ebp, 0beeff706h
    mov esi, 0beeff707h
    mov edi, 0beeff708h
%if TEST_BITS == 64
    mov r8d,  0beeff709h
    mov r9d,  0beeff70ah
    mov r10d, 0beeff70bh
    mov r11d, 0beeff70ch
    mov r12d, 0beeff70dh
    mov r13d, 0beeff70eh
    mov r14d, 0beeff70fh
    mov r15d, 0beeff710h
%endif

%if TEST_BITS == 64
    mov rax, 0feedbabef00df701h
    mov rcx, 0feedbabef00df702h
    mov rdx, 0feedbabef00df703h
    mov rbx, 0feedbabef00df704h
    mov rsp, 0feedbabef00df705h
    mov rbp, 0feedbabef00df706h
    mov rsi, 0feedbabef00df707h
    mov rdi, 0feedbabef00df708h
    mov r8,  0feedbabef00df709h
    mov r9,  0feedbabef00df70ah
    mov r10, 0feedbabef00df70bh
    mov r11, 0feedbabef00df70ch
    mov r12, 0feedbabef00df70dh
    mov r13, 0feedbabef00df70eh
    mov r14, 0feedbabef00df70fh
    mov r15, 0feedbabef00df710h
%endif