VirtualBox

source: vbox/trunk/src/VBox/VMM/testcase/Makefile.kmk@ 99650

Last change on this file since 99650 was 99040, checked in by vboxsync, 21 months ago

*.kmk: Applied scm with new indenting of multiline variable/function expansions in variable assignments. bugref:10348

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 29.5 KB
Line 
1# $Id: Makefile.kmk 99040 2023-03-18 21:03:42Z vboxsync $
2## @file
3# Sub-Makefile for the VMM testcases.
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
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31#
32# Include sub-makefiles.
33#
34if 0 # Not ready for general consumption yet.
35 include $(PATH_SUB_CURRENT)/Instructions/Makefile.kmk
36endif
37
38#
39# Target lists.
40#
41PROGRAMS += tstVMStructSize tstAsmStructs
42ifdef VBOX_WITH_RAW_MODE
43 PROGRAMS += tstVMStructRC tstAsmStructsRC
44endif
45if !defined(VBOX_ONLY_EXTPACKS) \
46 && ( defined(VBOX_WITH_DTRACE_R3) \
47 || defined(VBOX_WITH_DTRACE_R0) \
48 || defined(VBOX_WITH_DTRACE_RC))
49 PROGRAMS += tstVMStructDTrace
50 INSTALLS += VMMLibDTraceStructTest
51endif
52ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
53 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
54 PROGRAMS += tstGlobalConfigHardened
55 DLL += tstGlobalConfig
56 else
57 PROGRAMS += tstGlobalConfig
58 endif
59
60 ifdef VBOX_WITH_RAW_MODE
61 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
62 PROGRAMS += tstVMMHardened
63 DLLS += tstVMM
64 else
65 PROGRAMS += tstVMM tstVMM-HM
66 endif
67 ifneq ($(KBUILD_TARGET),win)
68 PROGRAMS += tstVMMFork
69 endif
70 endif
71 ifdef VBOX_WITH_TESTCASES
72 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
73 PROGRAMS += tstCFGMHardened tstVMREQHardened tstAnimateHardened
74 DLLS += tstCFGM tstVMREQ tstAnimate
75 else
76 PROGRAMS += tstCFGM tstVMREQ tstAnimate
77 endif
78 PROGRAMS += \
79 tstCompressionBenchmark \
80 tstIEMCheckMc \
81 tstIEMAImpl \
82 tstPDMQueue \
83 tstSSM
84 PROGRAMS.amd64 += tstIEMAImplAsm
85
86 if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
87 PROGRAMS += \
88 tstVMMR0CallHost-1 \
89 tstX86-FpuSaveRestore
90 ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), solaris.x86 solaris.amd64 win.amd64) ## TODO: Fix the code.
91 PROGRAMS += tstX86-1
92 endif
93 endif
94 ifdef VBOX_WITH_RAW_MODE
95 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
96 PROGRAMS += tstMicroHardened
97 DLLS += tstMicro
98 else
99 PROGRAMS += tstMicro
100 endif
101 SYSMODS += tstMicroRC
102 endif
103 ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
104 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
105 PROGRAMS += tstPDMAsyncCompletionHardened tstPDMAsyncCompletionStressHardened
106 DLLS += tstPDMAsyncCompletion tstPDMAsyncCompletionStress
107 else
108 PROGRAMS += tstPDMAsyncCompletion tstPDMAsyncCompletionStress
109 endif
110 endif
111 endif # VBOX_WITH_TESTCASES
112endif # !VBOX_ONLY_EXTPACKS_USE_IMPLIBS
113
114# Where we put our temporary files (just for simplicity)
115VBOX_VMM_TESTCASE_OUT_DIR := $(PATH_TARGET)/VMM
116BLDDIRS += $(VBOX_VMM_TESTCASE_OUT_DIR)
117
118#
119# We setup two 'other' targets for executing the two structure & alignment
120# validation testcases. Perhaps a bit hackish, but extremely useful.
121#
122ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
123 ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
124 OTHERS += \
125 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
126 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
127 endif
128endif
129
130# The normal testing pass.
131TESTING += \
132 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
133 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
134
135OTHER_CLEAN += \
136 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
137 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run \
138 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o \
139 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o.dep \
140 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac \
141 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac.o \
142 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac.lst \
143 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsRC.h \
144 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h \
145 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructRC.h
146
147#
148# Globals
149#
150VBOX_PATH_VMM_SRC = $(PATH_ROOT)/src/VBox/VMM
151
152#
153# Targets
154#
155ifdef VBOX_WITH_RAW_MODE
156 tstVMStructRC_TEMPLATE = VBoxRcExe
157 tstVMStructRC_DEFS = VBOX_IN_VMM IN_VMM_RC IN_DIS IN_RT_RC VBOX_WITH_RAW_MODE $(VMM_COMMON_DEFS)
158 ifdef VBOX_WITH_R0_LOGGING
159 tstVMStructRC_DEFS += VBOX_WITH_R0_LOGGING
160 endif
161 tstVMStructRC_SOURCES = tstVMStructRC.cpp
162 tstVMStructRC_INCS = \
163 $(VBOX_PATH_VMM_SRC)/include \
164 $(VBOX_PATH_VMM_SRC)/PATM
165endif
166
167tstVMStructSize_TEMPLATE = VBoxR3AutoTest
168ifneq ($(KBUILD_TARGET),win)
169 tstVMStructSize_CXXFLAGS += $(VBOX_GCC_Wno-invalid-offsetof)
170endif
171tstVMStructSize_DEFS = VBOX_IN_VMM IN_VMM_R3 IN_DIS $(VMM_COMMON_DEFS)
172ifdef VBOX_WITH_RAW_MODE
173 tstVMStructSize_DEFS += VBOX_WITH_RAW_MODE
174endif
175tstVMStructSize_INCS = \
176 $(VBOX_PATH_VMM_SRC)/include \
177 $(VBOX_PATH_VMM_SRC)/PATM \
178 $(VBOX_VMM_TESTCASE_OUT_DIR)
179tstVMStructSize_SOURCES = tstVMStructSize.cpp
180ifdef VBOX_WITH_RAW_MODE
181 tstVMStructSize.cpp_DEPS = $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructRC.h
182endif
183ifdef VBOX_WITH_R0_LOGGING
184 tstVMStructSize_DEFS += VBOX_WITH_R0_LOGGING
185endif
186
187tstAsmStructs_TEMPLATE = VBoxR3AutoTest
188ifneq ($(KBUILD_TARGET),win)
189 tstAsmStructSize_CXXFLAGS += $(VBOX_GCC_Wno-invalid-offsetof)
190endif
191tstAsmStructs_DEFS = VBOX_IN_VMM IN_VMM_R3 IN_DIS $(VMM_COMMON_DEFS)
192ifdef VBOX_WITH_RAW_MODE
193 tstAsmStructs_DEFS += VBOX_WITH_RAW_MODE
194endif
195ifdef VBOX_WITH_R0_LOGGING
196 tstAsmStructs_DEFS += VBOX_WITH_R0_LOGGING
197endif
198tstAsmStructs_INCS = \
199 $(VBOX_PATH_VMM_SRC)/include \
200 $(VBOX_VMM_TESTCASE_OUT_DIR)
201tstAsmStructs_SOURCES = tstAsmStructs.cpp
202tstAsmStructs.cpp_DEPS = $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h
203
204ifdef VBOX_WITH_RAW_MODE
205 tstAsmStructsRC_TEMPLATE = VBoxRcExe
206 tstAsmStructsRC_DEFS = VBOX_IN_VMM IN_VMM_RC IN_DIS IN_RT_RC VBOX_WITH_RAW_MODE $(VMM_COMMON_DEFS)
207 ifdef VBOX_WITH_R0_LOGGING
208 tstAsmStructsRC_DEFS += VBOX_WITH_R0_LOGGING
209 endif
210 tstAsmStructsRC_INCS = \
211 $(VBOX_PATH_VMM_SRC)/include \
212 $(VBOX_VMM_TESTCASE_OUT_DIR)
213 tstAsmStructsRC_SOURCES = tstAsmStructs.cpp
214 tstAsmStructs.cpp_DEPS += $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsRC.h
215endif # VBOX_WITH_RAW_MODE
216
217
218#
219# Global config tool.
220#
221if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
222 tstGlobalConfigHardened_TEMPLATE = VBoxR3HardenedTstExe
223 tstGlobalConfigHardened_NAME = tstGlobalConfig
224 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
225 tstGlobalConfigHardened_DEFS = PROGRAM_NAME_STR="tstGlobalConfig"
226 else
227 tstGlobalConfigHardened_DEFS = PROGRAM_NAME_STR=\"tstGlobalConfig\"
228 endif
229 tstGlobalConfigHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
230 tstGlobalConfig_TEMPLATE = VBoxR3HardenedTstDll
231else
232 tstGlobalConfig_TEMPLATE = VBoxR3TstExe
233endif
234tstGlobalConfig_SOURCES = tstGlobalConfig.cpp
235tstGlobalConfig_LIBS = $(LIB_RUNTIME)
236
237
238#
239# Testcase for checking the C (IEMAllAImplC.cpp) and assembly (IEMAllAImpl.asm)
240# instruction emulation helpers.
241#
242# Note! The IN_TSTVMSTRUCT define is for avoiding IEMInstructionStatisticsTmpl.h.
243#
244TSTIEMAIMPL_TEST_DATA_DEPS = \
245 tstIEMAImplDataSseBinary-addps_u128.bin \
246 tstIEMAImplDataSseBinary-mulps_u128.bin \
247 tstIEMAImplDataSseBinary-subps_u128.bin \
248 tstIEMAImplDataSseBinary-minps_u128.bin \
249 tstIEMAImplDataSseBinary-divps_u128.bin \
250 tstIEMAImplDataSseBinary-maxps_u128.bin \
251 tstIEMAImplDataSseBinary-haddps_u128.bin \
252 tstIEMAImplDataSseBinary-hsubps_u128.bin \
253 tstIEMAImplDataSseBinary-sqrtps_u128.bin \
254 tstIEMAImplDataSseBinary-addsubps_u128.bin \
255 tstIEMAImplDataSseBinary-cvtps2pd_u128.bin \
256 tstIEMAImplDataSseBinary-addpd_u128.bin \
257 tstIEMAImplDataSseBinary-mulpd_u128.bin \
258 tstIEMAImplDataSseBinary-subpd_u128.bin \
259 tstIEMAImplDataSseBinary-minpd_u128.bin \
260 tstIEMAImplDataSseBinary-divpd_u128.bin \
261 tstIEMAImplDataSseBinary-maxpd_u128.bin \
262 tstIEMAImplDataSseBinary-haddpd_u128.bin \
263 tstIEMAImplDataSseBinary-hsubpd_u128.bin \
264 tstIEMAImplDataSseBinary-sqrtpd_u128.bin \
265 tstIEMAImplDataSseBinary-addsubpd_u128.bin \
266 tstIEMAImplDataSseBinary-cvtpd2ps_u128.bin \
267 tstIEMAImplDataSseBinary-addss_u128_r32.bin \
268 tstIEMAImplDataSseBinary-addsd_u128_r64.bin \
269 tstIEMAImplDataSseBinary-mulss_u128_r32.bin \
270 tstIEMAImplDataSseBinary-mulsd_u128_r64.bin \
271 tstIEMAImplDataSseBinary-subss_u128_r32.bin \
272 tstIEMAImplDataSseBinary-subsd_u128_r64.bin \
273 tstIEMAImplDataSseBinary-minss_u128_r32.bin \
274 tstIEMAImplDataSseBinary-minsd_u128_r64.bin \
275 tstIEMAImplDataSseBinary-divss_u128_r32.bin \
276 tstIEMAImplDataSseBinary-divsd_u128_r64.bin \
277 tstIEMAImplDataSseBinary-maxss_u128_r32.bin \
278 tstIEMAImplDataSseBinary-maxsd_u128_r64.bin \
279 tstIEMAImplDataSseBinary-cvtss2sd_u128_r32.bin \
280 tstIEMAImplDataSseBinary-cvtsd2ss_u128_r64.bin \
281 tstIEMAImplDataSseBinary-sqrtss_u128_r32.bin \
282 tstIEMAImplDataSseBinary-sqrtsd_u128_r64.bin \
283 tstIEMAImplDataSseBinary-cvttsd2si_i32_r64.bin \
284 tstIEMAImplDataSseBinary-cvtsd2si_i32_r64.bin \
285 tstIEMAImplDataSseBinary-cvttsd2si_i64_r64.bin \
286 tstIEMAImplDataSseBinary-cvtsd2si_i64_r64.bin \
287 tstIEMAImplDataSseBinary-cvttss2si_i32_r32.bin \
288 tstIEMAImplDataSseBinary-cvtss2si_i32_r32.bin \
289 tstIEMAImplDataSseBinary-cvttss2si_i64_r32.bin \
290 tstIEMAImplDataSseBinary-cvtss2si_i64_r32.bin \
291 tstIEMAImplDataSseBinary-cvtsi2ss_r32_i32.bin \
292 tstIEMAImplDataSseBinary-cvtsi2ss_r32_i64.bin \
293 tstIEMAImplDataSseBinary-cvtsi2sd_r64_i32.bin \
294 tstIEMAImplDataSseBinary-cvtsi2sd_r64_i64.bin \
295 tstIEMAImplDataSseCompare-ucomiss_u128.bin \
296 tstIEMAImplDataSseCompare-vucomiss_u128.bin \
297 tstIEMAImplDataSseCompare-comiss_u128.bin \
298 tstIEMAImplDataSseCompare-vcomiss_u128.bin \
299 tstIEMAImplDataSseCompare-ucomisd_u128.bin \
300 tstIEMAImplDataSseCompare-vucomisd_u128.bin \
301 tstIEMAImplDataSseCompare-comisd_u128.bin \
302 tstIEMAImplDataSseCompare-vcomisd_u128.bin \
303 tstIEMAImplDataSseCompare-cmpps_u128.bin \
304 tstIEMAImplDataSseCompare-cmpss_u128.bin \
305 tstIEMAImplDataSseCompare-cmppd_u128.bin \
306 tstIEMAImplDataSseCompare-cmpsd_u128.bin \
307 tstIEMAImplDataSseConvert-cvtdq2ps_u128.bin \
308 tstIEMAImplDataSseConvert-cvtps2dq_u128.bin \
309 tstIEMAImplDataSseConvert-cvttps2dq_u128.bin \
310 tstIEMAImplDataSseConvert-cvtdq2pd_u128.bin \
311 tstIEMAImplDataSseConvert-cvtpd2dq_u128.bin \
312 tstIEMAImplDataSseConvert-cvttpd2dq_u128.bin \
313 tstIEMAImplDataSseConvert-cvtpd2pi_u128.bin \
314 tstIEMAImplDataSseConvert-cvttpd2pi_u128.bin \
315 tstIEMAImplDataSseConvert-cvtpi2ps_u128.bin \
316 tstIEMAImplDataSseConvert-cvtpi2pd_u128.bin \
317 tstIEMAImplDataSseConvert-cvtps2pi_u128.bin \
318 tstIEMAImplDataSseConvert-cvttps2pi_u128.bin \
319 tstIEMAImplDataSsePcmpxstrx-pcmpistri_u128.bin \
320 tstIEMAImplDataSsePcmpxstrx-pcmpistrm_u128.bin \
321 tstIEMAImplDataSsePcmpxstrx-pcmpestri_u128.bin \
322 tstIEMAImplDataSsePcmpxstrx-pcmpestrm_u128.bin
323
324tstIEMAImpl_TEMPLATE = VBoxR3TstExe
325tstIEMAImpl_DEFS = $(VMM_COMMON_DEFS) IEM_WITHOUT_ASSEMBLY IN_TSTVMSTRUCT
326tstIEMAImpl_SDKS = VBoxSoftFloatR3Shared
327tstIEMAImpl_INCS = ../include .
328tstIEMAImpl_CLEAN = \
329 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataInt.cpp \
330 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataInt-Amd.cpp \
331 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataInt-Intel.cpp \
332 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuLdSt.cpp \
333 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuLdSt-Amd.cpp \
334 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuLdSt-Intel.cpp \
335 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary1.cpp \
336 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary1-Amd.cpp \
337 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary1-Intel.cpp \
338 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary2.cpp \
339 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther.cpp \
340 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther-Amd.cpp \
341 $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther-Intel.cpp
342tstIEMAImpl_SOURCES = \
343 tstIEMAImpl.cpp \
344 ../VMMAll/IEMAllAImplC.cpp \
345 $(tstIEMAImpl_CLEAN)
346tstIEMAImpl_SOURCES.x86 += tstIEMAImplDataSseBinary.asm
347tstIEMAImpl_SOURCES.amd64 += tstIEMAImplDataSseBinary.asm
348tstIEMAImplDataSseBinary.asm_DEPS = \
349 $(TSTIEMAIMPL_TEST_DATA_DEPS)
350
351tstIEMAImpl_SOURCES.arm64 += tstIEMAImplDataSseBinary.S
352tstIEMAImplDataSseBinary.S_DEPS = \
353 $(TSTIEMAIMPL_TEST_DATA_DEPS)
354$(call KB_FN_DO_PASS0_ON_TARGET,tstIEMAImpl)
355
356# This variant mainly for generating data.
357tstIEMAImplAsm_TEMPLATE := VBoxR3TstExe
358tstIEMAImplAsm_SDKS := VBoxSoftFloatR3Shared
359tstIEMAImplAsm_DEFS = $(VMM_COMMON_DEFS) IEM_WITH_ASSEMBLY IN_TSTVMSTRUCT TSTIEMAIMPL_WITH_GENERATOR
360tstIEMAImplAsm_ASFLAGS.amd64 := -Werror
361tstIEMAImplAsm_ASFLAGS.x86 := -Werror
362tstIEMAImplAsm_INCS := ../include .
363tstIEMAImplAsm_SOURCES = \
364 tstIEMAImpl.cpp \
365 ../VMMAll/IEMAllAImpl.asm \
366 ../VMMAll/IEMAllAImplC.cpp \
367 $(tstIEMAImpl_CLEAN)
368tstIEMAImplAsm_SOURCES.x86 += tstIEMAImplDataSseBinary.asm
369tstIEMAImplAsm_SOURCES.amd64 += tstIEMAImplDataSseBinary.asm
370tstIEMAImplDataSseBinary.asm_DEPS = \
371 $(TSTIEMAIMPL_TEST_DATA_DEPS)
372
373tstIEMAImplAsm_SOURCES.arm64 += tstIEMAImplDataSseBinary.S
374tstIEMAImplDataSseBinary.S_DEPS = \
375 $(TSTIEMAIMPL_TEST_DATA_DEPS)
376
377## @param 1 The sub-name of the file in question.
378define def_tstIEMAImplData_adjust
379 $$(tstIEMAImpl_0_OUTDIR)/tstIEMAImplData$(1).cpp: \
380 $$(tstIEMAImpl_DEFPATH)/tstIEMAImplData$(1).cpp \
381 $$(tstIEMAImpl_DEFPATH)/tstIEMAImplData.sh \
382 $$(tstIEMAImpl_DEFPATH)/tstIEMAImpl.h \
383 | $$(tstIEMAImpl_0_OUTDIR)/
384 $$(ASH) "$$(tstIEMAImpl_DEFPATH)/tstIEMAImplData.sh" \
385 "$$(CP_EXT)" \
386 "$$(MV_EXT)" \
387 "$$(SED_EXT)" \
388 "$$(APPEND_EXT)" \
389 "$$(tstIEMAImpl_0_OUTDIR)" \
390 "$$(tstIEMAImpl_DEFPATH)" \
391 "$(1)"
392endef
393$(evalcall2 def_tstIEMAImplData_adjust,Int)
394$(evalcall2 def_tstIEMAImplData_adjust,Int-Amd)
395$(evalcall2 def_tstIEMAImplData_adjust,Int-Intel)
396$(evalcall2 def_tstIEMAImplData_adjust,FpuLdSt)
397$(evalcall2 def_tstIEMAImplData_adjust,FpuLdSt-Amd)
398$(evalcall2 def_tstIEMAImplData_adjust,FpuLdSt-Intel)
399$(evalcall2 def_tstIEMAImplData_adjust,FpuBinary1)
400$(evalcall2 def_tstIEMAImplData_adjust,FpuBinary1-Amd)
401$(evalcall2 def_tstIEMAImplData_adjust,FpuBinary1-Intel)
402$(evalcall2 def_tstIEMAImplData_adjust,FpuBinary2)
403$(evalcall2 def_tstIEMAImplData_adjust,FpuOther)
404$(evalcall2 def_tstIEMAImplData_adjust,FpuOther-Amd)
405$(evalcall2 def_tstIEMAImplData_adjust,FpuOther-Intel)
406
407
408#
409# Testcase for checking the repurposing of the IEM instruction code.
410#
411tstIEMCheckMc_TEMPLATE = VBoxR3TstExe
412tstIEMCheckMc_SOURCES = tstIEMCheckMc.cpp
413tstIEMCheckMc_DEFS = $(VMM_COMMON_DEFS)
414tstIEMCheckMc_LIBS = $(LIB_RUNTIME)
415ifeq ($(KBUILD_TARGET),win)
416 tstIEMCheckMc_CXXFLAGS = $(VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS) -wd4189 # local variable is initialized but not used.
417else
418 tstIEMCheckMc_CXXFLAGS = $(VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS) -Wno-unused-value -Wno-unused-variable
419endif
420
421#
422# Saved state manager testcase.
423#
424tstSSM_TEMPLATE = VBoxR3TstExe
425tstSSM_INCS = $(VBOX_PATH_VMM_SRC)/include
426tstSSM_DEFS = $(VMM_COMMON_DEFS)
427tstSSM_SOURCES = tstSSM.cpp
428tstSSM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
429
430#
431# VMM configuration manager tests.
432#
433if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
434 tstCFGMHardened_TEMPLATE = VBoxR3HardenedTstExe
435 tstCFGMHardened_NAME = tstCFGM
436 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
437 tstCFGMHardened_DEFS = PROGRAM_NAME_STR="tstCFGM"
438 else
439 tstCFGMHardened_DEFS = PROGRAM_NAME_STR=\"tstCFGM\"
440 endif
441 tstCFGMHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
442 tstCFGM_TEMPLATE = VBoxR3HardenedTstDll
443else
444 tstCFGM_TEMPLATE = VBoxR3TstExe
445endif
446tstCFGM_DEFS = $(VMM_COMMON_DEFS)
447tstCFGM_SOURCES = tstCFGM.cpp
448tstCFGM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
449
450#
451# Comparing some compression algorithms considered for SSM usage.
452#
453tstCompressionBenchmark_TEMPLATE = VBoxR3TstExe
454tstCompressionBenchmark_SOURCES = tstCompressionBenchmark.cpp
455
456#
457# Two testcases for checking the ring-0 setjmp/longjmp code.
458#
459tstVMMR0CallHost-1_TEMPLATE = VBoxR3TstExe
460tstVMMR0CallHost-1_INCS = $(VBOX_PATH_VMM_SRC)/include
461tstVMMR0CallHost-1_SOURCES = \
462 tstVMMR0CallHost-1.cpp
463tstVMMR0CallHost-1_SOURCES.amd64 = \
464 $(VBOX_PATH_VMM_SRC)/VMMR0/VMMR0JmpA-amd64.asm
465tstVMMR0CallHost-1_SOURCES.x86 = \
466 $(VBOX_PATH_VMM_SRC)/VMMR0/VMMR0JmpA-x86.asm
467
468
469#
470# For testing the VM request queue code.
471#
472if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
473 tstVMREQHardened_TEMPLATE = VBoxR3HardenedExe
474 tstVMREQHardened_NAME = tstVMREQ
475 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
476 tstVMREQHardened_DEFS = PROGRAM_NAME_STR="tstVMREQ"
477 else
478 tstVMREQHardened_DEFS = PROGRAM_NAME_STR=\"tstVMREQ\"
479 endif
480 tstVMREQHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
481 tstVMREQ_TEMPLATE = VBoxR3Dll
482else
483 tstVMREQ_TEMPLATE = VBoxR3Exe
484endif
485tstVMREQ_DEFS = $(VMM_COMMON_DEFS)
486tstVMREQ_SOURCES = tstVMREQ.cpp
487tstVMREQ_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
488
489#
490# Tool for reanimate things like OS/2 dumps.
491#
492if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
493 tstAnimateHardened_TEMPLATE = VBoxR3HardenedExe
494 tstAnimateHardened_NAME = tstAnimate
495 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
496 tstAnimateHardened_DEFS = PROGRAM_NAME_STR="tstAnimate"
497 else
498 tstAnimateHardened_DEFS = PROGRAM_NAME_STR=\"tstAnimate\"
499 endif
500 tstAnimateHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
501 tstAnimate_TEMPLATE = VBoxR3Dll
502else
503 tstAnimate_TEMPLATE = VBoxR3Exe
504endif
505tstAnimate_DEFS = $(VMM_COMMON_DEFS)
506tstAnimate_SOURCES = tstAnimate.cpp
507tstAnimate_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
508
509tstX86-1_TEMPLATE = VBoxR3TstExe
510tstX86-1_SOURCES = tstX86-1.cpp tstX86-1A.asm
511tstX86-1_LIBS = $(LIB_RUNTIME)
512tstX86-1_LDFLAGS.linux = $(VBOX_GCC_no-pie)
513
514tstX86-FpuSaveRestore_TEMPLATE = VBoxR3TstExe
515tstX86-FpuSaveRestore_SOURCES = tstX86-FpuSaveRestore.cpp tstX86-FpuSaveRestoreA.asm
516tstX86-FpuSaveRestore_LIBS = $(LIB_RUNTIME)
517
518ifdef VBOX_WITH_RAW_MODE
519
520 #
521 # Raw-mode VMM testcase.
522 #
523 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
524 tstVMMHardened_TEMPLATE = VBoxR3HardenedExe
525 tstVMMHardened_NAME = tstVMM
526 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
527 tstVMMHardened_DEFS = PROGRAM_NAME_STR="tstVMM"
528 else
529 tstVMMHardened_DEFS = PROGRAM_NAME_STR=\"tstVMM\"
530 endif
531 tstVMMHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
532 tstVMM_TEMPLATE = VBoxR3Dll
533 else
534 tstVMM_TEMPLATE = VBoxR3Exe
535 endif
536 tstVMM_SOURCES = tstVMM.cpp
537 tstVMM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
538
539 #
540 # HM VMM testcase.
541 #
542 tstVMM-HM_TEMPLATE = VBoxR3Exe
543 tstVMM-HM_SOURCES = tstVMM-HM.cpp
544 tstVMM-HM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
545
546 #
547 # VMM host process fork test case (memory ++).
548 #
549 tstVMMFork_TEMPLATE = VBoxR3Exe
550 tstVMMFork_SOURCES = tstVMMFork.cpp
551 tstVMMFork_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
552
553 #
554 # Raw-mode micro benchmark.
555 #
556 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
557 tstMicroHardened_TEMPLATE = VBoxR3HardenedExe
558 tstMicroHardened_NAME = tstMicro
559 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
560 tstMicroHardened_DEFS = PROGRAM_NAME_STR="tstMicro"
561 else
562 tstMicroHardened_DEFS = PROGRAM_NAME_STR=\"tstMicro\"
563 endif
564 tstMicroHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
565 tstMicro_TEMPLATE = VBoxR3Dll
566 else
567 tstMicro_TEMPLATE = VBoxR3Exe
568 endif
569 tstMicro_SOURCES = tstMicro.cpp
570 tstMicro_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
571 tstMicro_DEFS = $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,)
572
573 tstMicroRC_TEMPLATE = VBoxRc
574 tstMicroRC_SOURCES = tstMicroRC.cpp tstMicroRCA.asm
575 tstMicroRC_DEFS = $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,)
576 tstMicroRC_INCS = $(VBOX_PATH_VMM_SRC)/testcase
577 ifeq ($(VBOX_LDR_FMT32),pe)
578 tstMicroRC_LDFLAGS = -Entry:tstMicroRC
579 endif
580 tstMicroRC_SYSSUFF = .gc
581 tstMicroRC_LIBS = \
582 $(PATH_STAGE_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
583 $(PATH_STAGE_LIB)/RuntimeRC$(VBOX_SUFF_LIB)
584 ifeq ($(filter-out pe lx,$(VBOX_LDR_FMT32)),)
585 tstMicroRC_LIBS += \
586 $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
587 $(LIB_VMMRC)
588 endif
589 tstMicroRC_SOURCES.win = tstMicroRC.def
590
591endif # VBOX_WITH_RAW_MODE
592
593
594if !defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS)
595 #
596 # Special NEM host testcase.
597 #
598 if ("$(KBUILD_TARGET_ARCH).$(KBUILD_TARGET_ARCH)" == "darwin.amd64" && (defined(VBOX_WITH_NATIVE_NEM) || "$(USERNAME)" == "bird")) \
599 || ("$(KBUILD_TARGET_ARCH).$(KBUILD_TARGET_ARCH)" == "linux.amd64" && (defined(VBOX_WITH_NATIVE_NEM) || "$(USERNAME)" == "bird")) \
600 || ("$(KBUILD_TARGET_ARCH).$(KBUILD_TARGET_ARCH)" == "win.amd64" && defined(VBOX_WITH_NATIVE_NEM))
601 PROGRAMS += NemRawBench-1
602 NemRawBench-1_TEMPLATE = VBoxR3Static
603 NemRawBench-1_SOURCES = NemRawBench-1.cpp
604 NemRawBench-1_BLD_TYPE = release
605 NemRawBench-1_INCS.win = \
606 $(KBUILD_DEVTOOLS)/win.x86/sdk/v10.0.17134.0/include/10.0.17134.0/um \
607 $(KBUILD_DEVTOOLS)/win.x86/sdk/v10.0.17134.0/include/10.0.17134.0/shared
608 NemRawBench-1_CXXFLAGS.darwin = \
609 -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform//Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks
610 #NemRawBench-1_LDFLAGS.darwin = \
611# -F/System/Library/Frameworks \
612# -framework Hypervisor
613 NemRawBench-1_LDFLAGS.darwin = \
614 /System/Library/Frameworks/Hypervisor.framework/Hypervisor
615 endif
616endif
617
618#
619# PDM Queue tests.
620#
621tstPDMQueue_TEMPLATE := VBoxR3Exe
622tstPDMQueue_DEFS = $(VMM_COMMON_DEFS)
623tstPDMQueue_SOURCES := tstPDMQueue.cpp
624tstPDMQueue_LIBS := $(LIB_VMM) $(LIB_RUNTIME)
625
626
627ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
628 #
629 # PDM asynchronous completation test.
630 #
631 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
632 tstPDMAsyncCompletionHardened_TEMPLATE = VBoxR3HardenedExe
633 tstPDMAsyncCompletionHardened_NAME = tstPDMAsyncCompletion
634 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
635 tstPDMAsyncCompletionHardened_DEFS = PROGRAM_NAME_STR="tstPDMAsyncCompletion"
636 else
637 tstPDMAsyncCompletionHardened_DEFS = PROGRAM_NAME_STR=\"tstPDMAsyncCompletion\"
638 endif
639 tstPDMAsyncCompletionHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
640 tstPDMAsyncCompletion_TEMPLATE = VBoxR3Dll
641 else
642 tstPDMAsyncCompletion_TEMPLATE = VBoxR3Exe
643 endif
644 tstPDMAsyncCompletion_DEFS = $(VMM_COMMON_DEFS)
645 tstPDMAsyncCompletion_INCS = $(VBOX_PATH_VMM_SRC)/include
646 tstPDMAsyncCompletion_SOURCES = tstPDMAsyncCompletion.cpp
647 tstPDMAsyncCompletion_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
648
649 #
650 # PDM asynchronous completation stress test.
651 #
652 if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
653 tstPDMAsyncCompletionStressHardened_TEMPLATE = VBoxR3HardenedExe
654 tstPDMAsyncCompletionStressHardened_NAME = tstPDMAsyncCompletionStress
655 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
656 tstPDMAsyncCompletionStressHardened_DEFS = PROGRAM_NAME_STR="tstPDMAsyncCompletionStress"
657 else
658 tstPDMAsyncCompletionStressHardened_DEFS = PROGRAM_NAME_STR=\"tstPDMAsyncCompletionStress\"
659 endif
660 tstPDMAsyncCompletionStressHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
661 tstPDMAsyncCompletionStress_TEMPLATE = VBoxR3Dll
662 else
663 tstPDMAsyncCompletionStress_TEMPLATE = VBoxR3Exe
664 endif
665 tstPDMAsyncCompletionStress_DEFS = $(VMM_COMMON_DEFS)
666 tstPDMAsyncCompletionStress_INCS = $(VBOX_PATH_VMM_SRC)/include
667 tstPDMAsyncCompletionStress_SOURCES = tstPDMAsyncCompletionStress.cpp
668 tstPDMAsyncCompletionStress_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
669endif
670
671ifndef VBOX_ONLY_EXTPACKS
672 PROGRAMS += tstSSM-2
673 tstSSM-2_TEMPLATE = VBoxR3TstExe
674 tstSSM-2_DEFS = IN_VMM_STATIC
675 tstSSM-2_SOURCES = tstSSM-2.cpp
676 tstSSM-2_LIBS = $(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB)
677endif
678
679#
680# Generate VM structure tests.
681#
682if !defined(VBOX_ONLY_EXTPACKS) \
683 && ( defined(VBOX_WITH_DTRACE_R3) \
684 || defined(VBOX_WITH_DTRACE_R0) \
685 || defined(VBOX_WITH_DTRACE_RC))
686 tstVMStructDTrace_TEMPLATE = VBoxR3AutoTest
687 tstVMStructDTrace_DEFS = VBOX_IN_VMM IN_VMM_R3 IN_DIS $(VMM_COMMON_DEFS)
688 ifdef VBOX_WITH_RAW_MODE
689 tstVMStructDTrace_DEFS += VBOX_WITH_RAW_MODE
690 endif
691 tstVMStructDTrace_INCS = \
692 $(VBOX_PATH_VMM_SRC)/include \
693 $(VBOX_PATH_VMM_SRC)/PATM \
694 $(VBOX_VMM_TESTCASE_OUT_DIR)
695 tstVMStructDTrace_SOURCES = tstVMStructDTrace.cpp
696 ifdef VBOX_WITH_R0_LOGGING
697 tstVMStructDTrace_DEFS += VBOX_WITH_R0_LOGGING
698 endif
699
700
701 VMMLibDTraceStructTest_INST = $(VBOX_INST_DTRACE_TST)$(KBUILD_TARGET_ARCH)/
702 VMMLibDTraceStructTest_SOURCES = \
703 $(tstVMStructDTrace_0_OUTDIR)/vbox-vm-struct-test.d
704 VMMLibDTraceStructTest_CLEAN = \
705 $(tstVMStructDTrace_0_OUTDIR)/vbox-vm-struct-test.d
706
707 $$(tstVMStructDTrace_0_OUTDIR)/vbox-vm-struct-test.d: \
708 $$(tstVMStructDTrace_1_STAGE_TARGET) | $$(dir $$@)
709 $(QUIET)$(RM) -f $@
710 $< > $@
711
712endif
713
714
715include $(FILE_KBUILD_SUB_FOOTER)
716
717
718#
719# Some handcrafted support targets for tstAsmStructs.
720#
721MY_ASA_ASM_STUFF = \
722 $(addprefix -D, \
723 $(DEFS) \
724 $(DEFS.$(KBUILD_TYPE)) \
725 $(DEFS.$(KBUILD_TARGET)) \
726 IN_RING3 $(ARCH_BITS_DEFS) \
727 $(DEFS.$(KBUILD_TARGET_ARCH)) \
728 $(DEFS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) \
729 $(VMM_COMMON_DEFS) \
730 ) \
731 -f $(if $(eq $(KBUILD_TARGET),darwin),macho,elf) \
732 $(foreach inc,$(INCS) $(VBOX_PATH_VMM_SRC)/testcase $(VBOX_PATH_VMM_SRC)/include $(VBOX_VMM_TESTCASE_OUT_DIR) \
733 ,-I$(inc)/)
734
735# 1a. make a header file which makes all the structures+members globals.
736$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac: \
737 $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
738 $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed \
739 $(DEPTH)/include/iprt/asmdefs.mac \
740 $(DEPTH)/include/VBox/vmm/cpum.mac \
741 $(DEPTH)/include/VBox/vmm/vm.mac \
742 $(DEPTH)/include/VBox/vmm/gvm.mac \
743 $(DEPTH)/include/VBox/sup.mac \
744 $(DEPTH)/include/iprt/x86.mac \
745 $(VBOX_PATH_VMM_SRC)/include/CPUMInternal.mac \
746 $(VBOX_PATH_VMM_SRC)/include/HMInternal.mac \
747 $(VBOX_PATH_VMM_SRC)/include/VMMInternal.mac \
748 $(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
749 $(PATH_ROOT)/Config.kmk $(LOCALCFG) $(AUTOCFG) \
750 | $$(dir $$@)
751 $(call MSG_GENERATE,tstVMStructSize,$@,$<)
752ifndef DONT_USE_YASM
753 $(QUIET)$(TOOL_YASM_AS) $(MY_ASA_ASM_STUFF) -o [email protected] -l [email protected] $<
754 $(SED) -f $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed --output $@ [email protected]
755else
756 $(QUIET)$(TOOL_NASM_AS) -g $(MY_ASA_ASM_STUFF) -o [email protected] -l [email protected] $<
757 $(VBOX_NM) [email protected] | $(SED) \
758 -e '/[0-9a-fA-F][0-9a-fA-F]* [^a] /d' \
759 -e 's/[0-9a-fA-F][0-9a-fA-F]* a \([^ ]*\)/global \1/' \
760 > $@
761endif
762
763# 1b. make an elf/macho object containing the offsets.
764includedep $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o.dep
765$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o: \
766 $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
767 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac \
768 $(DEPTH)/include/iprt/asmdefs.mac \
769 $(DEPTH)/include/VBox/vmm/cpum.mac \
770 $(DEPTH)/include/VBox/vmm/hm_vmx.mac \
771 $(DEPTH)/include/VBox/vmm/stam.mac \
772 $(DEPTH)/include/VBox/vmm/vm.mac \
773 $(DEPTH)/include/VBox/sup.mac \
774 $(DEPTH)/include/iprt/x86.mac \
775 $(VBOX_PATH_VMM_SRC)/include/CPUMInternal.mac \
776 $(VBOX_PATH_VMM_SRC)/include/HMInternal.mac \
777 $(VBOX_PATH_VMM_SRC)/include/VMMInternal.mac \
778 $(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
779 $$(if $$(eq $$(tstAsmStructsAsmDep_STUFF),$$(MY_ASA_ASM_STUFF)),,FORCE) \
780 | $$(dir $$@)
781 $(call MSG_COMPILE,tstAsmStructsasm,$<,$@,AS)
782ifndef DONT_USE_YASM
783 $(QUIET)$(TOOL_YASM_AS) $(MY_ASA_ASM_STUFF) -DDO_GLOBALS -o $@ $<
784else
785 $(QUIET)$(TOOL_NASM_AS) $(MY_ASA_ASM_STUFF) -DDO_GLOBALS -o $@ $<
786endif
787 %$(QUIET2)$(RM) -f -- $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o.dep
788 %$(QUIET2)$(APPEND) '$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o.dep' 'tstAsmStructsAsmDep_STUFF=$(MY_ASA_ASM_STUFF)'
789
790# 2. use nm and sed to transform this into the header we want.
791$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h: $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o
792 $(call MSG_GENERATE,tstVMStructSize,$@,$<)
793 $(QUIET)$(RM) -f $@ [email protected] [email protected]
794 $(QUIET)$(REDIRECT) -wo [email protected] -- $(VBOX_NM) $<
795 $(QUIET)$(SED) \
796 -e '/STAMPROFILEADV/d' \
797 \
798 -e '/^\(0x\)\{0,1\}00[0-9a-fA-F]* [aAnN] [^_.]*\./!d' \
799 -e 's/^\(0x\)\{0,1\}\(00[0-9a-fA-F]*\) [aAnN] \([^.]*\)\.\(.*$$\)/ CHECK_OFF(\3, 0x0\2, \4);/' \
800 --output [email protected] [email protected]
801 $(QUIET)$(SED) \
802 -e '/VM_size$$/d' \
803 -e '/VMCPU_size$$/d' \
804 -e '/VMMCPU_size$$/d' \
805 -e '/SUPDRVTRACERUSRCTX32_size$$/d' \
806 -e '/HMCPU_size$$/d' \
807 \
808 -e '/^\(0x\)\{0,1\}00[0-9a-fA-F]* [aAnN] [^_.]*_size$$/!d' \
809 -e 's/^\(0x\)\{0,1\}\(00[0-9a-fA-F]*\) [aAnN] \([^_.]*\)_size/ CHECK_SIZE(\3, 0x0\2);/' \
810 --append [email protected] [email protected]
811 $(QUIET)$(MV) -f [email protected] $@
812 $(QUIET)$(RM) -f [email protected]
813
814# 3. run it.
815$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run: \
816 $$(tstAsmStructs_1_STAGE_TARGET) \
817 $(if-expr defined(VBOX_WITH_RAW_MODE),$$(tstAsmStructsRC_1_STAGE_TARGET),)
818 $(QUIET)$(RM) -f $@
819 $(tstAsmStructs_1_STAGE_TARGET)
820ifdef VBOX_WITH_RAW_MODE
821 $(tstAsmStructsRC_1_STAGE_TARGET)
822endif
823 $(QUIET)$(APPEND) "$@" "done"
824
825
826
827#
828# Run rule for tstVMStructSize.
829#
830
831ifdef VBOX_WITH_RAW_MODE
832 # 1. Manually dump selected structures and members.
833 $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructRC.h: $$(tstVMStructRC_1_STAGE_TARGET) | $$(dir $$@)
834 $(call MSG_GENERATE,tstVMStructSize,$@)
835 $(QUIET)$(REDIRECT) -wo $@ -- $<
836endif # VBOX_WITH_RAW_MODE
837
838# 2. run it.
839$(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run: $$(tstVMStructSize_1_STAGE_TARGET) | $$(dir $$@)
840 $(QUIET)$(RM) -f $@
841 $<
842 $(QUIET)$(APPEND) "$@" "done"
843
844# alias for the two struct tests.
845run-struct-tests: $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
846
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