VirtualBox

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

Last change on this file since 78230 was 76553, checked in by vboxsync, 6 years ago

scm --update-copyright-year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.3 KB
Line 
1; $Id: tstAsmSignExtend-1.asm 76553 2019-01-01 01:45:53Z 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-2019 Oracle Corporation
12;
13; This file is part of VirtualBox Open Source Edition (OSE), as
14; available from http://www.virtualbox.org. This file is free software;
15; you can redistribute it and/or modify it under the terms of the GNU
16; General Public License (GPL) as published by the Free Software
17; Foundation, in version 2 as it comes in the "COPYING" file of the
18; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
19; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
20;
21
22%include "tstAsm.mac"
23 BITS TEST_BITS
24
25 movsx ax, al
26 movsx eax, al
27 movsx eax, ax
28
29 ;
30 ; ParseImmByteSX
31 ;
32
33 ; 83 /x
34 add eax, strict byte 8
35 add eax, strict byte -1
36 cmp ebx, strict byte -1
37
38 add ax, strict byte 8
39 add ax, strict byte -1
40 cmp bx, strict byte -1
41
42%if TEST_BITS == 64 ; check that these come out with qword values and not words or dwords.
43 add rax, strict byte 8
44 add rax, strict byte -1
45 cmp rbx, strict byte -1
46%endif
47
48 ; push %Ib
49 push strict byte -1
50 push strict byte -128
51 push strict byte 127
52
53 ;; @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