VirtualBox

source: vbox/trunk/src/VBox/Runtime/VBox/RTLogWriteVmm-amd64-x86.asm

Last change on this file was 98103, checked in by vboxsync, 16 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.0 KB
Line 
1; $Id: RTLogWriteVmm-amd64-x86.asm 98103 2023-01-17 14:15:46Z vboxsync $
2;; @file
3; IPRT - RTLogWriteVmm - AMD64 & X86 for VBox.
4;
5
6;
7; Copyright (C) 2012-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; The contents of this file may alternatively be used under the terms
26; of the Common Development and Distribution License Version 1.0
27; (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28; in the VirtualBox distribution, in which case the provisions of the
29; CDDL are applicable instead of those of the GPL.
30;
31; You may elect to license modified versions of this file under the
32; terms and conditions of either the GPL or the CDDL or both.
33;
34; SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35;
36
37;*******************************************************************************
38;* Header Files *
39;*******************************************************************************
40%define RT_ASM_WITH_SEH64
41%include "iprt/asmdefs.mac"
42%include "VBox/vmm/cpuidcall.mac"
43
44BEGINCODE
45
46;;
47; CPUID with EAX and ECX inputs, returning ALL output registers.
48;
49; @param pch x86:ebp+8 gcc:rdi msc:rcx
50; @param cch x86:ebp+c gcc:esi msc:edx
51; @param fRelease x86:ebp+10 gcc:edx msc:r8d
52;
53; @returns EAX
54;
55RT_BEGINPROC RTLogWriteVmm
56 push xBP
57 SEH64_PUSH_xBP
58 mov xBP, xSP
59 SEH64_SET_FRAME_xBP 0
60 push xBX
61 SEH64_PUSH_GREG xBX
62%ifndef ASM_CALL64_GCC
63 push xSI
64 SEH64_PUSH_GREG xSI
65%endif
66 SEH64_END_PROLOGUE
67
68%ifdef ASM_CALL64_MSC
69 %if ARCH_BITS != 64
70 %error ARCH_BITS mismatch?
71 %endif
72 mov rsi, rcx ; pch
73 mov ebx, r8d ; fRelease; cch is the right register already.
74%elifdef ASM_CALL64_GCC
75 mov ebx, edx ; fRelease
76 mov edx, esi ; cch
77 mov rsi, rdi ; pch
78%elif ARCH_BITS == 32
79 mov esi, [xBP + 08h] ; pch
80 mov edx, [xBP + 0ch] ; cch
81 movzx ebx, byte [xBP + 10h] ; fRelease
82%else
83 %error unsupported arch
84%endif
85 mov eax, VBOX_CPUID_REQ_EAX_FIXED
86 mov ecx, VBOX_CPUID_REQ_ECX_FIXED | VBOX_CPUID_FN_LOG
87
88 cpuid
89
90%ifndef ASM_CALL64_GCC
91 pop xSI
92%endif
93 pop xBX
94 leave
95 ret
96ENDPROC RTLogWriteVmm
97
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use