VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/Instructions/tstVBInsTstR3.cpp@ 46543

Last change on this file since 46543 was 46543, checked in by vboxsync, 11 years ago

Instruction testing, early hacking.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1/* $Id: tstVBInsTstR3.cpp 46543 2013-06-13 18:22:11Z vboxsync $ */
2/** @file
3 * Instruction Test Environment - IPRT ring-3 driver.
4 */
5
6/*
7 * Copyright (C) 2006-2013 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
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#include <iprt/string.h>
23#include <iprt/test.h>
24
25
26/*******************************************************************************
27* Structures and Typedefs *
28*******************************************************************************/
29#if HC_ARCH_BITS == 64
30typedef uint64_t VBINSTSTREG;
31#else
32typedef uint32_t VBINSTSTREG;
33#endif
34
35
36/*******************************************************************************
37* Global Variables *
38*******************************************************************************/
39RTTEST g_hTest;
40
41
42RT_C_DECLS_BEGIN
43DECLASM(void) TestInstrMain(void);
44
45DECLEXPORT(void) VBInsTstFailure(const char *pszMessage);
46DECLEXPORT(void) VBInsTstFailure1(const char *pszFmt, VBINSTSTREG uArg1);
47DECLEXPORT(void) VBInsTstFailure2(const char *pszFmt, VBINSTSTREG uArg1, VBINSTSTREG uArg2);
48DECLEXPORT(void) VBInsTstFailure3(const char *pszFmt, VBINSTSTREG uArg1, VBINSTSTREG uArg2, VBINSTSTREG uArg3);
49DECLEXPORT(void) VBInsTstFailure4(const char *pszFmt, VBINSTSTREG uArg1, VBINSTSTREG uArg2, VBINSTSTREG uArg3, VBINSTSTREG uArg4);
50RT_C_DECLS_END
51
52
53DECLEXPORT(void) VBInsTstFailure(const char *pszMessage)
54{
55 RTTestFailed(g_hTest, "%s", pszMessage);
56}
57
58DECLEXPORT(void) VBInsTstFailure1(const char *pszFmt, VBINSTSTREG uArg1)
59{
60 RTTestFailed(g_hTest, pszFmt, uArg1);
61}
62
63
64DECLEXPORT(void) VBInsTstFailure2(const char *pszFmt, VBINSTSTREG uArg1, VBINSTSTREG uArg2)
65{
66 RTTestFailed(g_hTest, pszFmt, uArg1, uArg2);
67}
68
69
70DECLEXPORT(void) VBInsTstFailure3(const char *pszFmt, VBINSTSTREG uArg1, VBINSTSTREG uArg2, VBINSTSTREG uArg3)
71{
72 RTTestFailed(g_hTest, pszFmt, uArg1, uArg2, uArg3);
73}
74
75
76DECLEXPORT(void) VBInsTstFailure4(const char *pszFmt, VBINSTSTREG uArg1, VBINSTSTREG uArg2, VBINSTSTREG uArg3, VBINSTSTREG uArg4)
77{
78 RTTestFailed(g_hTest, pszFmt, uArg1, uArg2, uArg3, uArg4);
79}
80
81
82
83
84int main()
85{
86 RTEXITCODE rcExit = RTTestInitAndCreate("VBInsTstR3", &g_hTest);
87 if (rcExit != RTEXITCODE_SUCCESS)
88 return rcExit;
89 RTTestBanner(g_hTest);
90 TestInstrMain();
91 return RTTestSummaryAndDestroy(g_hTest);
92}
93
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