1 | ; $Id: env-iprt-r3.mac 56287 2015-06-09 11:15:22Z vboxsync $
|
---|
2 | ;; @file
|
---|
3 | ; Instruction Test Environment - IPRT, Ring-3, 32-bit and 64-bit.
|
---|
4 | ;
|
---|
5 |
|
---|
6 | ;
|
---|
7 | ; Copyright (C) 2006-2015 Oracle Corporation
|
---|
8 | ;
|
---|
9 | ; This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | ; available from http://www.virtualbox.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 | %ifndef ___env_iprt_r3_mac
|
---|
19 | %define ___env_iprt_r3_mac
|
---|
20 |
|
---|
21 | ;*******************************************************************************
|
---|
22 | ;* Header Files *
|
---|
23 | ;*******************************************************************************
|
---|
24 | %include "iprt/asmdefs.mac"
|
---|
25 |
|
---|
26 |
|
---|
27 | ;*******************************************************************************
|
---|
28 | ;* Defined Constants And Macros *
|
---|
29 | ;*******************************************************************************
|
---|
30 | %define sAX xAX
|
---|
31 | %define sBX xBX
|
---|
32 | %define sCX xCX
|
---|
33 | %define sDX xDX
|
---|
34 | %define sSP xSP
|
---|
35 | %define sBP xBP
|
---|
36 | %define sSI xSI
|
---|
37 | %define sDI xDI
|
---|
38 | %define sCB xCB
|
---|
39 |
|
---|
40 |
|
---|
41 | ;; Same as BEGINPROC in asmdefs.mac.
|
---|
42 | %macro VBINSTST_BEGINPROC 1
|
---|
43 | BEGINPROC %1
|
---|
44 | %endm
|
---|
45 |
|
---|
46 | ;; Same as ENDPROC in asmdefs.mac.
|
---|
47 | %macro VBINSTST_ENDPROC 1
|
---|
48 | ENDPROC %1
|
---|
49 | %endm
|
---|
50 |
|
---|
51 | ;; Same as NAME in asmdefs.mac.
|
---|
52 | %define VBINSTST_NAME(a_Name) NAME(a_Name)
|
---|
53 |
|
---|
54 | ;; Same as GLOBALNAME_EX in asmdefs.mac.
|
---|
55 | %define VBINSTST_GLOBALNAME_EX GLOBALNAME_EX
|
---|
56 |
|
---|
57 | ;; Same as BEGINCODE in asmdefs.mac.
|
---|
58 | %define VBINSTST_BEGINCODE BEGINCODE
|
---|
59 |
|
---|
60 | ;; Same as BEGINDATA in asmdefs.mac.
|
---|
61 | %define VBINSTST_BEGINDATA BEGINDATA
|
---|
62 |
|
---|
63 |
|
---|
64 | ;; Call RTTestISub like function.
|
---|
65 | %define VBINSTST_CALL_FN_SUB_TEST call IMP2(RTTestISub)
|
---|
66 | EXTERN_IMP2 RTTestISub
|
---|
67 |
|
---|
68 | ;; Call RTTestIFailure like function with simple message.
|
---|
69 | %define VBINSTST_CALL_FN_FAILURE call NAME(VBInsTstFailure)
|
---|
70 | extern NAME(VBInsTstFailure)
|
---|
71 |
|
---|
72 | ;; Call RTTestIFailure like function with format message + 1 arg.
|
---|
73 | %define VBINSTST_CALL_FN_FAILURE_1 call NAME(VBInsTstFailure1)
|
---|
74 | extern NAME(VBInsTstFailure1)
|
---|
75 |
|
---|
76 | ;; Call RTTestIFailure like function with format message + 2 args.
|
---|
77 | %define VBINSTST_CALL_FN_FAILURE_2 call NAME(VBInsTstFailure2)
|
---|
78 | extern NAME(VBInsTstFailure2)
|
---|
79 |
|
---|
80 | ;; Call RTTestIFailure like function with format message + 3 args.
|
---|
81 | %define VBINSTST_CALL_FN_FAILURE_3 call NAME(VBInsTstFailure3)
|
---|
82 | extern NAME(VBInsTstFailure3)
|
---|
83 |
|
---|
84 | ;; Call RTTestIFailure like function with format message + 4 args.
|
---|
85 | %define VBINSTST_CALL_FN_FAILURE_4 call NAME(VBInsTstFailure4)
|
---|
86 | extern NAME(VBInsTstFailure4)
|
---|
87 |
|
---|
88 |
|
---|
89 | ;; Cannot do traps yet.
|
---|
90 | %undef VBINSTST_CAN_DO_TRAPS
|
---|
91 |
|
---|
92 |
|
---|
93 | ;
|
---|
94 | ; Include the common bits (contains code using above macros)
|
---|
95 | ;
|
---|
96 | %include "env-common.mac"
|
---|
97 |
|
---|
98 | %endif
|
---|
99 |
|
---|