VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/tstAsmStructs.cpp@ 96945

Last change on this file since 96945 was 96511, checked in by vboxsync, 2 years ago

/Config.kmk,VMM,IPRT: Converted all run-at-compile-time tests and more to only use IPRT, so we can more easily transition to no-CRT static building on windows. bugref:10261

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.3 KB
Line 
1/* $Id: tstAsmStructs.cpp 96511 2022-08-26 03:13:16Z vboxsync $ */
2/** @file
3 * Testcase for checking offsets in the assembly structures shared with C/C++.
4 */
5
6/*
7 * Copyright (C) 2006-2022 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28
29/*********************************************************************************************************************************
30* Header Files *
31*********************************************************************************************************************************/
32#include <VBox/vmm/cpum.h>
33#include "CPUMInternal.h"
34#define IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS 1 /* For HMInternal */
35#include "HMInternal.h"
36#undef IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS /* probably not necessary */
37#include "VMMInternal.h"
38#include <VBox/vmm/vm.h>
39#define GVM_C_STYLE_STRUCTURES
40#include <VBox/vmm/gvm.h>
41#include <VBox/vmm/hm_vmx.h>
42
43#include "tstHelp.h"
44#include <iprt/stream.h>
45
46/* Hack for validating nested HMCPU structures. */
47typedef HMCPU::HMCPUVMX HMCPUVMX;
48typedef HMCPU::HMCPUSVM HMCPUSVM;
49typedef HMR0PERVCPU::HMR0CPUVMX HMR0CPUVMX;
50typedef HMR0PERVCPU::HMR0CPUSVM HMR0CPUSVM;
51
52/* For sup.mac simplifications. */
53#define SUPDRVTRACERUSRCTX32 SUPDRVTRACERUSRCTX
54#define SUPDRVTRACERUSRCTX64 SUPDRVTRACERUSRCTX
55
56
57int main()
58{
59 int rc = 0;
60 RTPrintf("tstAsmStructs: TESTING\n");
61
62#ifdef IN_RING3
63# include "tstAsmStructsHC.h"
64#else
65# include "tstAsmStructsRC.h"
66#endif
67
68 if (rc)
69 RTPrintf("tstAsmStructs: FAILURE - %d errors \n", rc);
70 else
71 RTPrintf("tstAsmStructs: SUCCESS\n");
72 return rc;
73}
74
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