VirtualBox

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

Last change on this file since 106022 was 98103, checked in by vboxsync, 20 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 2.3 KB
Line 
1/* $Id: tstAsmStructs.cpp 98103 2023-01-17 14:15:46Z vboxsync $ */
2/** @file
3 * Testcase for checking offsets in the assembly structures shared with C/C++.
4 */
5
6/*
7 * Copyright (C) 2006-2023 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