VirtualBox

source: vbox/trunk/src/VBox/Disassembler/testcase/tstAsmSignExtend-1.asm@ 99960

Last change on this file since 99960 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 Id Revision
File size: 1.6 KB
Line 
1; $Id: tstAsmSignExtend-1.asm 98103 2023-01-17 14:15:46Z vboxsync $
2;; @file
3; Disassembly testcase - Valid sign extension instructions.
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 BITS TEST_BITS
34
35 movsx ax, al
36 movsx eax, al
37 movsx eax, ax
38
39 ;
40 ; ParseImmByteSX
41 ;
42
43 ; 83 /x
44 add eax, strict byte 8
45 add eax, strict byte -1
46 cmp ebx, strict byte -1
47
48 add ax, strict byte 8
49 add ax, strict byte -1
50 cmp bx, strict byte -1
51
52%if TEST_BITS == 64 ; check that these come out with qword values and not words or dwords.
53 add rax, strict byte 8
54 add rax, strict byte -1
55 cmp rbx, strict byte -1
56%endif
57
58 ; push %Ib
59 push strict byte -1
60 push strict byte -128
61 push strict byte 127
62
63 ;; @todo imul
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