1 | /* $Id: IEMAllN8veLiveness.h 106191 2024-10-01 12:56:17Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * IEM - Native Recompiler, Liveness Analysis, Common Header.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-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 | /*********************************************************************************************************************************
|
---|
30 | * Header Files *
|
---|
31 | *********************************************************************************************************************************/
|
---|
32 | #define LOG_GROUP LOG_GROUP_IEM
|
---|
33 | #define IEM_WITH_OPAQUE_DECODER_STATE
|
---|
34 | #include <VBox/vmm/iem.h>
|
---|
35 | #include "IEMInternal.h"
|
---|
36 | #include <VBox/vmm/vmcc.h>
|
---|
37 | #include <VBox/log.h>
|
---|
38 |
|
---|
39 | #include "IEMN8veRecompiler.h"
|
---|
40 | #include "IEMThreadedFunctions.h"
|
---|
41 | #include "IEMNativeFunctions.h"
|
---|
42 |
|
---|
43 |
|
---|
44 | /*********************************************************************************************************************************
|
---|
45 | * Defined Constants And Macros *
|
---|
46 | *********************************************************************************************************************************/
|
---|
47 | #define NOP() ((void)0)
|
---|
48 |
|
---|
49 |
|
---|
50 | /*
|
---|
51 | * BEGIN & END as well as internal workers.
|
---|
52 | */
|
---|
53 | #ifndef IEMLIVENESS_EXTENDED_LAYOUT
|
---|
54 | # define IEM_MC_BEGIN_EX(a_fMcFlags, a_fCImplFlags, a_cArgs) \
|
---|
55 | { \
|
---|
56 | /* Define local variables that we use to accumulate the liveness state changes in. */ \
|
---|
57 | IEMLIVENESSBIT LiveStateBit0 = { 0 }; \
|
---|
58 | IEMLIVENESSBIT LiveStateBit1 = { 0 }; \
|
---|
59 | IEMLIVENESSBIT LiveMask = { 0 }; \
|
---|
60 | bool fDoneXpctOrCall = false
|
---|
61 | #else
|
---|
62 | # define IEM_MC_BEGIN_EX(a_fMcFlags, a_fCImplFlags, a_cArgs) \
|
---|
63 | { \
|
---|
64 | /* Define local variables that we use to accumulate the liveness state changes in. */ \
|
---|
65 | IEMLIVENESSENTRY LiveState = { { 0, 0, 0, 0 } }; \
|
---|
66 | IEMLIVENESSBIT LiveMask = { 0 }; \
|
---|
67 | bool fNoInherit = false
|
---|
68 | #endif
|
---|
69 |
|
---|
70 | #ifndef IEMLIVENESS_EXTENDED_LAYOUT
|
---|
71 | AssertCompile(IEMLIVENESS_STATE_INPUT == IEMLIVENESS_STATE_MASK);
|
---|
72 | AssertCompile(IEMLIVENESSBIT0_XCPT_OR_CALL == 0 && IEMLIVENESSBIT1_XCPT_OR_CALL != 0);
|
---|
73 | # define IEM_LIVENESS_MARK_CALL_OR_POT_CALL_INTERNAL() do { \
|
---|
74 | if (!fDoneXpctOrCall) \
|
---|
75 | { \
|
---|
76 | LiveStateBit0.bm64 |= pIncoming->Bit0.bm64 & pIncoming->Bit1.bm64 & ~LiveMask.bm64; \
|
---|
77 | LiveStateBit1.bm64 |= IEMLIVENESSBIT1_XCPT_OR_CALL; \
|
---|
78 | \
|
---|
79 | LiveMask.bm64 |= IEMLIVENESSBIT_MASK; /* could also use UINT64_MAX here, but makes little no(?) difference */ \
|
---|
80 | fDoneXpctOrCall = true; /* when compiling with gcc and cl.exe on x86 - may on arm, though. */ \
|
---|
81 | } \
|
---|
82 | } while (0)
|
---|
83 | # define IEM_LIVENESS_MARK_POTENTIAL_CALL() IEM_LIVENESS_MARK_CALL_OR_POT_CALL_INTERNAL()
|
---|
84 | # define IEM_LIVENESS_MARK_CALL() IEM_LIVENESS_MARK_CALL_OR_POT_CALL_INTERNAL()
|
---|
85 | #else
|
---|
86 | # define IEM_LIVENESS_MARK_POTENTIAL_CALL() do { \
|
---|
87 | LiveState.aBits[IEMLIVENESS_BIT_POTENTIAL_CALL].bm64 |= IEMLIVENESSBIT_MASK; \
|
---|
88 | } while (0)
|
---|
89 | # define IEM_LIVENESS_MARK_CALL() do { \
|
---|
90 | LiveState.aBits[IEMLIVENESS_BIT_CALL].bm64 |= IEMLIVENESSBIT_MASK; \
|
---|
91 | LiveMask.bm64 |= IEMLIVENESSBIT_MASK; \
|
---|
92 | fNoInherit = true; /* full mask */ \
|
---|
93 | } while (0)
|
---|
94 | #endif
|
---|
95 |
|
---|
96 |
|
---|
97 | #ifndef IEMLIVENESS_EXTENDED_LAYOUT
|
---|
98 | AssertCompile(IEMLIVENESS_STATE_CLOBBERED == 0);
|
---|
99 | # define IEM_LIVENESS_ALL_EFLAGS_CLOBBER() do { \
|
---|
100 | LiveMask.bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
101 | } while (0)
|
---|
102 | AssertCompile(IEMLIVENESS_STATE_INPUT == IEMLIVENESS_STATE_MASK);
|
---|
103 | # define IEM_LIVENESS_ALL_EFLAGS_INPUT() do { \
|
---|
104 | LiveStateBit0.bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
105 | LiveStateBit1.bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
106 | LiveMask.bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
107 | } while (0)
|
---|
108 | # define IEM_LIVENESS_ALL_EFLAGS_MODIFY() IEM_LIVENESS_ALL_EFLAGS_INPUT()
|
---|
109 | #else
|
---|
110 | # define IEM_LIVENESS_ALL_EFLAGS_CLOBBER() do { \
|
---|
111 | LiveState.aBits[IEMLIVENESS_BIT_WRITE].bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
112 | LiveMask.bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
113 | } while (0)
|
---|
114 | # define IEM_LIVENESS_ALL_EFLAGS_INPUT() do { \
|
---|
115 | LiveState.aBits[IEMLIVENESS_BIT_READ].bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
116 | LiveMask.bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
117 | } while (0)
|
---|
118 | # define IEM_LIVENESS_ALL_EFLAGS_MODIFY() do { \
|
---|
119 | LiveState.aBits[IEMLIVENESS_BIT_READ].bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
120 | LiveState.aBits[IEMLIVENESS_BIT_WRITE].bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
121 | LiveMask.bm64 |= IEMLIVENESSBIT_ALL_EFL_MASK; \
|
---|
122 | } while (0)
|
---|
123 | #endif
|
---|
124 |
|
---|
125 |
|
---|
126 | #ifndef IEMLIVENESS_EXTENDED_LAYOUT
|
---|
127 | # define IEM_LIVENESS_ONE_EFLAG_CLOBBER(a_Name) do { \
|
---|
128 | LiveMask.a_Name |= 1; \
|
---|
129 | } while (0)
|
---|
130 | # define IEM_LIVENESS_ONE_EFLAG_INPUT(a_Name) do { \
|
---|
131 | LiveStateBit0.a_Name |= 1; \
|
---|
132 | LiveStateBit1.a_Name |= 1; \
|
---|
133 | LiveMask.a_Name |= 1; \
|
---|
134 | } while (0)
|
---|
135 | # define IEM_LIVENESS_ONE_EFLAG_MODIFY(a_Name) IEM_LIVENESS_ONE_EFLAG_INPUT(a_Name)
|
---|
136 | #else
|
---|
137 | # define IEM_LIVENESS_ONE_EFLAG_CLOBBER(a_Name) do { \
|
---|
138 | LiveState.aBits[IEMLIVENESS_BIT_WRITE].a_Name |= 1; \
|
---|
139 | LiveMask.a_Name |= 1; \
|
---|
140 | } while (0)
|
---|
141 | # define IEM_LIVENESS_ONE_EFLAG_INPUT(a_Name) do { \
|
---|
142 | LiveState.aBits[IEMLIVENESS_BIT_READ].a_Name |= 1; \
|
---|
143 | LiveMask.a_Name |= 1; \
|
---|
144 | } while (0)
|
---|
145 | # define IEM_LIVENESS_ONE_EFLAG_MODIFY(a_Name) do { \
|
---|
146 | LiveState.aBits[IEMLIVENESS_BIT_READ].a_Name |= 1; \
|
---|
147 | LiveState.aBits[IEMLIVENESS_BIT_WRITE].a_Name |= 1; \
|
---|
148 | LiveMask.a_Name |= 1; \
|
---|
149 | } while (0)
|
---|
150 | #endif
|
---|
151 |
|
---|
152 |
|
---|
153 | /* Generic bitmap (bmGpr, bmSegBase, ++) setters. */
|
---|
154 | #ifndef IEMLIVENESS_EXTENDED_LAYOUT
|
---|
155 | # define IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(a_bmMember, a_iElement) do { \
|
---|
156 | LiveMask.a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
157 | } while (0)
|
---|
158 | # define IEM_LIVENESS_BITMAP_MEMBER_INPUT(a_bmMember, a_iElement) do { \
|
---|
159 | LiveStateBit0.a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
160 | LiveStateBit1.a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
161 | LiveMask.a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
162 | } while (0)
|
---|
163 | # define IEM_LIVENESS_BITMAP_MEMBER_MODIFY(a_bmMember, a_iElement) IEM_LIVENESS_BITMAP_MEMBER_INPUT(a_bmMember, a_iElement)
|
---|
164 | #else
|
---|
165 | # define IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(a_bmMember, a_iElement) do { \
|
---|
166 | LiveState.aBits[IEMLIVENESS_BIT_WRITE].a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
167 | LiveMask.a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
168 | } while (0)
|
---|
169 | # define IEM_LIVENESS_BITMAP_MEMBER_INPUT(a_bmMember, a_iElement) do { \
|
---|
170 | LiveState.aBits[IEMLIVENESS_BIT_READ].a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
171 | LiveMask.a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
172 | } while (0)
|
---|
173 | # define IEM_LIVENESS_BITMAP_MEMBER_MODIFY(a_bmMember, a_iElement) do { \
|
---|
174 | LiveState.aBits[IEMLIVENESS_BIT_READ].a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
175 | LiveState.aBits[IEMLIVENESS_BIT_WRITE].a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
176 | LiveMask.a_bmMember |= RT_BIT_64(a_iElement); \
|
---|
177 | } while (0)
|
---|
178 | #endif
|
---|
179 |
|
---|
180 |
|
---|
181 | #define IEM_LIVENESS_CR0_INPUT() IEM_LIVENESS_BITMAP_MEMBER_INPUT( fCr0, 0)
|
---|
182 | #define IEM_LIVENESS_CR4_INPUT() IEM_LIVENESS_BITMAP_MEMBER_INPUT( fCr4, 0)
|
---|
183 | #define IEM_LIVENESS_XCR0_INPUT() IEM_LIVENESS_BITMAP_MEMBER_INPUT( fXcr0, 0)
|
---|
184 |
|
---|
185 |
|
---|
186 | #define IEM_LIVENESS_FCW_INPUT() IEM_LIVENESS_BITMAP_MEMBER_INPUT( fFcw, 0)
|
---|
187 | #define IEM_LIVENESS_FCW_CLOBBER() IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(fFcw, 0)
|
---|
188 | #define IEM_LIVENESS_FCW_MODIFY() IEM_LIVENESS_BITMAP_MEMBER_MODIFY( fFcw, 0)
|
---|
189 |
|
---|
190 |
|
---|
191 | #define IEM_LIVENESS_FSW_INPUT() IEM_LIVENESS_BITMAP_MEMBER_INPUT( fFsw, 0)
|
---|
192 | #define IEM_LIVENESS_FSW_CLOBBER() IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(fFsw, 0)
|
---|
193 | #define IEM_LIVENESS_FSW_MODIFY() IEM_LIVENESS_BITMAP_MEMBER_MODIFY( fFsw, 0)
|
---|
194 |
|
---|
195 |
|
---|
196 | #define IEM_LIVENESS_MXCSR_INPUT() IEM_LIVENESS_BITMAP_MEMBER_INPUT( fMxCsr, 0)
|
---|
197 | #define IEM_LIVENESS_MXCSR_CLOBBER() IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(fMxCsr, 0)
|
---|
198 | #define IEM_LIVENESS_MXCSR_MODIFY() IEM_LIVENESS_BITMAP_MEMBER_MODIFY( fMxCsr, 0)
|
---|
199 |
|
---|
200 |
|
---|
201 | #define IEM_LIVENESS_GPR_CLOBBER(a_idxGpr) IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(bmGprs, a_idxGpr)
|
---|
202 | #define IEM_LIVENESS_GPR_INPUT(a_idxGpr) IEM_LIVENESS_BITMAP_MEMBER_INPUT( bmGprs, a_idxGpr)
|
---|
203 | #define IEM_LIVENESS_GPR_MODIFY(a_idxGpr) IEM_LIVENESS_BITMAP_MEMBER_MODIFY( bmGprs, a_idxGpr)
|
---|
204 |
|
---|
205 |
|
---|
206 | #define IEM_LIVENESS_SEG_BASE_CLOBBER(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(bmSegBase, a_iSeg)
|
---|
207 | #define IEM_LIVENESS_SEG_BASE_INPUT(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_INPUT( bmSegBase, a_iSeg)
|
---|
208 | #define IEM_LIVENESS_SEG_BASE_MODIFY(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_MODIFY( bmSegBase, a_iSeg)
|
---|
209 |
|
---|
210 |
|
---|
211 | #define IEM_LIVENESS_SEG_ATTRIB_CLOBBER(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(bmSegAttrib, a_iSeg)
|
---|
212 | #define IEM_LIVENESS_SEG_ATTRIB_INPUT(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_INPUT( bmSegAttrib, a_iSeg)
|
---|
213 | #define IEM_LIVENESS_SEG_ATTRIB_MODIFY(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_MODFIY( bmSegAttrib, a_iSeg)
|
---|
214 |
|
---|
215 |
|
---|
216 | #define IEM_LIVENESS_SEG_LIMIT_CLOBBER(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(bmSegLimit, a_iSeg)
|
---|
217 | #define IEM_LIVENESS_SEG_LIMIT_INPUT(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_INPUT( bmSegLimit, a_iSeg)
|
---|
218 | #define IEM_LIVENESS_SEG_LIMIT_MODIFY(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_MODIFY( bmSegLimit, a_iSeg)
|
---|
219 |
|
---|
220 |
|
---|
221 | #define IEM_LIVENESS_SEG_SEL_CLOBBER(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_CLOBBER(bmSegSel, a_iSeg)
|
---|
222 | #define IEM_LIVENESS_SEG_SEL_INPUT(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_INPUT( bmSegSel, a_iSeg)
|
---|
223 | #define IEM_LIVENESS_SEG_SEL_MODIFY(a_iSeg) IEM_LIVENESS_BITMAP_MEMBER_MODIFY( bmSegSel, a_iSeg)
|
---|
224 |
|
---|
225 |
|
---|
226 | #define IEM_LIVENESS_MEM(a_iSeg) do { \
|
---|
227 | IEM_LIVENESS_MARK_POTENTIAL_CALL(); \
|
---|
228 | IEM_LIVENESS_SEG_ATTRIB_INPUT(a_iSeg); \
|
---|
229 | IEM_LIVENESS_SEG_BASE_INPUT(a_iSeg); \
|
---|
230 | IEM_LIVENESS_SEG_LIMIT_INPUT(a_iSeg); \
|
---|
231 | } while (0)
|
---|
232 |
|
---|
233 | #define IEM_LIVENESS_MEM_FLAT() IEM_LIVENESS_MARK_POTENTIAL_CALL()
|
---|
234 |
|
---|
235 | #define IEM_LIVENESS_STACK() do { \
|
---|
236 | IEM_LIVENESS_MEM(X86_SREG_SS); \
|
---|
237 | IEM_LIVENESS_GPR_MODIFY(X86_GREG_xSP); \
|
---|
238 | } while (0)
|
---|
239 |
|
---|
240 | #define IEM_LIVENESS_STACK_FLAT() do { \
|
---|
241 | IEM_LIVENESS_MEM_FLAT(); \
|
---|
242 | IEM_LIVENESS_GPR_MODIFY(X86_GREG_xSP); \
|
---|
243 | } while (0)
|
---|
244 |
|
---|
245 |
|
---|
246 | #define IEM_LIVENESS_PC_NO_FLAGS() NOP()
|
---|
247 | #define IEM_LIVENESS_PC_WITH_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflOther)
|
---|
248 |
|
---|
249 | #define IEM_LIVENESS_PC16_JMP_NO_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_SEG_LIMIT_INPUT(X86_SREG_CS)
|
---|
250 | #define IEM_LIVENESS_PC32_JMP_NO_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_SEG_LIMIT_INPUT(X86_SREG_CS)
|
---|
251 | #define IEM_LIVENESS_PC32_FLAT_JMP_NO_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL()
|
---|
252 | #define IEM_LIVENESS_PC64_JMP_NO_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL()
|
---|
253 | #define IEM_LIVENESS_PC64_INTRAPG_JMP_NO_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL() /* Typically ends TB. */
|
---|
254 |
|
---|
255 | #define IEM_LIVENESS_PC16_JMP_WITH_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflOther); IEM_LIVENESS_SEG_LIMIT_INPUT(X86_SREG_CS)
|
---|
256 | #define IEM_LIVENESS_PC32_JMP_WITH_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflOther); IEM_LIVENESS_SEG_LIMIT_INPUT(X86_SREG_CS)
|
---|
257 | #define IEM_LIVENESS_PC32_FLAT_JMP_WITH_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflOther)
|
---|
258 | #define IEM_LIVENESS_PC64_JMP_WITH_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflOther)
|
---|
259 | #define IEM_LIVENESS_PC64_INTRAPG_JMP_WITH_FLAGS() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflOther)
|
---|
260 |
|
---|
261 |
|
---|
262 | #ifndef IEMLIVENESS_EXTENDED_LAYOUT
|
---|
263 | # define IEM_MC_END() \
|
---|
264 | /* Combine the incoming state with what we've accumulated in this block. */ \
|
---|
265 | /* We can help the compiler by skipping OR'ing when having applied XPCT_OR_CALL, */ \
|
---|
266 | /* since that already imports all the incoming state. Saves a lot with cl.exe. */ \
|
---|
267 | if (!fDoneXpctOrCall) \
|
---|
268 | { \
|
---|
269 | pOutgoing->Bit0.bm64 = LiveStateBit0.bm64 | (~LiveMask.bm64 & pIncoming->Bit0.bm64); \
|
---|
270 | pOutgoing->Bit1.bm64 = LiveStateBit1.bm64 | (~LiveMask.bm64 & pIncoming->Bit1.bm64); \
|
---|
271 | } \
|
---|
272 | else \
|
---|
273 | { \
|
---|
274 | pOutgoing->Bit0.bm64 = LiveStateBit0.bm64; \
|
---|
275 | pOutgoing->Bit1.bm64 = LiveStateBit1.bm64; \
|
---|
276 | } \
|
---|
277 | }
|
---|
278 | #else
|
---|
279 | # define IEM_MC_END() \
|
---|
280 | /* Use the mask to effect inheriting. */ \
|
---|
281 | if (!fNoInherit) \
|
---|
282 | { \
|
---|
283 | uint64_t const fInhMask = ~LiveMask.bm64; \
|
---|
284 | pOutgoing->aBits[IEMLIVENESS_BIT_POTENTIAL_CALL].bm64 = LiveState.aBits[IEMLIVENESS_BIT_POTENTIAL_CALL].bm64 \
|
---|
285 | | (pIncoming->aBits[IEMLIVENESS_BIT_POTENTIAL_CALL].bm64 & fInhMask); \
|
---|
286 | pOutgoing->aBits[IEMLIVENESS_BIT_READ ].bm64 = LiveState.aBits[IEMLIVENESS_BIT_READ ].bm64 \
|
---|
287 | | (pIncoming->aBits[IEMLIVENESS_BIT_READ ].bm64 & fInhMask); \
|
---|
288 | pOutgoing->aBits[IEMLIVENESS_BIT_WRITE].bm64 = LiveState.aBits[IEMLIVENESS_BIT_WRITE].bm64 \
|
---|
289 | | (pIncoming->aBits[IEMLIVENESS_BIT_WRITE].bm64 & fInhMask); \
|
---|
290 | pOutgoing->aBits[IEMLIVENESS_BIT_CALL ].bm64 = LiveState.aBits[IEMLIVENESS_BIT_CALL ].bm64 \
|
---|
291 | | (pIncoming->aBits[IEMLIVENESS_BIT_CALL ].bm64 & fInhMask); \
|
---|
292 | } \
|
---|
293 | else \
|
---|
294 | *pOutgoing = LiveState; \
|
---|
295 | }
|
---|
296 | #endif
|
---|
297 |
|
---|
298 | /*
|
---|
299 | * The native MC variants.
|
---|
300 | */
|
---|
301 | #define IEM_MC_FREE_LOCAL(a_Name) NOP()
|
---|
302 | #define IEM_MC_FREE_ARG(a_Name) NOP()
|
---|
303 |
|
---|
304 |
|
---|
305 | /*
|
---|
306 | * The THREADED MC variants.
|
---|
307 | */
|
---|
308 |
|
---|
309 | /* We don't track RIP (PC) liveness. */
|
---|
310 | #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC16(a_cbInstr, a_rcNormal) IEM_LIVENESS_PC_NO_FLAGS()
|
---|
311 | #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC32(a_cbInstr, a_rcNormal) IEM_LIVENESS_PC_NO_FLAGS()
|
---|
312 | #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC64(a_cbInstr, a_rcNormal) IEM_LIVENESS_PC_NO_FLAGS()
|
---|
313 | #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_cbInstr, a_rcNormal) IEM_LIVENESS_PC_WITH_FLAGS()
|
---|
314 | #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_cbInstr, a_rcNormal) IEM_LIVENESS_PC_WITH_FLAGS()
|
---|
315 | #define IEM_MC_ADVANCE_RIP_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_cbInstr, a_rcNormal) IEM_LIVENESS_PC_WITH_FLAGS()
|
---|
316 |
|
---|
317 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC16(a_i8, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC16_JMP_NO_FLAGS()
|
---|
318 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC32(a_i8, a_cbInstr, a_enmEffOpSize, a_rcNormal) IEM_LIVENESS_PC32_JMP_NO_FLAGS()
|
---|
319 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC32_FLAT(a_i8, a_cbInstr, a_enmEffOpSize, a_rcNormal) IEM_LIVENESS_PC32_FLAT_JMP_NO_FLAGS()
|
---|
320 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC64(a_i8, a_cbInstr, a_enmEffOpSize, a_rcNormal) IEM_LIVENESS_PC64_JMP_NO_FLAGS()
|
---|
321 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC64_INTRAPG(a_i8, a_cbInstr, a_enmEffOpSize, a_rcNormal) IEM_LIVENESS_PC64_INTRAPG_JMP_NO_FLAGS()
|
---|
322 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_i8, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC16_JMP_WITH_FLAGS()
|
---|
323 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_i8, a_cbInstr, a_enmEffOpSize, a_rcNormal) IEM_LIVENESS_PC32_JMP_WITH_FLAGS()
|
---|
324 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC32_FLAT_WITH_FLAGS(a_i8, a_cbInstr, a_enmEffOpSize, a_rcNormal) IEM_LIVENESS_PC32_FLAT_JMP_WITH_FLAGS()
|
---|
325 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_i8, a_cbInstr, a_enmEffOpSize, a_rcNormal) IEM_LIVENESS_PC64_JMP_WITH_FLAGS()
|
---|
326 | #define IEM_MC_REL_JMP_S8_AND_FINISH_THREADED_PC64_INTRAPG_WITH_FLAGS(a_i8, a_cbInstr, a_enmEffOpSize, a_rcNormal) IEM_LIVENESS_PC64_INTRAPG_JMP_WITH_FLAGS()
|
---|
327 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC16(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC16_JMP_NO_FLAGS()
|
---|
328 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC32(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC32_JMP_NO_FLAGS()
|
---|
329 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC32_FLAT(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC32_FLAT_JMP_NO_FLAGS()
|
---|
330 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC64(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC64_JMP_NO_FLAGS()
|
---|
331 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC64_INTRAPG(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC64_INTRAPG_JMP_NO_FLAGS()
|
---|
332 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC16_JMP_WITH_FLAGS()
|
---|
333 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC32_JMP_WITH_FLAGS()
|
---|
334 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC32_FLAT_WITH_FLAGS(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC32_FLAT_JMP_WITH_FLAGS()
|
---|
335 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC64_JMP_WITH_FLAGS()
|
---|
336 | #define IEM_MC_REL_JMP_S16_AND_FINISH_THREADED_PC64_INTRAPG_WITH_FLAGS(a_i16, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC64_INTRAPG_JMP_WITH_FLAGS()
|
---|
337 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC16(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC16_JMP_NO_FLAGS()
|
---|
338 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC32(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC32_JMP_NO_FLAGS()
|
---|
339 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC32_FLAT(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC32_FLAT_JMP_NO_FLAGS()
|
---|
340 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC64(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC64_JMP_NO_FLAGS()
|
---|
341 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC64_INTRAPG(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC64_INTRAPG_JMP_NO_FLAGS()
|
---|
342 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC16_JMP_WITH_FLAGS()
|
---|
343 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC32_JMP_WITH_FLAGS()
|
---|
344 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC32_FLAT_WITH_FLAGS(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC32_FLAT_JMP_WITH_FLAGS()
|
---|
345 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC64_JMP_WITH_FLAGS()
|
---|
346 | #define IEM_MC_REL_JMP_S32_AND_FINISH_THREADED_PC64_INTRAPG_WITH_FLAGS(a_i32, a_cbInstr, a_rcNormal) IEM_LIVENESS_PC64_INTRAPG_JMP_WITH_FLAGS()
|
---|
347 | #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC16(a_u16NewIP) IEM_LIVENESS_PC16_JMP_NO_FLAGS()
|
---|
348 | #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC32(a_u16NewIP) IEM_LIVENESS_PC32_JMP_NO_FLAGS()
|
---|
349 | #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC64(a_u16NewIP) IEM_LIVENESS_PC64_JMP_NO_FLAGS()
|
---|
350 | #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_u16NewIP) IEM_LIVENESS_PC16_JMP_WITH_FLAGS()
|
---|
351 | #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_u16NewIP) IEM_LIVENESS_PC32_JMP_WITH_FLAGS()
|
---|
352 | #define IEM_MC_SET_RIP_U16_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u16NewIP) IEM_LIVENESS_PC64_JMP_WITH_FLAGS()
|
---|
353 | #define IEM_MC_SET_RIP_U32_AND_FINISH_THREADED_PC32(a_u32NewEIP) IEM_LIVENESS_PC32_JMP_NO_FLAGS()
|
---|
354 | #define IEM_MC_SET_RIP_U32_AND_FINISH_THREADED_PC64(a_u32NewEIP) IEM_LIVENESS_PC64_JMP_NO_FLAGS()
|
---|
355 | #define IEM_MC_SET_RIP_U32_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_u32NewEIP) IEM_LIVENESS_PC32_JMP_WITH_FLAGS()
|
---|
356 | #define IEM_MC_SET_RIP_U32_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u32NewEIP) IEM_LIVENESS_PC64_JMP_WITH_FLAGS()
|
---|
357 | #define IEM_MC_SET_RIP_U64_AND_FINISH_THREADED_PC64(a_u32NewEIP) IEM_LIVENESS_PC64_JMP_NO_FLAGS()
|
---|
358 | #define IEM_MC_SET_RIP_U64_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u32NewEIP) IEM_LIVENESS_PC64_JMP_WITH_FLAGS()
|
---|
359 |
|
---|
360 | #define IEM_MC_REL_CALL_S16_AND_FINISH_THREADED_PC16(a_i16, a_cbInstr) do { IEM_LIVENESS_PC16_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
361 | #define IEM_MC_REL_CALL_S16_AND_FINISH_THREADED_PC32(a_i16, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
362 | #define IEM_MC_REL_CALL_S16_AND_FINISH_THREADED_PC64(a_i16, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
363 | #define IEM_MC_REL_CALL_S16_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_i16, a_cbInstr) do { IEM_LIVENESS_PC16_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
364 | #define IEM_MC_REL_CALL_S16_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_i16, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
365 | #define IEM_MC_REL_CALL_S16_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_i16, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
366 | #define IEM_MC_REL_CALL_S32_AND_FINISH_THREADED_PC16(a_i32, a_cbInstr) do { IEM_LIVENESS_PC16_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
367 | #define IEM_MC_REL_CALL_S32_AND_FINISH_THREADED_PC32(a_i32, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
368 | #define IEM_MC_REL_CALL_S32_AND_FINISH_THREADED_PC64(a_i32, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
369 | #define IEM_MC_REL_CALL_S32_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_i32, a_cbInstr) do { IEM_LIVENESS_PC16_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
370 | #define IEM_MC_REL_CALL_S32_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_i32, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
371 | #define IEM_MC_REL_CALL_S32_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_i32, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
372 | #define IEM_MC_REL_CALL_S64_AND_FINISH_THREADED_PC32(a_i64, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
373 | #define IEM_MC_REL_CALL_S64_AND_FINISH_THREADED_PC64(a_i64, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
374 | #define IEM_MC_REL_CALL_S64_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_i64, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
375 | #define IEM_MC_REL_CALL_S64_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_i64, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
376 | #define IEM_MC_IND_CALL_U16_AND_FINISH_THREADED_PC16(a_u16NewIP, a_cbInstr) do { IEM_LIVENESS_PC16_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
377 | #define IEM_MC_IND_CALL_U16_AND_FINISH_THREADED_PC32(a_u16NewIP, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
378 | #define IEM_MC_IND_CALL_U16_AND_FINISH_THREADED_PC64(a_u16NewIP, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
379 | #define IEM_MC_IND_CALL_U16_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_u16NewIP, a_cbInstr) do { IEM_LIVENESS_PC16_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
380 | #define IEM_MC_IND_CALL_U16_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_u16NewIP, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
381 | #define IEM_MC_IND_CALL_U16_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u16NewIP, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
382 | #define IEM_MC_IND_CALL_U32_AND_FINISH_THREADED_PC32(a_u32NewEIP, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
383 | #define IEM_MC_IND_CALL_U32_AND_FINISH_THREADED_PC64(a_u32NewEIP, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
384 | #define IEM_MC_IND_CALL_U32_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_u32NewEIP, a_cbInstr) do { IEM_LIVENESS_PC32_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
385 | #define IEM_MC_IND_CALL_U32_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u32NewEIP, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
386 | #define IEM_MC_IND_CALL_U64_AND_FINISH_THREADED_PC64(a_u32NewRIP, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
387 | #define IEM_MC_IND_CALL_U64_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_u32NewRIP, a_cbInstr) do { IEM_LIVENESS_PC64_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
388 |
|
---|
389 | #define IEM_MC_RETN_AND_FINISH_THREADED_PC16(a_i16, a_cbInstr) do { IEM_LIVENESS_PC16_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
390 | #define IEM_MC_RETN_AND_FINISH_THREADED_PC32(a_i16, a_cbInstr, a_enmEffOpSize) do { IEM_LIVENESS_PC32_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
391 | #define IEM_MC_RETN_AND_FINISH_THREADED_PC64(a_i16, a_cbInstr, a_enmEffOpSize) do { IEM_LIVENESS_PC64_JMP_NO_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
392 | #define IEM_MC_RETN_AND_FINISH_THREADED_PC16_WITH_FLAGS(a_i16, a_cbInstr) do { IEM_LIVENESS_PC16_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
393 | #define IEM_MC_RETN_AND_FINISH_THREADED_PC32_WITH_FLAGS(a_i16, a_cbInstr, a_enmEffOpSize) do { IEM_LIVENESS_PC32_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
394 | #define IEM_MC_RETN_AND_FINISH_THREADED_PC64_WITH_FLAGS(a_i16, a_cbInstr, a_enmEffOpSize) do { IEM_LIVENESS_PC64_JMP_WITH_FLAGS(); IEM_LIVENESS_STACK(); } while (0)
|
---|
395 |
|
---|
396 | /* Effective address stuff is rather complicated... */
|
---|
397 | #define IEM_MC_CALC_RM_EFF_ADDR_THREADED_16(a_GCPtrEff, a_bRm, a_u16Disp) do { \
|
---|
398 | if (((a_bRm) & (X86_MODRM_MOD_MASK | X86_MODRM_RM_MASK)) != 6) \
|
---|
399 | { \
|
---|
400 | switch ((a_bRm) & X86_MODRM_RM_MASK) \
|
---|
401 | { \
|
---|
402 | case 0: IEM_LIVENESS_GPR_INPUT(X86_GREG_xBX); IEM_LIVENESS_GPR_INPUT(X86_GREG_xSI); break; \
|
---|
403 | case 1: IEM_LIVENESS_GPR_INPUT(X86_GREG_xBX); IEM_LIVENESS_GPR_INPUT(X86_GREG_xDI); break; \
|
---|
404 | case 2: IEM_LIVENESS_GPR_INPUT(X86_GREG_xBP); IEM_LIVENESS_GPR_INPUT(X86_GREG_xSI); break; \
|
---|
405 | case 3: IEM_LIVENESS_GPR_INPUT(X86_GREG_xBP); IEM_LIVENESS_GPR_INPUT(X86_GREG_xDI); break; \
|
---|
406 | case 4: IEM_LIVENESS_GPR_INPUT(X86_GREG_xSI); break; \
|
---|
407 | case 5: IEM_LIVENESS_GPR_INPUT(X86_GREG_xDI); break; \
|
---|
408 | case 6: IEM_LIVENESS_GPR_INPUT(X86_GREG_xBP); break; \
|
---|
409 | case 7: IEM_LIVENESS_GPR_INPUT(X86_GREG_xBX); break; \
|
---|
410 | } \
|
---|
411 | } \
|
---|
412 | } while (0)
|
---|
413 |
|
---|
414 | #define IEM_MC_CALC_RM_EFF_ADDR_THREADED_32(a_GCPtrEff, a_bRm, a_uSibAndRspOffset, a_u32Disp) do { \
|
---|
415 | if (((a_bRm) & (X86_MODRM_MOD_MASK | X86_MODRM_RM_MASK)) != 5) \
|
---|
416 | { \
|
---|
417 | uint8_t const idxReg = (a_bRm) & X86_MODRM_RM_MASK; \
|
---|
418 | if (idxReg != 4 /*SIB*/) \
|
---|
419 | IEM_LIVENESS_GPR_INPUT(idxReg); \
|
---|
420 | else \
|
---|
421 | { \
|
---|
422 | uint8_t const idxIndex = ((a_uSibAndRspOffset) >> X86_SIB_INDEX_SHIFT) & X86_SIB_INDEX_SMASK; \
|
---|
423 | if (idxIndex != 4 /*no index*/) \
|
---|
424 | IEM_LIVENESS_GPR_INPUT(idxIndex); \
|
---|
425 | \
|
---|
426 | uint8_t const idxBase = (a_uSibAndRspOffset) & X86_SIB_BASE_MASK; \
|
---|
427 | if (idxBase != 5 || ((a_bRm) & X86_MODRM_MOD_MASK) != 0) \
|
---|
428 | IEM_LIVENESS_GPR_INPUT(idxBase); \
|
---|
429 | } \
|
---|
430 | } \
|
---|
431 | } while (0)
|
---|
432 |
|
---|
433 | #define IEM_MC_CALC_RM_EFF_ADDR_THREADED_64(a_GCPtrEff, a_bRmEx, a_uSibAndRspOffset, a_u32Disp, a_cbImm) do { \
|
---|
434 | if (((a_bRmEx) & (X86_MODRM_MOD_MASK | X86_MODRM_RM_MASK)) == 5) \
|
---|
435 | { /* RIP */ } \
|
---|
436 | else \
|
---|
437 | { \
|
---|
438 | uint8_t const idxReg = (a_bRmEx) & (X86_MODRM_RM_MASK | 0x8); /* bRmEx[bit 3] = REX.B */ \
|
---|
439 | if ((idxReg & X86_MODRM_RM_MASK) != 4 /* not SIB */) \
|
---|
440 | IEM_LIVENESS_GPR_INPUT(idxReg); \
|
---|
441 | else /* SIB: */\
|
---|
442 | { \
|
---|
443 | uint8_t const idxIndex = (((a_uSibAndRspOffset) >> X86_SIB_INDEX_SHIFT) & X86_SIB_INDEX_SMASK) \
|
---|
444 | | (((a_bRmEx) & 0x10) >> 1); /* bRmEx[bit 4] = REX.X */ \
|
---|
445 | if (idxIndex != 4 /*no index*/) \
|
---|
446 | IEM_LIVENESS_GPR_INPUT(idxIndex); \
|
---|
447 | \
|
---|
448 | uint8_t const idxBase = ((a_uSibAndRspOffset) & X86_SIB_BASE_MASK) | ((a_bRmEx) & 0x8); /* bRmEx[bit 3] = REX.B */ \
|
---|
449 | if ((idxBase & 7) != 5 /* and !13*/ || ((a_bRmEx) & X86_MODRM_MOD_MASK) != 0) \
|
---|
450 | IEM_LIVENESS_GPR_INPUT(idxBase); \
|
---|
451 | } \
|
---|
452 | } \
|
---|
453 | } while (0)
|
---|
454 | #define IEM_MC_CALC_RM_EFF_ADDR_THREADED_64_FSGS(a_GCPtrEff, a_bRmEx, a_uSibAndRspOffset, a_u32Disp, a_cbImm) \
|
---|
455 | IEM_MC_CALC_RM_EFF_ADDR_THREADED_64(a_GCPtrEff, a_bRmEx, a_uSibAndRspOffset, a_u32Disp, a_cbImm)
|
---|
456 | #define IEM_MC_CALC_RM_EFF_ADDR_THREADED_64_ADDR32(a_GCPtrEff, a_bRmEx, a_uSibAndRspOffset, a_u32Disp, a_cbImm) \
|
---|
457 | IEM_MC_CALC_RM_EFF_ADDR_THREADED_64(a_GCPtrEff, a_bRmEx, a_uSibAndRspOffset, a_u32Disp, a_cbImm)
|
---|
458 |
|
---|
459 | /* At present we don't know what any CIMPL may require as input, however they
|
---|
460 | shouldn't ever throw an exception, so it should suffice to mark them as
|
---|
461 | unconditional calls. */
|
---|
462 | #define IEM_MC_CALL_CIMPL_1_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0) \
|
---|
463 | IEM_LIVENESS_MARK_CALL()
|
---|
464 | #define IEM_MC_CALL_CIMPL_2_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1) \
|
---|
465 | IEM_LIVENESS_MARK_CALL()
|
---|
466 | #define IEM_MC_CALL_CIMPL_3_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1, a2) \
|
---|
467 | IEM_LIVENESS_MARK_CALL()
|
---|
468 | #define IEM_MC_CALL_CIMPL_4_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1, a2, a3) \
|
---|
469 | IEM_LIVENESS_MARK_CALL()
|
---|
470 | #define IEM_MC_CALL_CIMPL_5_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1, a2, a3, a4) \
|
---|
471 | IEM_LIVENESS_MARK_CALL()
|
---|
472 |
|
---|
473 | #define IEM_MC_DEFER_TO_CIMPL_0_RET_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl) \
|
---|
474 | IEM_LIVENESS_RAW_INIT_WITH_CALL(pOutgoing, pIncoming)
|
---|
475 | #define IEM_MC_DEFER_TO_CIMPL_1_RET_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0) \
|
---|
476 | IEM_LIVENESS_RAW_INIT_WITH_CALL(pOutgoing, pIncoming)
|
---|
477 | #define IEM_MC_DEFER_TO_CIMPL_2_RET_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1) \
|
---|
478 | IEM_LIVENESS_RAW_INIT_WITH_CALL(pOutgoing, pIncoming)
|
---|
479 | #define IEM_MC_DEFER_TO_CIMPL_3_RET_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1, a2) \
|
---|
480 | IEM_LIVENESS_RAW_INIT_WITH_CALL(pOutgoing, pIncoming)
|
---|
481 | #define IEM_MC_DEFER_TO_CIMPL_4_RET_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1, a2, a3) \
|
---|
482 | IEM_LIVENESS_RAW_INIT_WITH_CALL(pOutgoing, pIncoming)
|
---|
483 | #define IEM_MC_DEFER_TO_CIMPL_5_RET_THREADED(a_cbInstr, a_fFlags, a_fGstShwFlush, a_pfnCImpl, a0, a1, a2, a3, a4) \
|
---|
484 | IEM_LIVENESS_RAW_INIT_WITH_CALL(pOutgoing, pIncoming)
|
---|
485 |
|
---|
486 | /* Any 8-bit register fetch, store or modification only works on part of the register
|
---|
487 | and must therefore be considered INPUTs. */
|
---|
488 | #define IEM_MC_FETCH_GREG_U8_THREADED(a_u8Dst, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
489 | #define IEM_MC_FETCH_GREG_U8_ZX_U16_THREADED(a_u16Dst, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
490 | #define IEM_MC_FETCH_GREG_U8_ZX_U32_THREADED(a_u32Dst, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
491 | #define IEM_MC_FETCH_GREG_U8_ZX_U64_THREADED(a_u64Dst, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
492 | #define IEM_MC_FETCH_GREG_U8_SX_U16_THREADED(a_u16Dst, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
493 | #define IEM_MC_FETCH_GREG_U8_SX_U32_THREADED(a_u32Dst, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
494 | #define IEM_MC_FETCH_GREG_U8_SX_U64_THREADED(a_u64Dst, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
495 | #define IEM_MC_STORE_GREG_U8_THREADED(a_iGRegEx, a_u8Value) IEM_LIVENESS_GPR_MODIFY(a_iGRegEx & 15)
|
---|
496 | #define IEM_MC_STORE_GREG_U8_CONST_THREADED(a_iGRegEx, a_u8Value) IEM_LIVENESS_GPR_MODIFY(a_iGRegEx & 15)
|
---|
497 | #define IEM_MC_REF_GREG_U8_THREADED(a_pu8Dst, a_iGRegEx) IEM_LIVENESS_GPR_MODIFY(a_iGRegEx & 15)
|
---|
498 | #define IEM_MC_REF_GREG_U8_CONST_THREADED(a_pu8Dst, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
499 | #define IEM_MC_ADD_GREG_U8_TO_LOCAL_THREADED(a_u8Value, a_iGRegEx) IEM_LIVENESS_GPR_INPUT(a_iGRegEx & 15)
|
---|
500 | #define IEM_MC_AND_GREG_U8_THREADED(a_iGRegEx, a_u8Value) IEM_LIVENESS_GPR_MODIFY(a_iGRegEx & 15)
|
---|
501 | #define IEM_MC_OR_GREG_U8_THREADED(a_iGRegEx, a_u8Value) IEM_LIVENESS_GPR_MODIFY(a_iGRegEx & 15)
|
---|
502 |
|
---|
503 |
|
---|
504 | /*
|
---|
505 | * The other MCs.
|
---|
506 | */
|
---|
507 |
|
---|
508 | #define IEM_MC_NO_NATIVE_RECOMPILE() NOP()
|
---|
509 |
|
---|
510 | #define IEM_MC_RAISE_DIVIDE_ERROR_IF_LOCAL_IS_ZERO(a_uVar) IEM_LIVENESS_MARK_POTENTIAL_CALL()
|
---|
511 | #define IEM_MC_MAYBE_RAISE_DEVICE_NOT_AVAILABLE() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR0_INPUT()
|
---|
512 | #define IEM_MC_MAYBE_RAISE_WAIT_DEVICE_NOT_AVAILABLE() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR0_INPUT()
|
---|
513 | #define IEM_MC_MAYBE_RAISE_FPU_XCPT() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_FSW_INPUT()
|
---|
514 | #define IEM_MC_MAYBE_RAISE_AVX_RELATED_XCPT() \
|
---|
515 | IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR0_INPUT(); IEM_LIVENESS_CR4_INPUT(); IEM_LIVENESS_XCR0_INPUT()
|
---|
516 | #define IEM_MC_MAYBE_RAISE_SSE_RELATED_XCPT() \
|
---|
517 | IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR0_INPUT(); IEM_LIVENESS_CR4_INPUT()
|
---|
518 | #define IEM_MC_MAYBE_RAISE_MMX_RELATED_XCPT() \
|
---|
519 | IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR0_INPUT(); IEM_LIVENESS_FSW_INPUT()
|
---|
520 | #define IEM_MC_RAISE_GP0_IF_CPL_NOT_ZERO() IEM_LIVENESS_MARK_POTENTIAL_CALL() /**< @todo not conditional */
|
---|
521 | #define IEM_MC_RAISE_GP0_IF_EFF_ADDR_UNALIGNED(a_EffAddr, a_cbAlign) IEM_LIVENESS_MARK_POTENTIAL_CALL()
|
---|
522 | #define IEM_MC_MAYBE_RAISE_FSGSBASE_XCPT() IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR4_INPUT()
|
---|
523 | #define IEM_MC_MAYBE_RAISE_NON_CANONICAL_ADDR_GP0(a_u64Addr) IEM_LIVENESS_MARK_POTENTIAL_CALL()
|
---|
524 |
|
---|
525 | #define IEM_MC_LOCAL(a_Type, a_Name) NOP()
|
---|
526 | #define IEM_MC_LOCAL_ASSIGN(a_Type, a_Name, a_Value) NOP()
|
---|
527 | #define IEM_MC_LOCAL_CONST(a_Type, a_Name, a_Value) NOP()
|
---|
528 | #define IEM_MC_NOREF(a_Name) NOP()
|
---|
529 | #define IEM_MC_ARG(a_Type, a_Name, a_iArg) NOP()
|
---|
530 | #define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) NOP()
|
---|
531 | #define IEM_MC_ARG_LOCAL_REF(a_Type, a_Name, a_Local, a_iArg) NOP()
|
---|
532 |
|
---|
533 | #undef IEM_MC_COMMIT_EFLAGS /* unused here */
|
---|
534 | #define IEM_MC_COMMIT_EFLAGS_EX(a_EFlags, a_fEflInput, a_fEflOutput) do { \
|
---|
535 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_CF, fEflCf); \
|
---|
536 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_PF, fEflPf); \
|
---|
537 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_AF, fEflAf); \
|
---|
538 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_ZF, fEflZf); \
|
---|
539 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_SF, fEflSf); \
|
---|
540 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_OF, fEflOf); \
|
---|
541 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, ~X86_EFL_STATUS_BITS, fEflOther); \
|
---|
542 | Assert(!( ((a_fEflInput) | (a_fEflOutput)) \
|
---|
543 | & ~(uint32_t)(X86_EFL_STATUS_BITS | X86_EFL_DF | X86_EFL_VM | X86_EFL_VIF | X86_EFL_IOPL))); \
|
---|
544 | } while (0)
|
---|
545 | #undef IEM_MC_COMMIT_EFLAGS_OPT /* unused here */
|
---|
546 | #define IEM_MC_COMMIT_EFLAGS_OPT_EX(a_EFlags, a_fEflInput, a_fEflOutput) \
|
---|
547 | IEM_MC_COMMIT_EFLAGS_EX(a_EFlags, a_fEflInput, a_fEflOutput)
|
---|
548 |
|
---|
549 | #define IEM_MC_ASSIGN_TO_SMALLER(a_VarDst, a_VarSrcEol) NOP()
|
---|
550 |
|
---|
551 | #define IEM_MC_FETCH_GREG_I16(a_i16Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
552 | #define IEM_MC_FETCH_GREG_U16(a_u16Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
553 | #define IEM_MC_FETCH_GREG_U16_ZX_U32(a_u32Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
554 | #define IEM_MC_FETCH_GREG_U16_ZX_U64(a_u64Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
555 | #define IEM_MC_FETCH_GREG_U16_SX_U32(a_u32Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
556 | #define IEM_MC_FETCH_GREG_U16_SX_U64(a_u64Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
557 | #define IEM_MC_FETCH_GREG_I32(a_i32Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
558 | #define IEM_MC_FETCH_GREG_U32(a_u32Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
559 | #define IEM_MC_FETCH_GREG_U32_ZX_U64(a_u64Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
560 | #define IEM_MC_FETCH_GREG_U32_SX_U64(a_u64Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
561 | #define IEM_MC_FETCH_GREG_U64(a_u64Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
562 | #define IEM_MC_FETCH_GREG_U64_ZX_U64 IEM_MC_FETCH_GREG_U64
|
---|
563 | #define IEM_MC_FETCH_GREG_PAIR_U32(a_u64Dst, a_iGRegLo, a_iGRegHi) \
|
---|
564 | do { IEM_LIVENESS_GPR_INPUT(a_iGRegLo); IEM_LIVENESS_GPR_INPUT(a_iGRegHi); } while(0)
|
---|
565 | #define IEM_MC_FETCH_GREG_PAIR_U64(a_u128Dst, a_iGRegLo, a_iGRegHi) \
|
---|
566 | do { IEM_LIVENESS_GPR_INPUT(a_iGRegLo); IEM_LIVENESS_GPR_INPUT(a_iGRegHi); } while(0)
|
---|
567 | #define IEM_MC_FETCH_SREG_U16(a_u16Dst, a_iSReg) IEM_LIVENESS_SEG_SEL_INPUT(a_iSReg)
|
---|
568 | #define IEM_MC_FETCH_SREG_ZX_U32(a_u32Dst, a_iSReg) IEM_LIVENESS_SEG_SEL_INPUT(a_iSReg)
|
---|
569 | #define IEM_MC_FETCH_SREG_ZX_U64(a_u64Dst, a_iSReg) IEM_LIVENESS_SEG_SEL_INPUT(a_iSReg)
|
---|
570 | #define IEM_MC_FETCH_SREG_BASE_U64(a_u64Dst, a_iSReg) IEM_LIVENESS_SEG_BASE_INPUT(a_iSReg)
|
---|
571 | #define IEM_MC_FETCH_SREG_BASE_U32(a_u32Dst, a_iSReg) IEM_LIVENESS_SEG_BASE_INPUT(a_iSReg)
|
---|
572 | #undef IEM_MC_FETCH_EFLAGS /* unused here */
|
---|
573 | #define IEM_MC_FETCH_EFLAGS_EX(a_EFlags, a_fEflInput, a_fEflOutput) do { \
|
---|
574 | /* IEM_MC_COMMIT_EFLAGS_EX doesn't cover input-only situations. This OTOH, leads \
|
---|
575 | to duplication in many cases, but the compiler's optimizers should help with that. */ \
|
---|
576 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_CF, fEflCf); \
|
---|
577 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_PF, fEflPf); \
|
---|
578 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_AF, fEflAf); \
|
---|
579 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_ZF, fEflZf); \
|
---|
580 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_SF, fEflSf); \
|
---|
581 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_OF, fEflOf); \
|
---|
582 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, ~X86_EFL_STATUS_BITS, fEflOther); \
|
---|
583 | Assert(!( ((a_fEflInput) | (a_fEflOutput)) \
|
---|
584 | & ~(uint32_t)(X86_EFL_STATUS_BITS | X86_EFL_DF | X86_EFL_VM | X86_EFL_VIF | X86_EFL_IOPL))); \
|
---|
585 | } while (0)
|
---|
586 | #define IEM_MC_FETCH_EFLAGS_U8(a_EFlags) do { \
|
---|
587 | IEM_LIVENESS_ONE_EFLAGS_INPUT(u2Cf); \
|
---|
588 | IEM_LIVENESS_ONE_EFLAGS_INPUT(u2Pf); \
|
---|
589 | IEM_LIVENESS_ONE_EFLAGS_INPUT(u2Af); \
|
---|
590 | IEM_LIVENESS_ONE_EFLAGS_INPUT(u2Zf); \
|
---|
591 | IEM_LIVENESS_ONE_EFLAGS_INPUT(u2Sf); \
|
---|
592 | } while (0)
|
---|
593 |
|
---|
594 | #define IEM_MC_FETCH_FSW(a_u16Fsw) IEM_LIVENESS_FSW_INPUT()
|
---|
595 | #define IEM_MC_FETCH_FCW(a_u16Fcw) IEM_LIVENESS_FCW_INPUT()
|
---|
596 |
|
---|
597 | #define IEM_MC_STORE_GREG_U16(a_iGReg, a_u16Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
598 | #define IEM_MC_STORE_GREG_U32(a_iGReg, a_u32Value) IEM_LIVENESS_GPR_CLOBBER(a_iGReg)
|
---|
599 | #define IEM_MC_STORE_GREG_I32(a_iGReg, a_i32Value) IEM_LIVENESS_GPR_CLOBBER(a_iGReg)
|
---|
600 | #define IEM_MC_STORE_GREG_U64(a_iGReg, a_u64Value) IEM_LIVENESS_GPR_CLOBBER(a_iGReg)
|
---|
601 | #define IEM_MC_STORE_GREG_I64(a_iGReg, a_i64Value) IEM_LIVENESS_GPR_CLOBBER(a_iGReg)
|
---|
602 | #define IEM_MC_STORE_GREG_U16_CONST(a_iGReg, a_u16Const) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
603 | #define IEM_MC_STORE_GREG_U32_CONST(a_iGReg, a_u32Const) IEM_LIVENESS_GPR_CLOBBER(a_iGReg)
|
---|
604 | #define IEM_MC_STORE_GREG_U64_CONST(a_iGReg, a_u32Const) IEM_LIVENESS_GPR_CLOBBER(a_iGReg)
|
---|
605 | #define IEM_MC_STORE_GREG_PAIR_U32(a_iGRegLo, a_iGRegHi, a_u64Value) \
|
---|
606 | do { IEM_LIVENESS_GPR_CLOBBER(a_iGRegLo); IEM_LIVENESS_GPR_CLOBBER(a_iGRegHi); } while(0)
|
---|
607 | #define IEM_MC_STORE_GREG_PAIR_U64(a_iGRegLo, a_iGRegHi, a_u128Value) \
|
---|
608 | do { IEM_LIVENESS_GPR_CLOBBER(a_iGRegLo); IEM_LIVENESS_GPR_CLOBBER(a_iGRegHi); } while(0)
|
---|
609 | #define IEM_MC_CLEAR_HIGH_GREG_U64(a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg) /** @todo This isn't always the case... */
|
---|
610 |
|
---|
611 | #define IEM_MC_STORE_SREG_BASE_U64(a_iSReg, a_u64Value) IEM_LIVENESS_SEG_BASE_CLOBBER(a_iSReg)
|
---|
612 | #define IEM_MC_STORE_SREG_BASE_U32(a_iSReg, a_u32Value) IEM_LIVENESS_SEG_BASE_CLOBBER(a_iSReg)
|
---|
613 | #define IEM_MC_STORE_FPUREG_R80_SRC_REF(a_iSt, a_pr80Src) NOP()
|
---|
614 |
|
---|
615 |
|
---|
616 | #define IEM_MC_REF_GREG_U16(a_pu16Dst, a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
617 | #define IEM_MC_REF_GREG_U16_CONST(a_pu16Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT( a_iGReg)
|
---|
618 | #define IEM_MC_REF_GREG_U32(a_pu32Dst, a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
619 | #define IEM_MC_REF_GREG_U32_CONST(a_pu32Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT( a_iGReg)
|
---|
620 | #define IEM_MC_REF_GREG_I32(a_pi32Dst, a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
621 | #define IEM_MC_REF_GREG_I32_CONST(a_pi32Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT( a_iGReg)
|
---|
622 | #define IEM_MC_REF_GREG_U64(a_pu64Dst, a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
623 | #define IEM_MC_REF_GREG_U64_CONST(a_pu64Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT( a_iGReg)
|
---|
624 | #define IEM_MC_REF_GREG_I64(a_pi64Dst, a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
625 | #define IEM_MC_REF_GREG_I64_CONST(a_pi64Dst, a_iGReg) IEM_LIVENESS_GPR_INPUT( a_iGReg)
|
---|
626 | #define IEM_MC_REF_EFLAGS(a_pEFlags) IEM_LIVENESS_ALL_EFLAGS_MODIFY()
|
---|
627 | #undef IEM_MC_REF_EFLAGS /* unused */
|
---|
628 | #define IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, a_fEfl, a_Member) \
|
---|
629 | if ((a_fEflInput) & (a_fEfl)) { \
|
---|
630 | if ((a_fEflOutput) & (a_fEfl)) IEM_LIVENESS_ONE_EFLAG_MODIFY(a_Member); \
|
---|
631 | else IEM_LIVENESS_ONE_EFLAG_INPUT(a_Member); \
|
---|
632 | } else if ((a_fEflOutput) & (a_fEfl)) IEM_LIVENESS_ONE_EFLAG_CLOBBER(a_Member)
|
---|
633 | #define IEM_MC_REF_EFLAGS_EX(a_pEFlags, a_fEflInput, a_fEflOutput) do { \
|
---|
634 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_CF, fEflCf); \
|
---|
635 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_PF, fEflPf); \
|
---|
636 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_AF, fEflAf); \
|
---|
637 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_ZF, fEflZf); \
|
---|
638 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_SF, fEflSf); \
|
---|
639 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, X86_EFL_OF, fEflOf); \
|
---|
640 | IEMLIVENESS_EFL_HLP(a_fEflInput, a_fEflOutput, ~X86_EFL_STATUS_BITS, fEflOther); \
|
---|
641 | Assert(!( ((a_fEflInput) | (a_fEflOutput)) \
|
---|
642 | & ~(uint32_t)(X86_EFL_STATUS_BITS | X86_EFL_DF | X86_EFL_VM | X86_EFL_VIF | X86_EFL_IOPL))); \
|
---|
643 | } while (0)
|
---|
644 | #define IEM_MC_ASSERT_EFLAGS(a_fEflInput, a_fEflOutput) NOP()
|
---|
645 |
|
---|
646 |
|
---|
647 | #define IEM_MC_ADD_GREG_U16(a_iGReg, a_u16Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
648 | #define IEM_MC_ADD_GREG_U32(a_iGReg, a_u32Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
649 | #define IEM_MC_ADD_GREG_U64(a_iGReg, a_u64Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
650 |
|
---|
651 | #define IEM_MC_SUB_GREG_U16(a_iGReg, a_u8Const) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
652 | #define IEM_MC_SUB_GREG_U32(a_iGReg, a_u8Const) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
653 | #define IEM_MC_SUB_GREG_U64(a_iGReg, a_u8Const) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
654 | #define IEM_MC_SUB_LOCAL_U16(a_u16Value, a_u16Const) NOP()
|
---|
655 |
|
---|
656 | #define IEM_MC_ADD_GREG_U16_TO_LOCAL(a_u16Value, a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
657 | #define IEM_MC_ADD_GREG_U32_TO_LOCAL(a_u32Value, a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
658 | #define IEM_MC_ADD_GREG_U64_TO_LOCAL(a_u64Value, a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
659 | #define IEM_MC_ADD_LOCAL_S16_TO_EFF_ADDR(a_EffAddr, a_i16) NOP()
|
---|
660 | #define IEM_MC_ADD_LOCAL_S32_TO_EFF_ADDR(a_EffAddr, a_i32) NOP()
|
---|
661 | #define IEM_MC_ADD_LOCAL_S64_TO_EFF_ADDR(a_EffAddr, a_i64) NOP()
|
---|
662 |
|
---|
663 | #define IEM_MC_AND_LOCAL_U8(a_u8Local, a_u8Mask) NOP()
|
---|
664 | #define IEM_MC_AND_LOCAL_U16(a_u16Local, a_u16Mask) NOP()
|
---|
665 | #define IEM_MC_AND_LOCAL_U32(a_u32Local, a_u32Mask) NOP()
|
---|
666 | #define IEM_MC_AND_LOCAL_U64(a_u64Local, a_u64Mask) NOP()
|
---|
667 |
|
---|
668 | #define IEM_MC_AND_ARG_U16(a_u16Arg, a_u16Mask) NOP()
|
---|
669 | #define IEM_MC_AND_ARG_U32(a_u32Arg, a_u32Mask) NOP()
|
---|
670 | #define IEM_MC_AND_ARG_U64(a_u64Arg, a_u64Mask) NOP()
|
---|
671 |
|
---|
672 | #define IEM_MC_OR_LOCAL_U8(a_u8Local, a_u8Mask) NOP()
|
---|
673 | #define IEM_MC_OR_LOCAL_U16(a_u16Local, a_u16Mask) NOP()
|
---|
674 | #define IEM_MC_OR_LOCAL_U32(a_u32Local, a_u32Mask) NOP()
|
---|
675 |
|
---|
676 | #define IEM_MC_SAR_LOCAL_S16(a_i16Local, a_cShift) NOP()
|
---|
677 | #define IEM_MC_SAR_LOCAL_S32(a_i32Local, a_cShift) NOP()
|
---|
678 | #define IEM_MC_SAR_LOCAL_S64(a_i64Local, a_cShift) NOP()
|
---|
679 |
|
---|
680 | #define IEM_MC_SHR_LOCAL_U8(a_u8Local, a_cShift) NOP()
|
---|
681 |
|
---|
682 | #define IEM_MC_SHL_LOCAL_S16(a_i16Local, a_cShift) NOP()
|
---|
683 | #define IEM_MC_SHL_LOCAL_S32(a_i32Local, a_cShift) NOP()
|
---|
684 | #define IEM_MC_SHL_LOCAL_S64(a_i64Local, a_cShift) NOP()
|
---|
685 |
|
---|
686 | #define IEM_MC_AND_2LOCS_U32(a_u32Local, a_u32Mask) NOP()
|
---|
687 |
|
---|
688 | #define IEM_MC_OR_2LOCS_U32(a_u32Local, a_u32Mask) NOP()
|
---|
689 |
|
---|
690 | #define IEM_MC_AND_GREG_U16(a_iGReg, a_u16Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
691 | #define IEM_MC_AND_GREG_U32(a_iGReg, a_u32Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
692 | #define IEM_MC_AND_GREG_U64(a_iGReg, a_u64Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
693 |
|
---|
694 | #define IEM_MC_OR_GREG_U16(a_iGReg, a_u16Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
695 | #define IEM_MC_OR_GREG_U32(a_iGReg, a_u32Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
696 | #define IEM_MC_OR_GREG_U64(a_iGReg, a_u64Value) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
697 |
|
---|
698 | #define IEM_MC_BSWAP_LOCAL_U16(a_u16Local) NOP()
|
---|
699 | #define IEM_MC_BSWAP_LOCAL_U32(a_u32Local) NOP()
|
---|
700 | #define IEM_MC_BSWAP_LOCAL_U64(a_u64Local) NOP()
|
---|
701 |
|
---|
702 | #define IEM_MC_SET_EFL_BIT(a_fBit) do { \
|
---|
703 | if ((a_fBit) == X86_EFL_CF) IEM_LIVENESS_ONE_EFLAG_CLOBBER(fEflCf); \
|
---|
704 | else if ((a_fBit) == X86_EFL_DF) IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflOther); \
|
---|
705 | else { AssertFailed(); IEM_LIVENESS_ALL_EFLAGS_MODIFY(); } \
|
---|
706 | } while (0)
|
---|
707 | #define IEM_MC_CLEAR_EFL_BIT(a_fBit) do { \
|
---|
708 | if ((a_fBit) == X86_EFL_CF) IEM_LIVENESS_ONE_EFLAG_CLOBBER(fEflCf); \
|
---|
709 | else if ((a_fBit) == X86_EFL_DF) IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflOther); \
|
---|
710 | else { AssertFailed(); IEM_LIVENESS_ALL_EFLAGS_MODIFY(); } \
|
---|
711 | } while (0)
|
---|
712 | #define IEM_MC_FLIP_EFL_BIT(a_fBit) do { \
|
---|
713 | if ((a_fBit) == X86_EFL_CF) IEM_LIVENESS_ONE_EFLAG_MODIFY(fEflCf); \
|
---|
714 | else { AssertFailed(); IEM_LIVENESS_ALL_EFLAGS_MODIFY(); } \
|
---|
715 | } while (0)
|
---|
716 |
|
---|
717 | #define IEM_MC_CLEAR_FSW_EX() IEM_LIVENESS_FCW_MODIFY()
|
---|
718 | #define IEM_MC_FPU_TO_MMX_MODE() IEM_LIVENESS_FCW_MODIFY()
|
---|
719 | #define IEM_MC_FPU_FROM_MMX_MODE() IEM_LIVENESS_FCW_MODIFY()
|
---|
720 |
|
---|
721 | #define IEM_MC_FETCH_MREG_U64(a_u64Value, a_iMReg) NOP()
|
---|
722 | #define IEM_MC_FETCH_MREG_U32(a_u32Value, a_iMReg, a_iDWord) NOP()
|
---|
723 | #define IEM_MC_FETCH_MREG_U16(a_u16Value, a_iMReg, a_iWord) NOP()
|
---|
724 | #define IEM_MC_FETCH_MREG_U8(a_u8Value, a_iMReg, a_iByte) NOP()
|
---|
725 | #define IEM_MC_STORE_MREG_U64(a_iMReg, a_u64Value) NOP()
|
---|
726 | #define IEM_MC_STORE_MREG_U32(a_iMReg, a_iDword, a_u32Value) NOP()
|
---|
727 | #define IEM_MC_STORE_MREG_U16(a_iMReg, a_iWord, a_u16Value) NOP()
|
---|
728 | #define IEM_MC_STORE_MREG_U8(a_iMReg, a_iByte, a_u8Value) NOP()
|
---|
729 | #define IEM_MC_STORE_MREG_U32_ZX_U64(a_iMReg, a_u32Value) NOP()
|
---|
730 | #define IEM_MC_REF_MREG_U64(a_pu64Dst, a_iMReg) NOP()
|
---|
731 | #define IEM_MC_REF_MREG_U64_CONST(a_pu64Dst, a_iMReg) NOP()
|
---|
732 | #define IEM_MC_REF_MREG_U32_CONST(a_pu32Dst, a_iMReg) NOP()
|
---|
733 | #define IEM_MC_MODIFIED_MREG(a_iMReg) NOP()
|
---|
734 | #define IEM_MC_MODIFIED_MREG_BY_REF(a_pu64Dst) NOP()
|
---|
735 |
|
---|
736 | #define IEM_MC_CLEAR_XREG_U32_MASK(a_iXReg, a_bMask) NOP()
|
---|
737 | #define IEM_MC_FETCH_XREG_U128(a_u128Value, a_iXReg) NOP()
|
---|
738 | #define IEM_MC_FETCH_XREG_XMM(a_XmmValue, a_iXReg) NOP()
|
---|
739 | #define IEM_MC_FETCH_XREG_U64(a_u64Value, a_iXReg, a_iQWord) NOP()
|
---|
740 | #define IEM_MC_FETCH_XREG_R64(a_r64Value, a_iXReg, a_iQWord) NOP()
|
---|
741 | #define IEM_MC_FETCH_XREG_U32(a_u32Value, a_iXReg, a_iDWord) NOP()
|
---|
742 | #define IEM_MC_FETCH_XREG_R32(a_r32Value, a_iXReg, a_iDWord) NOP()
|
---|
743 | #define IEM_MC_FETCH_XREG_U16(a_u16Value, a_iXReg, a_iWord) NOP()
|
---|
744 | #define IEM_MC_FETCH_XREG_U8( a_u8Value, a_iXReg, a_iByte) NOP()
|
---|
745 | #define IEM_MC_FETCH_XREG_PAIR_U128(a_Dst, a_iXReg1, a_iXReg2) NOP()
|
---|
746 | #define IEM_MC_FETCH_XREG_PAIR_XMM(a_Dst, a_iXReg1, a_iXReg2) NOP()
|
---|
747 | #define IEM_MC_FETCH_XREG_PAIR_U128_AND_RAX_RDX_U64(a_Dst, a_iXReg1, a_iXReg2) \
|
---|
748 | do { IEM_LIVENESS_GPR_INPUT(X86_GREG_xAX); IEM_LIVENESS_GPR_INPUT(X86_GREG_xDX); } while (0)
|
---|
749 | #define IEM_MC_FETCH_XREG_PAIR_U128_AND_EAX_EDX_U32_SX_U64(a_Dst, a_iXReg1, a_iXReg2) \
|
---|
750 | do { IEM_LIVENESS_GPR_INPUT(X86_GREG_xAX); IEM_LIVENESS_GPR_INPUT(X86_GREG_xDX); } while (0)
|
---|
751 | #define IEM_MC_STORE_XREG_U128(a_iXReg, a_u128Value) NOP()
|
---|
752 | #define IEM_MC_STORE_XREG_XMM(a_iXReg, a_XmmValue) NOP()
|
---|
753 | #define IEM_MC_STORE_XREG_XMM_U32(a_iXReg, a_iDword, a_XmmValue) NOP()
|
---|
754 | #define IEM_MC_STORE_XREG_XMM_U64(a_iXReg, a_iQword, a_XmmValue) NOP()
|
---|
755 | #define IEM_MC_STORE_XREG_U64(a_iXReg, a_iQword, a_u64Value) NOP()
|
---|
756 | #define IEM_MC_STORE_XREG_U32(a_iXReg, a_iDword, a_u32Value) NOP()
|
---|
757 | #define IEM_MC_STORE_XREG_U16(a_iXReg, a_iWord, a_u16Value) NOP()
|
---|
758 | #define IEM_MC_STORE_XREG_U8(a_iXReg, a_iByte, a_u8Value) NOP()
|
---|
759 | #define IEM_MC_STORE_XREG_U64_ZX_U128(a_iXReg, a_u64Value) NOP()
|
---|
760 | #define IEM_MC_STORE_XREG_U32_U128(a_iXReg, a_iDwDst, a_u128Value, a_iDwSrc) NOP()
|
---|
761 | #define IEM_MC_STORE_XREG_R32(a_iXReg, a_r32Value) NOP()
|
---|
762 | #define IEM_MC_STORE_XREG_R64(a_iXReg, a_r64Value) NOP()
|
---|
763 | #define IEM_MC_STORE_XREG_U32_ZX_U128(a_iXReg, a_u32Value) NOP()
|
---|
764 |
|
---|
765 | #define IEM_MC_BROADCAST_XREG_U8_ZX_VLMAX(a_iXRegDst, a_u8Src) NOP()
|
---|
766 | #define IEM_MC_BROADCAST_XREG_U16_ZX_VLMAX(a_iXRegDst, a_u16Src) NOP()
|
---|
767 | #define IEM_MC_BROADCAST_XREG_U32_ZX_VLMAX(a_iXRegDst, a_u32Src) NOP()
|
---|
768 | #define IEM_MC_BROADCAST_XREG_U64_ZX_VLMAX(a_iXRegDst, a_u64Src) NOP()
|
---|
769 |
|
---|
770 | #define IEM_MC_REF_XREG_U128(a_pu128Dst, a_iXReg) NOP()
|
---|
771 | #define IEM_MC_REF_XREG_XMM(a_puXmmDst, a_iXReg) NOP()
|
---|
772 | #define IEM_MC_REF_XREG_U128_CONST(a_pu128Dst, a_iXReg) NOP()
|
---|
773 | #define IEM_MC_REF_XREG_XMM_CONST(a_pXmmDst, a_iXReg) NOP()
|
---|
774 | #define IEM_MC_REF_XREG_U32_CONST(a_pu32Dst, a_iXReg) NOP()
|
---|
775 | #define IEM_MC_REF_XREG_U64_CONST(a_pu64Dst, a_iXReg) NOP()
|
---|
776 | #define IEM_MC_REF_XREG_R32_CONST(a_pr32Dst, a_iXReg) NOP()
|
---|
777 | #define IEM_MC_REF_XREG_R64_CONST(a_pr64Dst, a_iXReg) NOP()
|
---|
778 | #define IEM_MC_COPY_XREG_U128(a_iXRegDst, a_iXRegSrc) NOP()
|
---|
779 |
|
---|
780 | #define IEM_MC_FETCH_YREG_U32(a_u32Dst, a_iYRegSrc) NOP()
|
---|
781 | #define IEM_MC_FETCH_YREG_U64(a_u64Dst, a_iYRegSrc, a_iQWord) NOP()
|
---|
782 | #define IEM_MC_FETCH_YREG_U128(a_u128Dst, a_iYRegSrc, a_iDQWord) NOP()
|
---|
783 | #define IEM_MC_FETCH_YREG_U256(a_u256Dst, a_iYRegSrc) NOP()
|
---|
784 | #define IEM_MC_FETCH_YREG_YMM(a_uYmmDst, a_iYRegSrc) NOP()
|
---|
785 |
|
---|
786 | #define IEM_MC_STORE_YREG_U128(a_iYRegDst, a_iDQword, a_u128Value) NOP()
|
---|
787 |
|
---|
788 | #define IEM_MC_INT_CLEAR_ZMM_256_UP(a_iXRegDst) NOP()
|
---|
789 | #define IEM_MC_STORE_YREG_U32_ZX_VLMAX(a_iYRegDst, a_u32Src) NOP()
|
---|
790 | #define IEM_MC_STORE_YREG_U64_ZX_VLMAX(a_iYRegDst, a_u64Src) NOP()
|
---|
791 | #define IEM_MC_STORE_YREG_U128_ZX_VLMAX(a_iYRegDst, a_u128Src) NOP()
|
---|
792 | #define IEM_MC_STORE_YREG_U256_ZX_VLMAX(a_iYRegDst, a_u256Src) NOP()
|
---|
793 | #define IEM_MC_STORE_YREG_YMM_ZX_VLMAX(a_iYRegDst, a_uYmmSrc) NOP()
|
---|
794 |
|
---|
795 | #define IEM_MC_STORE_YREG_U32_U256(a_iYRegDst, a_iDwDst, a_u256Value, a_iDwSrc) NOP()
|
---|
796 | #define IEM_MC_STORE_YREG_U64_U256(a_iYRegDst, a_iQwDst, a_u256Value, a_iQwSrc) NOP()
|
---|
797 | #define IEM_MC_STORE_YREG_U64(a_iYRegDst, a_iQword, a_u64Value) NOP()
|
---|
798 |
|
---|
799 | #define IEM_MC_BROADCAST_YREG_U8_ZX_VLMAX(a_iYRegDst, a_u8Src) NOP()
|
---|
800 | #define IEM_MC_BROADCAST_YREG_U16_ZX_VLMAX(a_iYRegDst, a_u16Src) NOP()
|
---|
801 | #define IEM_MC_BROADCAST_YREG_U32_ZX_VLMAX(a_iYRegDst, a_u32Src) NOP()
|
---|
802 | #define IEM_MC_BROADCAST_YREG_U64_ZX_VLMAX(a_iYRegDst, a_u64Src) NOP()
|
---|
803 | #define IEM_MC_BROADCAST_YREG_U128_ZX_VLMAX(a_iYRegDst, a_u128Src) NOP()
|
---|
804 |
|
---|
805 | #define IEM_MC_REF_YREG_U128(a_pu128Dst, a_iYReg) NOP()
|
---|
806 | #define IEM_MC_REF_YREG_U128_CONST(a_pu128Dst, a_iYReg) NOP()
|
---|
807 | #define IEM_MC_REF_YREG_U64_CONST(a_pu64Dst, a_iYReg) NOP()
|
---|
808 | #define IEM_MC_CLEAR_YREG_128_UP(a_iYReg) NOP()
|
---|
809 |
|
---|
810 | #define IEM_MC_COPY_YREG_U256_ZX_VLMAX(a_iYRegDst, a_iYRegSrc) NOP()
|
---|
811 | #define IEM_MC_COPY_YREG_U128_ZX_VLMAX(a_iYRegDst, a_iYRegSrc) NOP()
|
---|
812 | #define IEM_MC_COPY_YREG_U64_ZX_VLMAX(a_iYRegDst, a_iYRegSrc) NOP()
|
---|
813 |
|
---|
814 | #define IEM_MC_MERGE_YREG_U32_U96_ZX_VLMAX(a_iYRegDst, a_iYRegSrc32, a_iYRegSrcHx) NOP()
|
---|
815 | #define IEM_MC_MERGE_YREG_U64_U64_ZX_VLMAX(a_iYRegDst, a_iYRegSrc64, a_iYRegSrcHx) NOP()
|
---|
816 | #define IEM_MC_MERGE_YREG_U64LO_U64LO_ZX_VLMAX(a_iYRegDst, a_iYRegSrc64, a_iYRegSrcHx) NOP()
|
---|
817 | #define IEM_MC_MERGE_YREG_U64HI_U64HI_ZX_VLMAX(a_iYRegDst, a_iYRegSrc64, a_iYRegSrcHx) NOP()
|
---|
818 | #define IEM_MC_MERGE_YREG_U64LO_U64LOCAL_ZX_VLMAX(a_iYRegDst, a_iYRegSrcHx, a_u64Local) NOP()
|
---|
819 | #define IEM_MC_MERGE_YREG_U64LOCAL_U64HI_ZX_VLMAX(a_iYRegDst, a_u64Local, a_iYRegSrcHx) NOP()
|
---|
820 |
|
---|
821 | #define IEM_MC_CLEAR_ZREG_256_UP(a_iYReg) NOP()
|
---|
822 |
|
---|
823 | #define IEM_MC_FETCH_MEM_U8(a_u8Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
824 | #define IEM_MC_FETCH_MEM16_U8(a_u8Dst, a_iSeg, a_GCPtrMem16) IEM_LIVENESS_MEM(a_iSeg)
|
---|
825 | #define IEM_MC_FETCH_MEM32_U8(a_u8Dst, a_iSeg, a_GCPtrMem32) IEM_LIVENESS_MEM(a_iSeg)
|
---|
826 |
|
---|
827 | #define IEM_MC_FETCH_MEM_FLAT_U8(a_u8Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
828 | #define IEM_MC_FETCH_MEM16_FLAT_U8(a_u8Dst, a_GCPtrMem16) IEM_LIVENESS_MEM_FLAT()
|
---|
829 | #define IEM_MC_FETCH_MEM32_FLAT_U8(a_u8Dst, a_GCPtrMem32) IEM_LIVENESS_MEM_FLAT()
|
---|
830 |
|
---|
831 | #define IEM_MC_FETCH_MEM_U16(a_u16Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
832 | #define IEM_MC_FETCH_MEM_U16_DISP(a_u16Dst, a_iSeg, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM(a_iSeg)
|
---|
833 | #define IEM_MC_FETCH_MEM_I16(a_i16Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
834 | #define IEM_MC_FETCH_MEM_I16_DISP(a_i16Dst, a_iSeg, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM(a_iSeg)
|
---|
835 |
|
---|
836 | #define IEM_MC_FETCH_MEM_FLAT_U16(a_u16Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
837 | #define IEM_MC_FETCH_MEM_FLAT_U16_DISP(a_u16Dst, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM_FLAT()
|
---|
838 | #define IEM_MC_FETCH_MEM_FLAT_I16(a_i16Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
839 | #define IEM_MC_FETCH_MEM_FLAT_I16_DISP(a_i16Dst, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM_FLAT()
|
---|
840 |
|
---|
841 | #define IEM_MC_FETCH_MEM_U32(a_u32Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
842 | #define IEM_MC_FETCH_MEM_U32_DISP(a_u32Dst, a_iSeg, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM(a_iSeg)
|
---|
843 | #define IEM_MC_FETCH_MEM_I32(a_i32Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
844 | #define IEM_MC_FETCH_MEM_I32_DISP(a_i32Dst, a_iSeg, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM(a_iSeg)
|
---|
845 |
|
---|
846 | #define IEM_MC_FETCH_MEM_FLAT_U32(a_u32Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
847 | #define IEM_MC_FETCH_MEM_FLAT_U32_DISP(a_u32Dst, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM_FLAT()
|
---|
848 | #define IEM_MC_FETCH_MEM_FLAT_I32(a_i32Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
849 | #define IEM_MC_FETCH_MEM_FLAT_I32_DISP(a_i32Dst, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM_FLAT()
|
---|
850 |
|
---|
851 | #define IEM_MC_FETCH_MEM_U64(a_u64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
852 | #define IEM_MC_FETCH_MEM_U64_DISP(a_u64Dst, a_iSeg, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM(a_iSeg)
|
---|
853 | #define IEM_MC_FETCH_MEM_U64_ALIGN_U128(a_u64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
854 | #define IEM_MC_FETCH_MEM_I64(a_i64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
855 |
|
---|
856 | #define IEM_MC_FETCH_MEM_FLAT_U64(a_u64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
857 | #define IEM_MC_FETCH_MEM_FLAT_U64_DISP(a_u64Dst, a_GCPtrMem, a_offDisp) IEM_LIVENESS_MEM_FLAT()
|
---|
858 | #define IEM_MC_FETCH_MEM_FLAT_U64_ALIGN_U128(a_u64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
859 | #define IEM_MC_FETCH_MEM_FLAT_I64(a_i64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
860 |
|
---|
861 | #define IEM_MC_FETCH_MEM_R32(a_r32Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
862 | #define IEM_MC_FETCH_MEM_R64(a_r64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
863 | #define IEM_MC_FETCH_MEM_R80(a_r80Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
864 | #define IEM_MC_FETCH_MEM_D80(a_d80Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
865 |
|
---|
866 | #define IEM_MC_FETCH_MEM_FLAT_R32(a_r32Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
867 | #define IEM_MC_FETCH_MEM_FLAT_R64(a_r64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
868 | #define IEM_MC_FETCH_MEM_FLAT_R80(a_r80Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
869 | #define IEM_MC_FETCH_MEM_FLAT_D80(a_d80Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
870 |
|
---|
871 | #define IEM_MC_FETCH_MEM_U128(a_u128Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
872 | #define IEM_MC_FETCH_MEM_U128_NO_AC(a_u128Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
873 | #define IEM_MC_FETCH_MEM_U128_ALIGN_SSE(a_u128Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
874 |
|
---|
875 | #define IEM_MC_FETCH_MEM_XMM(a_XmmDst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
876 | #define IEM_MC_FETCH_MEM_XMM_NO_AC(a_XmmDst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
877 | #define IEM_MC_FETCH_MEM_XMM_ALIGN_SSE(a_XmmDst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
878 |
|
---|
879 | #define IEM_MC_FETCH_MEM_FLAT_U128(a_u128Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
880 | #define IEM_MC_FETCH_MEM_FLAT_U128_NO_AC(a_u128Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
881 | #define IEM_MC_FETCH_MEM_FLAT_U128_ALIGN_SSE(a_u128Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
882 |
|
---|
883 | #define IEM_MC_FETCH_MEM_FLAT_XMM(a_XmmDst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
884 | #define IEM_MC_FETCH_MEM_FLAT_XMM_NO_AC(a_XmmDst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
885 | #define IEM_MC_FETCH_MEM_FLAT_XMM_ALIGN_SSE(a_XmmDst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
886 |
|
---|
887 | #define IEM_MC_FETCH_MEM_U128_AND_XREG_U128(a_Dst, a_iXReg1, a_iSeg2, a_GCPtrMem2) IEM_LIVENESS_MEM(a_iSeg)
|
---|
888 | #define IEM_MC_FETCH_MEM_FLAT_U128_AND_XREG_U128(a_Dst, a_iXReg1, a_GCPtrMem2) IEM_LIVENESS_MEM_FLAT()
|
---|
889 |
|
---|
890 | #define IEM_MC_FETCH_MEM_XMM_ALIGN_SSE_AND_XREG_XMM(a_Dst, a_iXReg1, a_iSeg2, a_GCPtrMem2) IEM_LIVENESS_MEM(a_iSeg)
|
---|
891 | #define IEM_MC_FETCH_MEM_FLAT_XMM_ALIGN_SSE_AND_XREG_XMM(a_Dst, a_iXReg1, a_GCPtrMem2) IEM_LIVENESS_MEM_FLAT()
|
---|
892 | #define IEM_MC_FETCH_MEM_XMM_U32_AND_XREG_XMM(a_Dst, a_iXReg1, a_iDWord2, a_iSeg2, a_GCPtrMem2) IEM_LIVENESS_MEM(a_iSeg)
|
---|
893 | #define IEM_MC_FETCH_MEM_FLAT_XMM_U32_AND_XREG_XMM(a_Dst, a_iXReg1, a_iDWord2, a_GCPtrMem2) IEM_LIVENESS_MEM_FLAT()
|
---|
894 | #define IEM_MC_FETCH_MEM_XMM_U64_AND_XREG_XMM(a_Dst, a_iXReg1, a_iQWord2, a_iSeg2, a_GCPtrMem2) IEM_LIVENESS_MEM(a_iSeg)
|
---|
895 | #define IEM_MC_FETCH_MEM_FLAT_XMM_U64_AND_XREG_XMM(a_Dst, a_iXReg1, a_iQWord2, a_GCPtrMem2) IEM_LIVENESS_MEM_FLAT()
|
---|
896 |
|
---|
897 | #define IEM_MC_FETCH_MEM_U128_AND_XREG_U128_AND_RAX_RDX_U64(a_Dst, a_iXReg1, a_iSeg2, a_GCPtrMem2) \
|
---|
898 | do { IEM_LIVENESS_MEM(a_iSeg2); IEM_LIVENESS_GPR_INPUT(X86_GREG_xAX); IEM_LIVENESS_GPR_INPUT(X86_GREG_xDX); } while (0)
|
---|
899 | #define IEM_MC_FETCH_MEM_U128_AND_XREG_U128_AND_EAX_EDX_U32_SX_U64(a_Dst, a_iXReg1, a_iSeg2, a_GCPtrMem2) \
|
---|
900 | do { IEM_LIVENESS_MEM(a_iSeg2); IEM_LIVENESS_GPR_INPUT(X86_GREG_xAX); IEM_LIVENESS_GPR_INPUT(X86_GREG_xDX); } while (0)
|
---|
901 |
|
---|
902 | #define IEM_MC_FETCH_MEM_FLAT_U128_AND_XREG_U128_AND_RAX_RDX_U64(a_Dst, a_iXReg1, a_GCPtrMem2) \
|
---|
903 | do { IEM_LIVENESS_MEM_FLAT(); IEM_LIVENESS_GPR_INPUT(X86_GREG_xAX); IEM_LIVENESS_GPR_INPUT(X86_GREG_xDX); } while (0)
|
---|
904 | #define IEM_MC_FETCH_MEM_FLAT_U128_AND_XREG_U128_AND_EAX_EDX_U32_SX_U64(a_Dst, a_iXReg1, a_GCPtrMem2) \
|
---|
905 | do { IEM_LIVENESS_MEM_FLAT(); IEM_LIVENESS_GPR_INPUT(X86_GREG_xAX); IEM_LIVENESS_GPR_INPUT(X86_GREG_xDX); } while (0)
|
---|
906 |
|
---|
907 |
|
---|
908 | #define IEM_MC_FETCH_MEM_U256(a_u256Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
909 | #define IEM_MC_FETCH_MEM_U256_NO_AC(a_u256Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
910 | #define IEM_MC_FETCH_MEM_U256_ALIGN_AVX(a_u256Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
911 |
|
---|
912 | #define IEM_MC_FETCH_MEM_YMM(a_YmmDst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
913 | #define IEM_MC_FETCH_MEM_YMM_NO_AC(a_YmmDst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
914 | #define IEM_MC_FETCH_MEM_YMM_ALIGN_AVX(a_YmmDst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
915 |
|
---|
916 | #define IEM_MC_FETCH_MEM_FLAT_U256(a_u256Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
917 | #define IEM_MC_FETCH_MEM_FLAT_U256_NO_AC(a_u256Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
918 | #define IEM_MC_FETCH_MEM_FLAT_U256_ALIGN_AVX(a_u256Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
919 |
|
---|
920 | #define IEM_MC_FETCH_MEM_FLAT_YMM(a_YmmDst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
921 | #define IEM_MC_FETCH_MEM_FLAT_YMM_NO_AC(a_YmmDst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
922 | #define IEM_MC_FETCH_MEM_FLAT_YMM_ALIGN_AVX(a_YmmDst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
923 |
|
---|
924 | #define IEM_MC_FETCH_MEM_U8_ZX_U16(a_u16Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
925 | #define IEM_MC_FETCH_MEM_U8_ZX_U32(a_u32Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
926 | #define IEM_MC_FETCH_MEM_U8_ZX_U64(a_u64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
927 | #define IEM_MC_FETCH_MEM_U16_ZX_U32(a_u32Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
928 | #define IEM_MC_FETCH_MEM_U16_ZX_U64(a_u64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
929 | #define IEM_MC_FETCH_MEM_U32_ZX_U64(a_u64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
930 |
|
---|
931 | #define IEM_MC_FETCH_MEM_FLAT_U8_ZX_U16(a_u16Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
932 | #define IEM_MC_FETCH_MEM_FLAT_U8_ZX_U32(a_u32Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
933 | #define IEM_MC_FETCH_MEM_FLAT_U8_ZX_U64(a_u64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
934 | #define IEM_MC_FETCH_MEM_FLAT_U16_ZX_U32(a_u32Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
935 | #define IEM_MC_FETCH_MEM_FLAT_U16_ZX_U64(a_u64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
936 | #define IEM_MC_FETCH_MEM_FLAT_U32_ZX_U64(a_u64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
937 |
|
---|
938 | #define IEM_MC_FETCH_MEM_U8_SX_U16(a_u16Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
939 | #define IEM_MC_FETCH_MEM_U8_SX_U32(a_u32Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
940 | #define IEM_MC_FETCH_MEM_U8_SX_U64(a_u64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
941 | #define IEM_MC_FETCH_MEM_U16_SX_U32(a_u32Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
942 | #define IEM_MC_FETCH_MEM_U16_SX_U64(a_u64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
943 | #define IEM_MC_FETCH_MEM_U32_SX_U64(a_u64Dst, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
944 |
|
---|
945 | #define IEM_MC_FETCH_MEM_FLAT_U8_SX_U16(a_u16Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
946 | #define IEM_MC_FETCH_MEM_FLAT_U8_SX_U32(a_u32Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
947 | #define IEM_MC_FETCH_MEM_FLAT_U8_SX_U64(a_u64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
948 | #define IEM_MC_FETCH_MEM_FLAT_U16_SX_U32(a_u32Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
949 | #define IEM_MC_FETCH_MEM_FLAT_U16_SX_U64(a_u64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
950 | #define IEM_MC_FETCH_MEM_FLAT_U32_SX_U64(a_u64Dst, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
951 |
|
---|
952 | #define IEM_MC_STORE_MEM_U8(a_iSeg, a_GCPtrMem, a_u8Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
953 | #define IEM_MC_STORE_MEM_U16(a_iSeg, a_GCPtrMem, a_u16Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
954 | #define IEM_MC_STORE_MEM_U32(a_iSeg, a_GCPtrMem, a_u32Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
955 | #define IEM_MC_STORE_MEM_U64(a_iSeg, a_GCPtrMem, a_u64Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
956 |
|
---|
957 | #define IEM_MC_STORE_MEM_FLAT_U8(a_GCPtrMem, a_u8Value) IEM_LIVENESS_MEM_FLAT()
|
---|
958 | #define IEM_MC_STORE_MEM_FLAT_U16(a_GCPtrMem, a_u16Value) IEM_LIVENESS_MEM_FLAT()
|
---|
959 | #define IEM_MC_STORE_MEM_FLAT_U32(a_GCPtrMem, a_u32Value) IEM_LIVENESS_MEM_FLAT()
|
---|
960 | #define IEM_MC_STORE_MEM_FLAT_U64(a_GCPtrMem, a_u64Value) IEM_LIVENESS_MEM_FLAT()
|
---|
961 |
|
---|
962 | #define IEM_MC_STORE_MEM_U8_CONST(a_iSeg, a_GCPtrMem, a_u8C) IEM_LIVENESS_MEM(a_iSeg)
|
---|
963 | #define IEM_MC_STORE_MEM_U16_CONST(a_iSeg, a_GCPtrMem, a_u16C) IEM_LIVENESS_MEM(a_iSeg)
|
---|
964 | #define IEM_MC_STORE_MEM_U32_CONST(a_iSeg, a_GCPtrMem, a_u32C) IEM_LIVENESS_MEM(a_iSeg)
|
---|
965 | #define IEM_MC_STORE_MEM_U64_CONST(a_iSeg, a_GCPtrMem, a_u64C) IEM_LIVENESS_MEM(a_iSeg)
|
---|
966 |
|
---|
967 | #define IEM_MC_STORE_MEM_FLAT_U8_CONST(a_GCPtrMem, a_u8C) IEM_LIVENESS_MEM_FLAT()
|
---|
968 | #define IEM_MC_STORE_MEM_FLAT_U16_CONST(a_GCPtrMem, a_u16C) IEM_LIVENESS_MEM_FLAT()
|
---|
969 | #define IEM_MC_STORE_MEM_FLAT_U32_CONST(a_GCPtrMem, a_u32C) IEM_LIVENESS_MEM_FLAT()
|
---|
970 | #define IEM_MC_STORE_MEM_FLAT_U64_CONST(a_GCPtrMem, a_u64C) IEM_LIVENESS_MEM_FLAT()
|
---|
971 |
|
---|
972 | #define IEM_MC_STORE_MEM_I8_CONST_BY_REF( a_pi8Dst, a_i8C) NOP()
|
---|
973 | #define IEM_MC_STORE_MEM_I16_CONST_BY_REF(a_pi16Dst, a_i16C) NOP()
|
---|
974 | #define IEM_MC_STORE_MEM_I32_CONST_BY_REF(a_pi32Dst, a_i32C) NOP()
|
---|
975 | #define IEM_MC_STORE_MEM_I64_CONST_BY_REF(a_pi64Dst, a_i64C) NOP()
|
---|
976 | #define IEM_MC_STORE_MEM_NEG_QNAN_R32_BY_REF(a_pr32Dst) NOP()
|
---|
977 | #define IEM_MC_STORE_MEM_NEG_QNAN_R64_BY_REF(a_pr64Dst) NOP()
|
---|
978 | #define IEM_MC_STORE_MEM_NEG_QNAN_R80_BY_REF(a_pr80Dst) NOP()
|
---|
979 | #define IEM_MC_STORE_MEM_INDEF_D80_BY_REF(a_pd80Dst) NOP()
|
---|
980 |
|
---|
981 | #define IEM_MC_STORE_MEM_U128(a_iSeg, a_GCPtrMem, a_u128Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
982 | #define IEM_MC_STORE_MEM_U128_ALIGN_SSE(a_iSeg, a_GCPtrMem, a_u128Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
983 | #define IEM_MC_STORE_MEM_U128_NO_AC(a_iSeg, a_GCPtrMem, a_u128Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
984 |
|
---|
985 | #define IEM_MC_STORE_MEM_FLAT_U128(a_GCPtrMem, a_u128Value) IEM_LIVENESS_MEM_FLAT()
|
---|
986 | #define IEM_MC_STORE_MEM_FLAT_U128_ALIGN_SSE(a_GCPtrMem, a_u128Value) IEM_LIVENESS_MEM_FLAT()
|
---|
987 | #define IEM_MC_STORE_MEM_FLAT_U128_NO_AC(a_GCPtrMem, a_u128Value) IEM_LIVENESS_MEM_FLAT()
|
---|
988 |
|
---|
989 | #define IEM_MC_STORE_MEM_U256(a_iSeg, a_GCPtrMem, a_u256Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
990 | #define IEM_MC_STORE_MEM_U256_ALIGN_AVX(a_iSeg, a_GCPtrMem, a_u256Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
991 | #define IEM_MC_STORE_MEM_U256_NO_AC(a_iSeg, a_GCPtrMem, a_u256Value) IEM_LIVENESS_MEM(a_iSeg)
|
---|
992 |
|
---|
993 | #define IEM_MC_STORE_MEM_FLAT_U256(a_GCPtrMem, a_u256Value) IEM_LIVENESS_MEM_FLAT()
|
---|
994 | #define IEM_MC_STORE_MEM_FLAT_U256_ALIGN_AVX(a_GCPtrMem, a_u256Value) IEM_LIVENESS_MEM_FLAT()
|
---|
995 | #define IEM_MC_STORE_MEM_FLAT_U256_NO_AC(a_GCPtrMem, a_u256Value) IEM_LIVENESS_MEM_FLAT()
|
---|
996 |
|
---|
997 | #define IEM_MC_PUSH_U16(a_u16Value) IEM_LIVENESS_STACK()
|
---|
998 | #define IEM_MC_PUSH_U32(a_u32Value) IEM_LIVENESS_STACK()
|
---|
999 | #define IEM_MC_PUSH_U32_SREG(a_uSegVal) IEM_LIVENESS_STACK()
|
---|
1000 | #define IEM_MC_PUSH_U64(a_u64Value) IEM_LIVENESS_STACK()
|
---|
1001 |
|
---|
1002 | #define IEM_MC_POP_GREG_U16(a_iGReg) do { IEM_LIVENESS_STACK(); IEM_LIVENESS_GPR_MODIFY(a_iGReg); } while (0)
|
---|
1003 | #define IEM_MC_POP_GREG_U32(a_iGReg) do { IEM_LIVENESS_STACK(); IEM_LIVENESS_GPR_CLOBBER(a_iGReg); } while (0)
|
---|
1004 | #define IEM_MC_POP_GREG_U64(a_iGReg) do { IEM_LIVENESS_STACK(); IEM_LIVENESS_GPR_CLOBBER(a_iGReg); } while (0)
|
---|
1005 |
|
---|
1006 | /* 32-bit flat stack push and pop: */
|
---|
1007 | #define IEM_MC_FLAT32_PUSH_U16(a_u16Value) IEM_LIVENESS_STACK_FLAT()
|
---|
1008 | #define IEM_MC_FLAT32_PUSH_U32(a_u32Value) IEM_LIVENESS_STACK_FLAT()
|
---|
1009 | #define IEM_MC_FLAT32_PUSH_U32_SREG(a_uSegVal) IEM_LIVENESS_STACK_FLAT()
|
---|
1010 |
|
---|
1011 | #define IEM_MC_FLAT32_POP_GREG_U16(a_iGReg) do { IEM_LIVENESS_STACK_FLAT(); IEM_LIVENESS_GPR_MODIFY(a_iGReg); } while (0)
|
---|
1012 | #define IEM_MC_FLAT32_POP_GREG_U32(a_iGReg) do { IEM_LIVENESS_STACK_FLAT(); IEM_LIVENESS_GPR_CLOBBER(a_iGReg); } while (0)
|
---|
1013 |
|
---|
1014 | /* 64-bit flat stack push and pop: */
|
---|
1015 | #define IEM_MC_FLAT64_PUSH_U16(a_u16Value) IEM_LIVENESS_STACK_FLAT()
|
---|
1016 | #define IEM_MC_FLAT64_PUSH_U64(a_u64Value) IEM_LIVENESS_STACK_FLAT()
|
---|
1017 |
|
---|
1018 | #define IEM_MC_FLAT64_POP_GREG_U16(a_iGReg) do { IEM_LIVENESS_STACK_FLAT(); IEM_LIVENESS_GPR_MODIFY(a_iGReg); } while (0)
|
---|
1019 | #define IEM_MC_FLAT64_POP_GREG_U64(a_iGReg) do { IEM_LIVENESS_STACK_FLAT(); IEM_LIVENESS_GPR_CLOBBER(a_iGReg); } while (0)
|
---|
1020 |
|
---|
1021 |
|
---|
1022 | #define IEM_MC_MEM_MAP_U8_ATOMIC(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1023 | #define IEM_MC_MEM_MAP_U8_RW(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1024 | #define IEM_MC_MEM_MAP_U8_WO(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1025 | #define IEM_MC_MEM_MAP_U8_RO(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1026 | #define IEM_MC_MEM_FLAT_MAP_U8_ATOMIC(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1027 | #define IEM_MC_MEM_FLAT_MAP_U8_RW(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1028 | #define IEM_MC_MEM_FLAT_MAP_U8_WO(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1029 | #define IEM_MC_MEM_FLAT_MAP_U8_RO(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1030 | #define IEM_MC_MEM_MAP_U16_ATOMIC(a_pu16Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1031 | #define IEM_MC_MEM_MAP_U16_RW(a_pu16Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1032 | #define IEM_MC_MEM_MAP_U16_WO(a_pu16Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1033 | #define IEM_MC_MEM_MAP_U16_RO(a_pu16Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1034 | #define IEM_MC_MEM_FLAT_MAP_U16_ATOMIC(a_pu16Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1035 | #define IEM_MC_MEM_FLAT_MAP_U16_RW(a_pu16Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1036 | #define IEM_MC_MEM_FLAT_MAP_U16_WO(a_pu16Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1037 | #define IEM_MC_MEM_FLAT_MAP_U16_RO(a_pu16Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1038 | #define IEM_MC_MEM_MAP_I16_WO(a_pi16Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1039 | #define IEM_MC_MEM_FLAT_MAP_I16_WO(a_pi16Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1040 | #define IEM_MC_MEM_MAP_U32_ATOMIC(a_pu32Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1041 | #define IEM_MC_MEM_MAP_U32_RW(a_pu32Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1042 | #define IEM_MC_MEM_MAP_U32_WO(a_pu32Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1043 | #define IEM_MC_MEM_MAP_U32_RO(a_pu32Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1044 | #define IEM_MC_MEM_FLAT_MAP_U32_ATOMIC(a_pu32Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1045 | #define IEM_MC_MEM_FLAT_MAP_U32_RW(a_pu32Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1046 | #define IEM_MC_MEM_FLAT_MAP_U32_WO(a_pu32Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1047 | #define IEM_MC_MEM_FLAT_MAP_U32_RO(a_pu32Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1048 | #define IEM_MC_MEM_MAP_I32_WO(a_pi32Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1049 | #define IEM_MC_MEM_FLAT_MAP_I32_WO(a_pi32Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1050 | #define IEM_MC_MEM_MAP_R32_WO(a_pr32Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1051 | #define IEM_MC_MEM_FLAT_MAP_R32_WO(a_pr32Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1052 | #define IEM_MC_MEM_MAP_U64_ATOMIC(a_pu64Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1053 | #define IEM_MC_MEM_MAP_U64_RW(a_pu64Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1054 | #define IEM_MC_MEM_MAP_U64_WO(a_pu64Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1055 | #define IEM_MC_MEM_MAP_U64_RO(a_pu64Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1056 | #define IEM_MC_MEM_FLAT_MAP_U64_ATOMIC(a_pu64Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1057 | #define IEM_MC_MEM_FLAT_MAP_U64_RW(a_pu64Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1058 | #define IEM_MC_MEM_FLAT_MAP_U64_WO(a_pu64Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1059 | #define IEM_MC_MEM_FLAT_MAP_U64_RO(a_pu64Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1060 | #define IEM_MC_MEM_MAP_I64_WO(a_pi64Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1061 | #define IEM_MC_MEM_FLAT_MAP_I64_WO(a_pi64Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1062 | #define IEM_MC_MEM_MAP_R64_WO(a_pr64Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1063 | #define IEM_MC_MEM_FLAT_MAP_R64_WO(a_pr64Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1064 | #define IEM_MC_MEM_MAP_U128_ATOMIC(a_pu128Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1065 | #define IEM_MC_MEM_MAP_U128_RW(a_pu128Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1066 | #define IEM_MC_MEM_MAP_U128_WO(a_pu128Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1067 | #define IEM_MC_MEM_MAP_U128_RO(a_pu128Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1068 | #define IEM_MC_MEM_FLAT_MAP_U128_ATOMIC(a_pu128Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1069 | #define IEM_MC_MEM_FLAT_MAP_U128_RW(a_pu128Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1070 | #define IEM_MC_MEM_FLAT_MAP_U128_WO(a_pu128Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1071 | #define IEM_MC_MEM_FLAT_MAP_U128_RO(a_pu128Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1072 | #define IEM_MC_MEM_MAP_R80_WO(a_pr80Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1073 | #define IEM_MC_MEM_FLAT_MAP_R80_WO(a_pr80Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1074 | #define IEM_MC_MEM_MAP_D80_WO(a_pd80Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) IEM_LIVENESS_MEM(a_iSeg)
|
---|
1075 | #define IEM_MC_MEM_FLAT_MAP_D80_WO(a_pd80Mem, a_bUnmapInfo, a_GCPtrMem) IEM_LIVENESS_MEM_FLAT()
|
---|
1076 |
|
---|
1077 |
|
---|
1078 | #define IEM_MC_MEM_COMMIT_AND_UNMAP_RW(a_bMapInfo) NOP()
|
---|
1079 | #define IEM_MC_MEM_COMMIT_AND_UNMAP_ATOMIC(a_bMapInfo) NOP()
|
---|
1080 | #define IEM_MC_MEM_COMMIT_AND_UNMAP_WO(a_bMapInfo) NOP()
|
---|
1081 | #define IEM_MC_MEM_COMMIT_AND_UNMAP_RO(a_bMapInfo) NOP()
|
---|
1082 | #define IEM_MC_MEM_COMMIT_AND_UNMAP_FOR_FPU_STORE_WO(a_bMapInfo, a_u16FSW) NOP()
|
---|
1083 | #define IEM_MC_MEM_ROLLBACK_AND_UNMAP_WO(a_bMapInfo) NOP()
|
---|
1084 |
|
---|
1085 | #define IEM_MC_NATIVE_IF(a_fSupportedHosts) {
|
---|
1086 | #define IEM_MC_NATIVE_ELSE() } {
|
---|
1087 | #define IEM_MC_NATIVE_ENDIF() } ((void)0)
|
---|
1088 |
|
---|
1089 | #define IEM_MC_NATIVE_EMIT_0(a_fnEmitter)
|
---|
1090 | #define IEM_MC_NATIVE_EMIT_1(a_fnEmitter, a0) NOP()
|
---|
1091 | #define IEM_MC_NATIVE_EMIT_2(a_fnEmitter, a0, a1) NOP()
|
---|
1092 | #define IEM_MC_NATIVE_EMIT_2_EX(a_fnEmitter, a0, a1) NOP()
|
---|
1093 | #define IEM_MC_NATIVE_EMIT_3(a_fnEmitter, a0, a1, a2) NOP()
|
---|
1094 | #define IEM_MC_NATIVE_EMIT_4(a_fnEmitter, a0, a1, a2, a3) NOP()
|
---|
1095 | #define IEM_MC_NATIVE_EMIT_5(a_fnEmitter, a0, a1, a2, a3, a4) NOP()
|
---|
1096 | #define IEM_MC_NATIVE_EMIT_6(a_fnEmitter, a0, a1, a2, a3, a4, a5) NOP()
|
---|
1097 | #define IEM_MC_NATIVE_EMIT_7(a_fnEmitter, a0, a1, a2, a3, a4, a5, a6) NOP()
|
---|
1098 | #define IEM_MC_NATIVE_EMIT_8(a_fnEmitter, a0, a1, a2, a3, a4, a5, a6, a7) NOP()
|
---|
1099 |
|
---|
1100 | #define IEM_MC_NATIVE_SET_AMD64_HOST_REG_FOR_LOCAL(a_VarNm, a_idxHostReg) NOP()
|
---|
1101 |
|
---|
1102 | #define IEM_MC_CALL_VOID_AIMPL_0(a_pfn) NOP()
|
---|
1103 | #define IEM_MC_CALL_VOID_AIMPL_1(a_pfn, a0) NOP()
|
---|
1104 | #define IEM_MC_CALL_VOID_AIMPL_2(a_pfn, a0, a1) NOP()
|
---|
1105 | #define IEM_MC_CALL_VOID_AIMPL_3(a_pfn, a0, a1, a2) NOP()
|
---|
1106 | #define IEM_MC_CALL_VOID_AIMPL_4(a_pfn, a0, a1, a2, a3) NOP()
|
---|
1107 | #define IEM_MC_CALL_AIMPL_3(a_rcType, a_rc, a_pfn, a0, a1, a2) NOP()
|
---|
1108 | #define IEM_MC_CALL_AIMPL_4(a_rcType, a_rc, a_pfn, a0, a1, a2, a3) NOP()
|
---|
1109 |
|
---|
1110 | #define IEM_MC_CALL_FPU_AIMPL_1(a_pfnAImpl, a0) NOP()
|
---|
1111 | #define IEM_MC_CALL_FPU_AIMPL_2(a_pfnAImpl, a0, a1) NOP()
|
---|
1112 | #define IEM_MC_CALL_FPU_AIMPL_3(a_pfnAImpl, a0, a1, a2) NOP()
|
---|
1113 |
|
---|
1114 | #define IEM_MC_SET_FPU_RESULT(a_FpuData, a_FSW, a_pr80Value) NOP()
|
---|
1115 |
|
---|
1116 | #define IEM_MC_PUSH_FPU_RESULT(a_FpuData, a_uFpuOpcode) NOP()
|
---|
1117 | #define IEM_MC_PUSH_FPU_RESULT_MEM_OP(a_FpuData, a_iEffSeg, a_GCPtrEff, a_uFpuOpcode) NOP()
|
---|
1118 | #define IEM_MC_PUSH_FPU_RESULT_TWO(a_FpuDataTwo, a_uFpuOpcode) NOP()
|
---|
1119 |
|
---|
1120 | #define IEM_MC_STORE_FPU_RESULT(a_FpuData, a_iStReg, a_uFpuOpcode) NOP()
|
---|
1121 | #define IEM_MC_STORE_FPU_RESULT_THEN_POP(a_FpuData, a_iStReg, a_uFpuOpcode) NOP()
|
---|
1122 | #define IEM_MC_STORE_FPU_RESULT_MEM_OP(a_FpuData, a_iStReg, a_iEffSeg, a_GCPtrEff, a_uFpuOpcode) NOP()
|
---|
1123 | #define IEM_MC_STORE_FPU_RESULT_WITH_MEM_OP_THEN_POP(a_FpuData, a_iStReg, a_iEffSeg, a_GCPtrEff, a_uFpuOpcode) NOP()
|
---|
1124 |
|
---|
1125 | #define IEM_MC_UPDATE_FPU_OPCODE_IP(a_uFpuOpcode) NOP()
|
---|
1126 | #define IEM_MC_FPU_STACK_FREE(a_iStReg) NOP()
|
---|
1127 | #define IEM_MC_FPU_STACK_INC_TOP() NOP()
|
---|
1128 | #define IEM_MC_FPU_STACK_DEC_TOP() NOP()
|
---|
1129 |
|
---|
1130 | #define IEM_MC_UPDATE_FSW(a_u16FSW, a_uFpuOpcode) NOP()
|
---|
1131 | #define IEM_MC_UPDATE_FSW_CONST(a_u16FSW, a_uFpuOpcode) NOP()
|
---|
1132 | #define IEM_MC_UPDATE_FSW_WITH_MEM_OP(a_u16FSW, a_iEffSeg, a_GCPtrEff, a_uFpuOpcode) NOP()
|
---|
1133 | #define IEM_MC_UPDATE_FSW_THEN_POP(a_u16FSW, a_uFpuOpcode) NOP()
|
---|
1134 | #define IEM_MC_UPDATE_FSW_WITH_MEM_OP_THEN_POP(a_u16FSW, a_iEffSeg, a_GCPtrEff, a_uFpuOpcode) NOP()
|
---|
1135 | #define IEM_MC_UPDATE_FSW_THEN_POP_POP(a_u16FSW, a_uFpuOpcode) NOP()
|
---|
1136 |
|
---|
1137 | #define IEM_MC_FPU_STACK_UNDERFLOW(a_iStDst, a_uFpuOpcode) NOP()
|
---|
1138 | #define IEM_MC_FPU_STACK_UNDERFLOW_THEN_POP(a_iStDst, a_uFpuOpcode) NOP()
|
---|
1139 | #define IEM_MC_FPU_STACK_UNDERFLOW_MEM_OP(a_iStDst, a_iEffSeg, a_GCPtrEff, a_uFpuOpcode) NOP()
|
---|
1140 | #define IEM_MC_FPU_STACK_UNDERFLOW_MEM_OP_THEN_POP(a_iStDst, a_iEffSeg, a_GCPtrEff, a_uFpuOpcode) NOP()
|
---|
1141 | #define IEM_MC_FPU_STACK_UNDERFLOW_THEN_POP_POP(a_uFpuOpcode) NOP()
|
---|
1142 | #define IEM_MC_FPU_STACK_PUSH_UNDERFLOW(a_uFpuOpcode) NOP()
|
---|
1143 | #define IEM_MC_FPU_STACK_PUSH_UNDERFLOW_TWO(a_uFpuOpcode) NOP()
|
---|
1144 |
|
---|
1145 | #define IEM_MC_FPU_STACK_PUSH_OVERFLOW(a_uFpuOpcode) NOP()
|
---|
1146 | #define IEM_MC_FPU_STACK_PUSH_OVERFLOW_MEM_OP(a_iEffSeg, a_GCPtrEff, a_uFpuOpcode) NOP()
|
---|
1147 |
|
---|
1148 | #define IEM_MC_PREPARE_FPU_USAGE() IEM_LIVENESS_MXCSR_INPUT() /* fxrstor */
|
---|
1149 | #define IEM_MC_ACTUALIZE_FPU_STATE_FOR_READ() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1150 | #define IEM_MC_ACTUALIZE_FPU_STATE_FOR_CHANGE() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1151 |
|
---|
1152 | #define IEM_MC_PREPARE_SSE_USAGE() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1153 | #define IEM_MC_ACTUALIZE_SSE_STATE_FOR_READ() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1154 | #define IEM_MC_ACTUALIZE_SSE_STATE_FOR_CHANGE() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1155 |
|
---|
1156 | #define IEM_MC_PREPARE_AVX_USAGE() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1157 | #define IEM_MC_ACTUALIZE_AVX_STATE_FOR_READ() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1158 | #define IEM_MC_ACTUALIZE_AVX_STATE_FOR_CHANGE() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1159 |
|
---|
1160 | #define IEM_MC_CALL_MMX_AIMPL_2(a_pfnAImpl, a0, a1) NOP()
|
---|
1161 | #define IEM_MC_CALL_MMX_AIMPL_3(a_pfnAImpl, a0, a1, a2) NOP()
|
---|
1162 | #define IEM_MC_CALL_SSE_AIMPL_2(a_pfnAImpl, a0, a1) IEM_LIVENESS_MXCSR_MODIFY(); IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR4_INPUT()
|
---|
1163 | #define IEM_MC_CALL_SSE_AIMPL_3(a_pfnAImpl, a0, a1, a2) IEM_LIVENESS_MXCSR_MODIFY(); IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR4_INPUT()
|
---|
1164 | #define IEM_MC_CALL_AVX_AIMPL_2(a_pfnAImpl, a0, a1) IEM_LIVENESS_MXCSR_MODIFY(); IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR4_INPUT()
|
---|
1165 | #define IEM_MC_CALL_AVX_AIMPL_3(a_pfnAImpl, a0, a1, a2) IEM_LIVENESS_MXCSR_MODIFY(); IEM_LIVENESS_MARK_POTENTIAL_CALL(); IEM_LIVENESS_CR4_INPUT()
|
---|
1166 |
|
---|
1167 | #define IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit) \
|
---|
1168 | do { if ( (a_fBit) == X86_EFL_CF) IEM_LIVENESS_ONE_EFLAG_INPUT(fEflCf); \
|
---|
1169 | else if ((a_fBit) == X86_EFL_PF) IEM_LIVENESS_ONE_EFLAG_INPUT(fEflPf); \
|
---|
1170 | else if ((a_fBit) == X86_EFL_AF) IEM_LIVENESS_ONE_EFLAG_INPUT(fEflAf); \
|
---|
1171 | else if ((a_fBit) == X86_EFL_ZF) IEM_LIVENESS_ONE_EFLAG_INPUT(fEflZf); \
|
---|
1172 | else if ((a_fBit) == X86_EFL_SF) IEM_LIVENESS_ONE_EFLAG_INPUT(fEflSf); \
|
---|
1173 | else if ((a_fBit) == X86_EFL_OF) IEM_LIVENESS_ONE_EFLAG_INPUT(fEflOf); \
|
---|
1174 | else if ((a_fBit) == X86_EFL_DF) IEM_LIVENESS_ONE_EFLAG_INPUT(fEflOther); /* loadsb and friends */ \
|
---|
1175 | else { AssertMsgFailed(("#s (%#x)\n", #a_fBit, (a_fBit))); IEM_LIVENESS_ALL_EFLAGS_INPUT(); } \
|
---|
1176 | } while (0)
|
---|
1177 |
|
---|
1178 | #define IEM_MC_IF_EFL_BIT_SET(a_fBit) IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); {
|
---|
1179 | #define IEM_MC_IF_EFL_BIT_NOT_SET(a_fBit) IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); {
|
---|
1180 | #define IEM_MC_IF_EFL_ANY_BITS_SET(a_fBits) \
|
---|
1181 | do { if ((a_fBits) == (X86_EFL_CF | X86_EFL_ZF)) \
|
---|
1182 | { IEM_LIVENESS_ONE_EFLAG_INPUT(fEflCf); IEM_LIVENESS_ONE_EFLAG_INPUT(fEflZf); } \
|
---|
1183 | else { AssertMsgFailed(("#s (%#x)\n", #a_fBits, (a_fBits))); IEM_LIVENESS_ALL_EFLAGS_INPUT(); } \
|
---|
1184 | } while (0); {
|
---|
1185 | #define IEM_MC_IF_EFL_NO_BITS_SET(a_fBits) \
|
---|
1186 | do { if ((a_fBits) == (X86_EFL_CF | X86_EFL_ZF)) \
|
---|
1187 | { IEM_LIVENESS_ONE_EFLAG_INPUT(fEflCf); IEM_LIVENESS_ONE_EFLAG_INPUT(fEflZf); } \
|
---|
1188 | else { AssertMsgFailed(("#s (%#x)\n", #a_fBits, (a_fBits))); IEM_LIVENESS_ALL_EFLAGS_INPUT(); } \
|
---|
1189 | } while (0); {
|
---|
1190 | #define IEM_MC_IF_EFL_BITS_NE(a_fBit1, a_fBit2) \
|
---|
1191 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit1); \
|
---|
1192 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit2); {
|
---|
1193 | #define IEM_MC_IF_EFL_BITS_EQ(a_fBit1, a_fBit2) \
|
---|
1194 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit1); \
|
---|
1195 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit2); {
|
---|
1196 | #define IEM_MC_IF_EFL_BIT_SET_OR_BITS_NE(a_fBit, a_fBit1, a_fBit2) \
|
---|
1197 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); \
|
---|
1198 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit1); \
|
---|
1199 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit2); {
|
---|
1200 | #define IEM_MC_IF_EFL_BIT_NOT_SET_AND_BITS_EQ(a_fBit, a_fBit1, a_fBit2) \
|
---|
1201 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); \
|
---|
1202 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit1); \
|
---|
1203 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit2); {
|
---|
1204 | #define IEM_MC_IF_CX_IS_NZ() IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); {
|
---|
1205 | #define IEM_MC_IF_ECX_IS_NZ() IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); {
|
---|
1206 | #define IEM_MC_IF_RCX_IS_NZ() IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); {
|
---|
1207 | #define IEM_MC_IF_CX_IS_NOT_ONE() IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); {
|
---|
1208 | #define IEM_MC_IF_ECX_IS_NOT_ONE() IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); {
|
---|
1209 | #define IEM_MC_IF_RCX_IS_NOT_ONE() IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); {
|
---|
1210 | #define IEM_MC_IF_CX_IS_NOT_ONE_AND_EFL_BIT_SET(a_fBit) \
|
---|
1211 | IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); \
|
---|
1212 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); {
|
---|
1213 | #define IEM_MC_IF_ECX_IS_NOT_ONE_AND_EFL_BIT_SET(a_fBit) \
|
---|
1214 | IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); \
|
---|
1215 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); {
|
---|
1216 | #define IEM_MC_IF_RCX_IS_NOT_ONE_AND_EFL_BIT_SET(a_fBit) \
|
---|
1217 | IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); \
|
---|
1218 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); {
|
---|
1219 | #define IEM_MC_IF_CX_IS_NOT_ONE_AND_EFL_BIT_NOT_SET(a_fBit) \
|
---|
1220 | IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); \
|
---|
1221 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); {
|
---|
1222 | #define IEM_MC_IF_ECX_IS_NOT_ONE_AND_EFL_BIT_NOT_SET(a_fBit) \
|
---|
1223 | IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); \
|
---|
1224 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); {
|
---|
1225 | #define IEM_MC_IF_RCX_IS_NOT_ONE_AND_EFL_BIT_NOT_SET(a_fBit) \
|
---|
1226 | IEM_LIVENESS_GPR_INPUT(X86_GREG_xCX); \
|
---|
1227 | IEM_LIVENESS_ONE_STATUS_EFLAG_INPUT(a_fBit); {
|
---|
1228 | #define IEM_MC_IF_LOCAL_IS_Z(a_Local) {
|
---|
1229 | #define IEM_MC_IF_GREG_BIT_SET(a_iGReg, a_iBitNo) IEM_LIVENESS_GPR_INPUT(a_iGReg); {
|
---|
1230 |
|
---|
1231 | #define IEM_MC_REF_FPUREG(a_pr80Dst, a_iSt) NOP()
|
---|
1232 | #define IEM_MC_IF_FPUREG_IS_EMPTY(a_iSt) {
|
---|
1233 | #define IEM_MC_IF_FPUREG_NOT_EMPTY(a_iSt) {
|
---|
1234 | #define IEM_MC_IF_FPUREG_NOT_EMPTY_REF_R80(a_pr80Dst, a_iSt) {
|
---|
1235 | #define IEM_MC_IF_TWO_FPUREGS_NOT_EMPTY_REF_R80(a_pr80Dst0, a_iSt0, a_pr80Dst1, a_iSt1) {
|
---|
1236 | #define IEM_MC_IF_TWO_FPUREGS_NOT_EMPTY_REF_R80_FIRST(a_pr80Dst0, a_iSt0, a_iSt1) {
|
---|
1237 | #define IEM_MC_IF_FCW_IM() {
|
---|
1238 |
|
---|
1239 | #define IEM_MC_ELSE() } /*else*/ {
|
---|
1240 | #define IEM_MC_ENDIF() } do {} while (0)
|
---|
1241 |
|
---|
1242 | #define IEM_MC_HINT_FLUSH_GUEST_SHADOW(g_fGstShwFlush) NOP()
|
---|
1243 |
|
---|
1244 | #define IEM_MC_LIVENESS_GREG_INPUT(a_iGReg) IEM_LIVENESS_GPR_INPUT(a_iGReg)
|
---|
1245 | #define IEM_MC_LIVENESS_GREG_CLOBBER(a_iGReg) IEM_LIVENESS_GPR_CLOBBER(a_iGReg)
|
---|
1246 | #define IEM_MC_LIVENESS_GREG_MODIFY(a_iGReg) IEM_LIVENESS_GPR_MODIFY(a_iGReg)
|
---|
1247 |
|
---|
1248 | #define IEM_MC_LIVENESS_MREG_INPUT(a_iMReg) NOP()
|
---|
1249 | #define IEM_MC_LIVENESS_MREG_CLOBBER(a_iMReg) NOP()
|
---|
1250 | #define IEM_MC_LIVENESS_MREG_MODIFY(a_iMReg) NOP()
|
---|
1251 |
|
---|
1252 | #define IEM_MC_LIVENESS_XREG_INPUT(a_iXReg) NOP()
|
---|
1253 | #define IEM_MC_LIVENESS_XREG_CLOBBER(a_iXReg) NOP()
|
---|
1254 | #define IEM_MC_LIVENESS_XREG_MODIFY(a_iXReg) NOP()
|
---|
1255 |
|
---|
1256 | #define IEM_MC_LIVENESS_MXCSR_INPUT() IEM_LIVENESS_MXCSR_INPUT()
|
---|
1257 | #define IEM_MC_LIVENESS_MXCSR_CLOBBER() IEM_LIVENESS_MXCSR_CLOBBER()
|
---|
1258 | #define IEM_MC_LIVENESS_MXCSR_MODIFY() IEM_LIVENESS_MXCSR_MODIFY()
|
---|
1259 |
|
---|