VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMAll/VMMAllA.asm@ 107044

Last change on this file since 107044 was 106061, checked in by vboxsync, 2 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: 2.6 KB
Line 
1; $Id: VMMAllA.asm 106061 2024-09-16 14:03:52Z vboxsync $
2;; @file
3; VMM - All Contexts Assembly Routines.
4;
5
6;
7; Copyright (C) 2009-2024 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;* Header Files *
30;*******************************************************************************
31%include "VBox/asmdefs.mac"
32
33
34;*******************************************************************************
35;* Defined Constants And Macros *
36;*******************************************************************************
37%ifdef IN_RING3
38 %ifdef RT_ARCH_AMD64
39 %define VMM_TRASH_XMM_REGS
40 %endif
41%endif
42%ifdef IN_RING0
43 %ifdef RT_ARCH_AMD64
44 %ifdef RT_OS_WINDOWS
45 %define VMM_TRASH_XMM_REGS
46 %endif
47 %endif
48%endif
49%ifndef VMM_TRASH_XMM_REGS
50 %ifdef VBOX_WITH_KERNEL_USING_XMM
51 %define VMM_TRASH_XMM_REGS
52 %endif
53%endif
54
55BEGINCODE
56
57
58;;
59; Trashes the volatile XMM registers in the current ABI.
60;
61BEGINPROC VMMTrashVolatileXMMRegs
62%ifdef VMM_TRASH_XMM_REGS
63 push xBP
64 mov xBP, xSP
65
66 ; take whatever is on the stack.
67 and xSP, ~15
68 sub xSP, 80h
69
70 movdqa xmm0, [xSP + 0]
71 movdqa xmm1, [xSP + 010h]
72 movdqa xmm2, [xSP + 020h]
73 movdqa xmm3, [xSP + 030h]
74 movdqa xmm4, [xSP + 040h]
75 movdqa xmm5, [xSP + 050h]
76 %ifdef ASM_CALL64_GCC
77 movdqa xmm6, [xSP + 060h]
78 movdqa xmm7, [xSP + 070h]
79 movdqa xmm8, [xSP + 000h]
80 movdqa xmm9, [xSP + 010h]
81 movdqa xmm10,[xSP + 020h]
82 movdqa xmm11,[xSP + 030h]
83 movdqa xmm12,[xSP + 040h]
84 movdqa xmm13,[xSP + 050h]
85 movdqa xmm14,[xSP + 060h]
86 movdqa xmm15,[xSP + 070h]
87 %endif
88 leave
89%endif ; VMM_TRASH_XMM_REGS
90 xor eax, eax ; for good measure.
91 ret
92ENDPROC VMMTrashVolatileXMMRegs
93
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