1 | ; $Id: bs3-cpu-decoding-1-template.mac 76553 2019-01-01 01:45:53Z vboxsync $
|
---|
2 | ;; @file
|
---|
3 | ; BS3Kit - bs3-cpu-decoding-1, assembly template.
|
---|
4 | ;
|
---|
5 |
|
---|
6 | ;
|
---|
7 | ; Copyright (C) 2007-2019 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 | ; The contents of this file may alternatively be used under the terms
|
---|
18 | ; of the Common Development and Distribution License Version 1.0
|
---|
19 | ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | ; VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | ; CDDL are applicable instead of those of the GPL.
|
---|
22 | ;
|
---|
23 | ; You may elect to license modified versions of this file under the
|
---|
24 | ; terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | ;
|
---|
26 |
|
---|
27 |
|
---|
28 | ;*********************************************************************************************************************************
|
---|
29 | ;* Header Files *
|
---|
30 | ;*********************************************************************************************************************************
|
---|
31 | %include "bs3kit-template-header.mac" ; setup environment
|
---|
32 |
|
---|
33 |
|
---|
34 | ;*********************************************************************************************************************************
|
---|
35 | ;* External Symbols *
|
---|
36 | ;*********************************************************************************************************************************
|
---|
37 | TMPL_BEGIN_TEXT
|
---|
38 |
|
---|
39 |
|
---|
40 | %ifdef BS3_INSTANTIATING_CMN
|
---|
41 |
|
---|
42 | BS3_PROC_BEGIN_CMN bs3CpuDecoding1_LoadXmm0, BS3_PBC_NEAR
|
---|
43 | BS3_CALL_CONV_PROLOG 1
|
---|
44 | push xBP
|
---|
45 | mov xBP, xSP
|
---|
46 |
|
---|
47 | %if TMPL_BITS == 16
|
---|
48 | push es
|
---|
49 | push bx
|
---|
50 | les bx, [xBP + xCB + cbCurRetAddr]
|
---|
51 | movupd xmm0, [es:bx]
|
---|
52 | pop bx
|
---|
53 | pop es
|
---|
54 | %else
|
---|
55 | mov xAX, [xBP + xCB + cbCurRetAddr]
|
---|
56 | movupd xmm0, [xAX]
|
---|
57 | %endif
|
---|
58 |
|
---|
59 | leave
|
---|
60 | BS3_CALL_CONV_EPILOG 1
|
---|
61 | BS3_HYBRID_RET
|
---|
62 | BS3_PROC_END_CMN bs3CpuDecoding1_LoadXmm0
|
---|
63 |
|
---|
64 |
|
---|
65 | BS3_PROC_BEGIN_CMN bs3CpuDecoding1_LoadXmm1, BS3_PBC_NEAR
|
---|
66 | BS3_CALL_CONV_PROLOG 1
|
---|
67 | push xBP
|
---|
68 | mov xBP, xSP
|
---|
69 |
|
---|
70 | %if TMPL_BITS == 16
|
---|
71 | push es
|
---|
72 | push bx
|
---|
73 | les bx, [xBP + xCB + cbCurRetAddr]
|
---|
74 | movupd xmm1, [es:bx]
|
---|
75 | pop bx
|
---|
76 | pop es
|
---|
77 | %else
|
---|
78 | mov xAX, [xBP + xCB + cbCurRetAddr]
|
---|
79 | movupd xmm1, [xAX]
|
---|
80 | %endif
|
---|
81 |
|
---|
82 | leave
|
---|
83 | BS3_CALL_CONV_EPILOG 1
|
---|
84 | BS3_HYBRID_RET
|
---|
85 | BS3_PROC_END_CMN bs3CpuDecoding1_LoadXmm1
|
---|
86 |
|
---|
87 |
|
---|
88 | BS3_PROC_BEGIN_CMN bs3CpuDecoding1_SaveXmm0, BS3_PBC_NEAR
|
---|
89 | BS3_CALL_CONV_PROLOG 1
|
---|
90 | push xBP
|
---|
91 | mov xBP, xSP
|
---|
92 |
|
---|
93 | %if TMPL_BITS == 16
|
---|
94 | push es
|
---|
95 | push bx
|
---|
96 | les bx, [xBP + xCB + cbCurRetAddr]
|
---|
97 | movupd [es:bx], xmm0
|
---|
98 | pop bx
|
---|
99 | pop es
|
---|
100 | %else
|
---|
101 | mov xAX, [xBP + xCB + cbCurRetAddr]
|
---|
102 | movupd [xAX], xmm0
|
---|
103 | %endif
|
---|
104 |
|
---|
105 | leave
|
---|
106 | BS3_CALL_CONV_EPILOG 1
|
---|
107 | BS3_HYBRID_RET
|
---|
108 | BS3_PROC_END_CMN bs3CpuDecoding1_SaveXmm0
|
---|
109 |
|
---|
110 |
|
---|
111 | %endif
|
---|
112 |
|
---|
113 | %include "bs3kit-template-footer.mac" ; reset environment
|
---|
114 |
|
---|