VirtualBox

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

Last change on this file since 87439 was 87330, checked in by vboxsync, 4 years ago

VMM/HMR0A.asm: Reduced the number of parameters passed to SVMR0VMRun. Required extending HMInternal.mac quite a bit.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 1.9 KB
Line 
1/* $Id: tstAsmStructs.cpp 87330 2021-01-20 19:02:24Z vboxsync $ */
2/** @file
3 * Testcase for checking offsets in the assembly structures shared with C/C++.
4 */
5
6/*
7 * Copyright (C) 2006-2020 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 <VBox/vmm/cpum.h>
23#include "CPUMInternal.h"
24#define IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS 1 /* For HMInternal */
25#include "HMInternal.h"
26#undef IPRT_WITHOUT_NAMED_UNIONS_AND_STRUCTS /* probably not necessary */
27#include "VMMInternal.h"
28#include <VBox/vmm/vm.h>
29#include <VBox/vmm/hm_vmx.h>
30
31#include "tstHelp.h"
32#include <stdio.h>
33
34/* Hack for validating nested HMCPU structures. */
35typedef HMCPU::HMCPUUNION::HMCPUVMX HMCPUVMX;
36typedef HMCPU::HMCPUUNION::HMCPUSVM HMCPUSVM;
37
38/* For sup.mac simplifications. */
39#define SUPDRVTRACERUSRCTX32 SUPDRVTRACERUSRCTX
40#define SUPDRVTRACERUSRCTX64 SUPDRVTRACERUSRCTX
41
42
43int main()
44{
45 int rc = 0;
46 printf("tstAsmStructs: TESTING\n");
47
48#ifdef IN_RING3
49# include "tstAsmStructsHC.h"
50#else
51# include "tstAsmStructsRC.h"
52#endif
53
54 if (rc)
55 printf("tstAsmStructs: FAILURE - %d errors \n", rc);
56 else
57 printf("tstAsmStructs: SUCCESS\n");
58 return rc;
59}
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