1 | /* $Id: IEMInternal.h 102703 2023-12-26 12:39:08Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * IEM - Internal header file.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef VMM_INCLUDED_SRC_include_IEMInternal_h
|
---|
29 | #define VMM_INCLUDED_SRC_include_IEMInternal_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | #include <VBox/vmm/cpum.h>
|
---|
35 | #include <VBox/vmm/iem.h>
|
---|
36 | #include <VBox/vmm/pgm.h>
|
---|
37 | #include <VBox/vmm/stam.h>
|
---|
38 | #include <VBox/param.h>
|
---|
39 |
|
---|
40 | #include <iprt/setjmp-without-sigmask.h>
|
---|
41 | #include <iprt/list.h>
|
---|
42 |
|
---|
43 |
|
---|
44 | RT_C_DECLS_BEGIN
|
---|
45 |
|
---|
46 |
|
---|
47 | /** @defgroup grp_iem_int Internals
|
---|
48 | * @ingroup grp_iem
|
---|
49 | * @internal
|
---|
50 | * @{
|
---|
51 | */
|
---|
52 |
|
---|
53 | /** For expanding symbol in slickedit and other products tagging and
|
---|
54 | * crossreferencing IEM symbols. */
|
---|
55 | #ifndef IEM_STATIC
|
---|
56 | # define IEM_STATIC static
|
---|
57 | #endif
|
---|
58 |
|
---|
59 | /** @def IEM_WITH_SETJMP
|
---|
60 | * Enables alternative status code handling using setjmps.
|
---|
61 | *
|
---|
62 | * This adds a bit of expense via the setjmp() call since it saves all the
|
---|
63 | * non-volatile registers. However, it eliminates return code checks and allows
|
---|
64 | * for more optimal return value passing (return regs instead of stack buffer).
|
---|
65 | */
|
---|
66 | #if defined(DOXYGEN_RUNNING) || defined(RT_OS_WINDOWS) || 1
|
---|
67 | # define IEM_WITH_SETJMP
|
---|
68 | #endif
|
---|
69 |
|
---|
70 | /** @def IEM_WITH_THROW_CATCH
|
---|
71 | * Enables using C++ throw/catch as an alternative to setjmp/longjmp in user
|
---|
72 | * mode code when IEM_WITH_SETJMP is in effect.
|
---|
73 | *
|
---|
74 | * With GCC 11.3.1 and code TLB on linux, using throw/catch instead of
|
---|
75 | * setjmp/long resulted in bs2-test-1 running 3.00% faster and all but on test
|
---|
76 | * result value improving by more than 1%. (Best out of three.)
|
---|
77 | *
|
---|
78 | * With Visual C++ 2019 and code TLB on windows, using throw/catch instead of
|
---|
79 | * setjmp/long resulted in bs2-test-1 running 3.68% faster and all but some of
|
---|
80 | * the MMIO and CPUID tests ran noticeably faster. Variation is greater than on
|
---|
81 | * Linux, but it should be quite a bit faster for normal code.
|
---|
82 | */
|
---|
83 | #if (defined(__cplusplus) && defined(IEM_WITH_SETJMP) && defined(IN_RING3) && (defined(__GNUC__) || defined(_MSC_VER))) \
|
---|
84 | || defined(DOXYGEN_RUNNING)
|
---|
85 | # define IEM_WITH_THROW_CATCH
|
---|
86 | #endif
|
---|
87 |
|
---|
88 | /** @def IEM_DO_LONGJMP
|
---|
89 | *
|
---|
90 | * Wrapper around longjmp / throw.
|
---|
91 | *
|
---|
92 | * @param a_pVCpu The CPU handle.
|
---|
93 | * @param a_rc The status code jump back with / throw.
|
---|
94 | */
|
---|
95 | #if defined(IEM_WITH_SETJMP) || defined(DOXYGEN_RUNNING)
|
---|
96 | # ifdef IEM_WITH_THROW_CATCH
|
---|
97 | # define IEM_DO_LONGJMP(a_pVCpu, a_rc) throw int(a_rc)
|
---|
98 | # else
|
---|
99 | # define IEM_DO_LONGJMP(a_pVCpu, a_rc) longjmp(*(a_pVCpu)->iem.s.CTX_SUFF(pJmpBuf), (a_rc))
|
---|
100 | # endif
|
---|
101 | #endif
|
---|
102 |
|
---|
103 | /** For use with IEM function that may do a longjmp (when enabled).
|
---|
104 | *
|
---|
105 | * Visual C++ has trouble longjmp'ing from/over functions with the noexcept
|
---|
106 | * attribute. So, we indicate that function that may be part of a longjmp may
|
---|
107 | * throw "exceptions" and that the compiler should definitely not generate and
|
---|
108 | * std::terminate calling unwind code.
|
---|
109 | *
|
---|
110 | * Here is one example of this ending in std::terminate:
|
---|
111 | * @code{.txt}
|
---|
112 | 00 00000041`cadfda10 00007ffc`5d5a1f9f ucrtbase!abort+0x4e
|
---|
113 | 01 00000041`cadfda40 00007ffc`57af229a ucrtbase!terminate+0x1f
|
---|
114 | 02 00000041`cadfda70 00007ffb`eec91030 VCRUNTIME140!__std_terminate+0xa [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\ehhelpers.cpp @ 192]
|
---|
115 | 03 00000041`cadfdaa0 00007ffb`eec92c6d VCRUNTIME140_1!_CallSettingFrame+0x20 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm @ 50]
|
---|
116 | 04 00000041`cadfdad0 00007ffb`eec93ae5 VCRUNTIME140_1!__FrameHandler4::FrameUnwindToState+0x241 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp @ 1085]
|
---|
117 | 05 00000041`cadfdc00 00007ffb`eec92258 VCRUNTIME140_1!__FrameHandler4::FrameUnwindToEmptyState+0x2d [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\risctrnsctrl.cpp @ 218]
|
---|
118 | 06 00000041`cadfdc30 00007ffb`eec940e9 VCRUNTIME140_1!__InternalCxxFrameHandler<__FrameHandler4>+0x194 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp @ 304]
|
---|
119 | 07 00000041`cadfdcd0 00007ffc`5f9f249f VCRUNTIME140_1!__CxxFrameHandler4+0xa9 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\risctrnsctrl.cpp @ 290]
|
---|
120 | 08 00000041`cadfdd40 00007ffc`5f980939 ntdll!RtlpExecuteHandlerForUnwind+0xf
|
---|
121 | 09 00000041`cadfdd70 00007ffc`5f9a0edd ntdll!RtlUnwindEx+0x339
|
---|
122 | 0a 00000041`cadfe490 00007ffc`57aff976 ntdll!RtlUnwind+0xcd
|
---|
123 | 0b 00000041`cadfea00 00007ffb`e1b5de01 VCRUNTIME140!__longjmp_internal+0xe6 [d:\agent\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\longjmp.asm @ 140]
|
---|
124 | 0c (Inline Function) --------`-------- VBoxVMM!iemOpcodeGetNextU8SlowJmp+0x95 [L:\vbox-intern\src\VBox\VMM\VMMAll\IEMAll.cpp @ 1155]
|
---|
125 | 0d 00000041`cadfea50 00007ffb`e1b60f6b VBoxVMM!iemOpcodeGetNextU8Jmp+0xc1 [L:\vbox-intern\src\VBox\VMM\include\IEMInline.h @ 402]
|
---|
126 | 0e 00000041`cadfea90 00007ffb`e1cc6201 VBoxVMM!IEMExecForExits+0xdb [L:\vbox-intern\src\VBox\VMM\VMMAll\IEMAll.cpp @ 10185]
|
---|
127 | 0f 00000041`cadfec70 00007ffb`e1d0df8d VBoxVMM!EMHistoryExec+0x4f1 [L:\vbox-intern\src\VBox\VMM\VMMAll\EMAll.cpp @ 452]
|
---|
128 | 10 00000041`cadfed60 00007ffb`e1d0d4c0 VBoxVMM!nemR3WinHandleExitCpuId+0x79d [L:\vbox-intern\src\VBox\VMM\VMMAll\NEMAllNativeTemplate-win.cpp.h @ 1829] @encode
|
---|
129 | @endcode
|
---|
130 | *
|
---|
131 | * @see https://developercommunity.visualstudio.com/t/fragile-behavior-of-longjmp-called-from-noexcept-f/1532859
|
---|
132 | */
|
---|
133 | #if defined(IEM_WITH_SETJMP) && (defined(_MSC_VER) || defined(IEM_WITH_THROW_CATCH))
|
---|
134 | # define IEM_NOEXCEPT_MAY_LONGJMP RT_NOEXCEPT_EX(false)
|
---|
135 | #else
|
---|
136 | # define IEM_NOEXCEPT_MAY_LONGJMP RT_NOEXCEPT
|
---|
137 | #endif
|
---|
138 |
|
---|
139 | #define IEM_IMPLEMENTS_TASKSWITCH
|
---|
140 |
|
---|
141 | /** @def IEM_WITH_3DNOW
|
---|
142 | * Includes the 3DNow decoding. */
|
---|
143 | #if (!defined(IEM_WITH_3DNOW) && !defined(IEM_WITHOUT_3DNOW)) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */
|
---|
144 | # define IEM_WITH_3DNOW
|
---|
145 | #endif
|
---|
146 |
|
---|
147 | /** @def IEM_WITH_THREE_0F_38
|
---|
148 | * Includes the three byte opcode map for instrs starting with 0x0f 0x38. */
|
---|
149 | #if (!defined(IEM_WITH_THREE_0F_38) && !defined(IEM_WITHOUT_THREE_0F_38)) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */
|
---|
150 | # define IEM_WITH_THREE_0F_38
|
---|
151 | #endif
|
---|
152 |
|
---|
153 | /** @def IEM_WITH_THREE_0F_3A
|
---|
154 | * Includes the three byte opcode map for instrs starting with 0x0f 0x38. */
|
---|
155 | #if (!defined(IEM_WITH_THREE_0F_3A) && !defined(IEM_WITHOUT_THREE_0F_3A)) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */
|
---|
156 | # define IEM_WITH_THREE_0F_3A
|
---|
157 | #endif
|
---|
158 |
|
---|
159 | /** @def IEM_WITH_VEX
|
---|
160 | * Includes the VEX decoding. */
|
---|
161 | #if (!defined(IEM_WITH_VEX) && !defined(IEM_WITHOUT_VEX)) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */
|
---|
162 | # define IEM_WITH_VEX
|
---|
163 | #endif
|
---|
164 |
|
---|
165 | /** @def IEM_CFG_TARGET_CPU
|
---|
166 | * The minimum target CPU for the IEM emulation (IEMTARGETCPU_XXX value).
|
---|
167 | *
|
---|
168 | * By default we allow this to be configured by the user via the
|
---|
169 | * CPUM/GuestCpuName config string, but this comes at a slight cost during
|
---|
170 | * decoding. So, for applications of this code where there is no need to
|
---|
171 | * be dynamic wrt target CPU, just modify this define.
|
---|
172 | */
|
---|
173 | #if !defined(IEM_CFG_TARGET_CPU) || defined(DOXYGEN_RUNNING)
|
---|
174 | # define IEM_CFG_TARGET_CPU IEMTARGETCPU_DYNAMIC
|
---|
175 | #endif
|
---|
176 |
|
---|
177 | //#define IEM_WITH_CODE_TLB // - work in progress
|
---|
178 | //#define IEM_WITH_DATA_TLB // - work in progress
|
---|
179 |
|
---|
180 |
|
---|
181 | /** @def IEM_USE_UNALIGNED_DATA_ACCESS
|
---|
182 | * Use unaligned accesses instead of elaborate byte assembly. */
|
---|
183 | #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) || defined(DOXYGEN_RUNNING)
|
---|
184 | # define IEM_USE_UNALIGNED_DATA_ACCESS
|
---|
185 | #endif
|
---|
186 |
|
---|
187 | //#define IEM_LOG_MEMORY_WRITES
|
---|
188 |
|
---|
189 | #if !defined(IN_TSTVMSTRUCT) && !defined(DOXYGEN_RUNNING)
|
---|
190 | /** Instruction statistics. */
|
---|
191 | typedef struct IEMINSTRSTATS
|
---|
192 | {
|
---|
193 | # define IEM_DO_INSTR_STAT(a_Name, a_szDesc) uint32_t a_Name;
|
---|
194 | # include "IEMInstructionStatisticsTmpl.h"
|
---|
195 | # undef IEM_DO_INSTR_STAT
|
---|
196 | } IEMINSTRSTATS;
|
---|
197 | #else
|
---|
198 | struct IEMINSTRSTATS;
|
---|
199 | typedef struct IEMINSTRSTATS IEMINSTRSTATS;
|
---|
200 | #endif
|
---|
201 | /** Pointer to IEM instruction statistics. */
|
---|
202 | typedef IEMINSTRSTATS *PIEMINSTRSTATS;
|
---|
203 |
|
---|
204 |
|
---|
205 | /** @name IEMTARGETCPU_EFL_BEHAVIOR_XXX - IEMCPU::aidxTargetCpuEflFlavour
|
---|
206 | * @{ */
|
---|
207 | #define IEMTARGETCPU_EFL_BEHAVIOR_NATIVE 0 /**< Native x86 EFLAGS result; Intel EFLAGS when on non-x86 hosts. */
|
---|
208 | #define IEMTARGETCPU_EFL_BEHAVIOR_INTEL 1 /**< Intel EFLAGS result. */
|
---|
209 | #define IEMTARGETCPU_EFL_BEHAVIOR_AMD 2 /**< AMD EFLAGS result */
|
---|
210 | #define IEMTARGETCPU_EFL_BEHAVIOR_RESERVED 3 /**< Reserved/dummy entry slot that's the same as 0. */
|
---|
211 | #define IEMTARGETCPU_EFL_BEHAVIOR_MASK 3 /**< For masking the index before use. */
|
---|
212 | /** Selects the right variant from a_aArray.
|
---|
213 | * pVCpu is implicit in the caller context. */
|
---|
214 | #define IEMTARGETCPU_EFL_BEHAVIOR_SELECT(a_aArray) \
|
---|
215 | (a_aArray[pVCpu->iem.s.aidxTargetCpuEflFlavour[1] & IEMTARGETCPU_EFL_BEHAVIOR_MASK])
|
---|
216 | /** Variation of IEMTARGETCPU_EFL_BEHAVIOR_SELECT for when no native worker can
|
---|
217 | * be used because the host CPU does not support the operation. */
|
---|
218 | #define IEMTARGETCPU_EFL_BEHAVIOR_SELECT_NON_NATIVE(a_aArray) \
|
---|
219 | (a_aArray[pVCpu->iem.s.aidxTargetCpuEflFlavour[0] & IEMTARGETCPU_EFL_BEHAVIOR_MASK])
|
---|
220 | /** Variation of IEMTARGETCPU_EFL_BEHAVIOR_SELECT for a two dimentional
|
---|
221 | * array paralleling IEMCPU::aidxTargetCpuEflFlavour and a single bit index
|
---|
222 | * into the two.
|
---|
223 | * @sa IEM_SELECT_NATIVE_OR_FALLBACK */
|
---|
224 | #if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
|
---|
225 | # define IEMTARGETCPU_EFL_BEHAVIOR_SELECT_EX(a_aaArray, a_fNative) \
|
---|
226 | (a_aaArray[a_fNative][pVCpu->iem.s.aidxTargetCpuEflFlavour[a_fNative] & IEMTARGETCPU_EFL_BEHAVIOR_MASK])
|
---|
227 | #else
|
---|
228 | # define IEMTARGETCPU_EFL_BEHAVIOR_SELECT_EX(a_aaArray, a_fNative) \
|
---|
229 | (a_aaArray[0][pVCpu->iem.s.aidxTargetCpuEflFlavour[0] & IEMTARGETCPU_EFL_BEHAVIOR_MASK])
|
---|
230 | #endif
|
---|
231 | /** @} */
|
---|
232 |
|
---|
233 | /**
|
---|
234 | * Picks @a a_pfnNative or @a a_pfnFallback according to the host CPU feature
|
---|
235 | * indicator given by @a a_fCpumFeatureMember (CPUMFEATURES member).
|
---|
236 | *
|
---|
237 | * On non-x86 hosts, this will shortcut to the fallback w/o checking the
|
---|
238 | * indicator.
|
---|
239 | *
|
---|
240 | * @sa IEMTARGETCPU_EFL_BEHAVIOR_SELECT_EX
|
---|
241 | */
|
---|
242 | #if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && !defined(IEM_WITHOUT_ASSEMBLY)
|
---|
243 | # define IEM_SELECT_HOST_OR_FALLBACK(a_fCpumFeatureMember, a_pfnNative, a_pfnFallback) \
|
---|
244 | (g_CpumHostFeatures.s.a_fCpumFeatureMember ? a_pfnNative : a_pfnFallback)
|
---|
245 | #else
|
---|
246 | # define IEM_SELECT_HOST_OR_FALLBACK(a_fCpumFeatureMember, a_pfnNative, a_pfnFallback) (a_pfnFallback)
|
---|
247 | #endif
|
---|
248 |
|
---|
249 |
|
---|
250 | /**
|
---|
251 | * Extended operand mode that includes a representation of 8-bit.
|
---|
252 | *
|
---|
253 | * This is used for packing down modes when invoking some C instruction
|
---|
254 | * implementations.
|
---|
255 | */
|
---|
256 | typedef enum IEMMODEX
|
---|
257 | {
|
---|
258 | IEMMODEX_16BIT = IEMMODE_16BIT,
|
---|
259 | IEMMODEX_32BIT = IEMMODE_32BIT,
|
---|
260 | IEMMODEX_64BIT = IEMMODE_64BIT,
|
---|
261 | IEMMODEX_8BIT
|
---|
262 | } IEMMODEX;
|
---|
263 | AssertCompileSize(IEMMODEX, 4);
|
---|
264 |
|
---|
265 |
|
---|
266 | /**
|
---|
267 | * Branch types.
|
---|
268 | */
|
---|
269 | typedef enum IEMBRANCH
|
---|
270 | {
|
---|
271 | IEMBRANCH_JUMP = 1,
|
---|
272 | IEMBRANCH_CALL,
|
---|
273 | IEMBRANCH_TRAP,
|
---|
274 | IEMBRANCH_SOFTWARE_INT,
|
---|
275 | IEMBRANCH_HARDWARE_INT
|
---|
276 | } IEMBRANCH;
|
---|
277 | AssertCompileSize(IEMBRANCH, 4);
|
---|
278 |
|
---|
279 |
|
---|
280 | /**
|
---|
281 | * INT instruction types.
|
---|
282 | */
|
---|
283 | typedef enum IEMINT
|
---|
284 | {
|
---|
285 | /** INT n instruction (opcode 0xcd imm). */
|
---|
286 | IEMINT_INTN = 0,
|
---|
287 | /** Single byte INT3 instruction (opcode 0xcc). */
|
---|
288 | IEMINT_INT3 = IEM_XCPT_FLAGS_BP_INSTR,
|
---|
289 | /** Single byte INTO instruction (opcode 0xce). */
|
---|
290 | IEMINT_INTO = IEM_XCPT_FLAGS_OF_INSTR,
|
---|
291 | /** Single byte INT1 (ICEBP) instruction (opcode 0xf1). */
|
---|
292 | IEMINT_INT1 = IEM_XCPT_FLAGS_ICEBP_INSTR
|
---|
293 | } IEMINT;
|
---|
294 | AssertCompileSize(IEMINT, 4);
|
---|
295 |
|
---|
296 |
|
---|
297 | /**
|
---|
298 | * A FPU result.
|
---|
299 | */
|
---|
300 | typedef struct IEMFPURESULT
|
---|
301 | {
|
---|
302 | /** The output value. */
|
---|
303 | RTFLOAT80U r80Result;
|
---|
304 | /** The output status. */
|
---|
305 | uint16_t FSW;
|
---|
306 | } IEMFPURESULT;
|
---|
307 | AssertCompileMemberOffset(IEMFPURESULT, FSW, 10);
|
---|
308 | /** Pointer to a FPU result. */
|
---|
309 | typedef IEMFPURESULT *PIEMFPURESULT;
|
---|
310 | /** Pointer to a const FPU result. */
|
---|
311 | typedef IEMFPURESULT const *PCIEMFPURESULT;
|
---|
312 |
|
---|
313 |
|
---|
314 | /**
|
---|
315 | * A FPU result consisting of two output values and FSW.
|
---|
316 | */
|
---|
317 | typedef struct IEMFPURESULTTWO
|
---|
318 | {
|
---|
319 | /** The first output value. */
|
---|
320 | RTFLOAT80U r80Result1;
|
---|
321 | /** The output status. */
|
---|
322 | uint16_t FSW;
|
---|
323 | /** The second output value. */
|
---|
324 | RTFLOAT80U r80Result2;
|
---|
325 | } IEMFPURESULTTWO;
|
---|
326 | AssertCompileMemberOffset(IEMFPURESULTTWO, FSW, 10);
|
---|
327 | AssertCompileMemberOffset(IEMFPURESULTTWO, r80Result2, 12);
|
---|
328 | /** Pointer to a FPU result consisting of two output values and FSW. */
|
---|
329 | typedef IEMFPURESULTTWO *PIEMFPURESULTTWO;
|
---|
330 | /** Pointer to a const FPU result consisting of two output values and FSW. */
|
---|
331 | typedef IEMFPURESULTTWO const *PCIEMFPURESULTTWO;
|
---|
332 |
|
---|
333 |
|
---|
334 | /**
|
---|
335 | * IEM TLB entry.
|
---|
336 | *
|
---|
337 | * Lookup assembly:
|
---|
338 | * @code{.asm}
|
---|
339 | ; Calculate tag.
|
---|
340 | mov rax, [VA]
|
---|
341 | shl rax, 16
|
---|
342 | shr rax, 16 + X86_PAGE_SHIFT
|
---|
343 | or rax, [uTlbRevision]
|
---|
344 |
|
---|
345 | ; Do indexing.
|
---|
346 | movzx ecx, al
|
---|
347 | lea rcx, [pTlbEntries + rcx]
|
---|
348 |
|
---|
349 | ; Check tag.
|
---|
350 | cmp [rcx + IEMTLBENTRY.uTag], rax
|
---|
351 | jne .TlbMiss
|
---|
352 |
|
---|
353 | ; Check access.
|
---|
354 | mov rax, ACCESS_FLAGS | MAPPING_R3_NOT_VALID | 0xffffff00
|
---|
355 | and rax, [rcx + IEMTLBENTRY.fFlagsAndPhysRev]
|
---|
356 | cmp rax, [uTlbPhysRev]
|
---|
357 | jne .TlbMiss
|
---|
358 |
|
---|
359 | ; Calc address and we're done.
|
---|
360 | mov eax, X86_PAGE_OFFSET_MASK
|
---|
361 | and eax, [VA]
|
---|
362 | or rax, [rcx + IEMTLBENTRY.pMappingR3]
|
---|
363 | %ifdef VBOX_WITH_STATISTICS
|
---|
364 | inc qword [cTlbHits]
|
---|
365 | %endif
|
---|
366 | jmp .Done
|
---|
367 |
|
---|
368 | .TlbMiss:
|
---|
369 | mov r8d, ACCESS_FLAGS
|
---|
370 | mov rdx, [VA]
|
---|
371 | mov rcx, [pVCpu]
|
---|
372 | call iemTlbTypeMiss
|
---|
373 | .Done:
|
---|
374 |
|
---|
375 | @endcode
|
---|
376 | *
|
---|
377 | */
|
---|
378 | typedef struct IEMTLBENTRY
|
---|
379 | {
|
---|
380 | /** The TLB entry tag.
|
---|
381 | * Bits 35 thru 0 are made up of the virtual address shifted right 12 bits, this
|
---|
382 | * is ASSUMING a virtual address width of 48 bits.
|
---|
383 | *
|
---|
384 | * Bits 63 thru 36 are made up of the TLB revision (zero means invalid).
|
---|
385 | *
|
---|
386 | * The TLB lookup code uses the current TLB revision, which won't ever be zero,
|
---|
387 | * enabling an extremely cheap TLB invalidation most of the time. When the TLB
|
---|
388 | * revision wraps around though, the tags needs to be zeroed.
|
---|
389 | *
|
---|
390 | * @note Try use SHRD instruction? After seeing
|
---|
391 | * https://gmplib.org/~tege/x86-timing.pdf, maybe not.
|
---|
392 | *
|
---|
393 | * @todo This will need to be reorganized for 57-bit wide virtual address and
|
---|
394 | * PCID (currently 12 bits) and ASID (currently 6 bits) support. We'll
|
---|
395 | * have to move the TLB entry versioning entirely to the
|
---|
396 | * fFlagsAndPhysRev member then, 57 bit wide VAs means we'll only have
|
---|
397 | * 19 bits left (64 - 57 + 12 = 19) and they'll almost entire be
|
---|
398 | * consumed by PCID and ASID (12 + 6 = 18).
|
---|
399 | */
|
---|
400 | uint64_t uTag;
|
---|
401 | /** Access flags and physical TLB revision.
|
---|
402 | *
|
---|
403 | * - Bit 0 - page tables - not executable (X86_PTE_PAE_NX).
|
---|
404 | * - Bit 1 - page tables - not writable (complemented X86_PTE_RW).
|
---|
405 | * - Bit 2 - page tables - not user (complemented X86_PTE_US).
|
---|
406 | * - Bit 3 - pgm phys/virt - not directly writable.
|
---|
407 | * - Bit 4 - pgm phys page - not directly readable.
|
---|
408 | * - Bit 5 - page tables - not accessed (complemented X86_PTE_A).
|
---|
409 | * - Bit 6 - page tables - not dirty (complemented X86_PTE_D).
|
---|
410 | * - Bit 7 - tlb entry - pMappingR3 member not valid.
|
---|
411 | * - Bits 63 thru 8 are used for the physical TLB revision number.
|
---|
412 | *
|
---|
413 | * We're using complemented bit meanings here because it makes it easy to check
|
---|
414 | * whether special action is required. For instance a user mode write access
|
---|
415 | * would do a "TEST fFlags, (X86_PTE_RW | X86_PTE_US | X86_PTE_D)" and a
|
---|
416 | * non-zero result would mean special handling needed because either it wasn't
|
---|
417 | * writable, or it wasn't user, or the page wasn't dirty. A user mode read
|
---|
418 | * access would do "TEST fFlags, X86_PTE_US"; and a kernel mode read wouldn't
|
---|
419 | * need to check any PTE flag.
|
---|
420 | */
|
---|
421 | uint64_t fFlagsAndPhysRev;
|
---|
422 | /** The guest physical page address. */
|
---|
423 | uint64_t GCPhys;
|
---|
424 | /** Pointer to the ring-3 mapping. */
|
---|
425 | R3PTRTYPE(uint8_t *) pbMappingR3;
|
---|
426 | #if HC_ARCH_BITS == 32
|
---|
427 | uint32_t u32Padding1;
|
---|
428 | #endif
|
---|
429 | } IEMTLBENTRY;
|
---|
430 | AssertCompileSize(IEMTLBENTRY, 32);
|
---|
431 | /** Pointer to an IEM TLB entry. */
|
---|
432 | typedef IEMTLBENTRY *PIEMTLBENTRY;
|
---|
433 |
|
---|
434 | /** @name IEMTLBE_F_XXX - TLB entry flags (IEMTLBENTRY::fFlagsAndPhysRev)
|
---|
435 | * @{ */
|
---|
436 | #define IEMTLBE_F_PT_NO_EXEC RT_BIT_64(0) /**< Page tables: Not executable. */
|
---|
437 | #define IEMTLBE_F_PT_NO_WRITE RT_BIT_64(1) /**< Page tables: Not writable. */
|
---|
438 | #define IEMTLBE_F_PT_NO_USER RT_BIT_64(2) /**< Page tables: Not user accessible (supervisor only). */
|
---|
439 | #define IEMTLBE_F_PG_NO_WRITE RT_BIT_64(3) /**< Phys page: Not writable (access handler, ROM, whatever). */
|
---|
440 | #define IEMTLBE_F_PG_NO_READ RT_BIT_64(4) /**< Phys page: Not readable (MMIO / access handler, ROM) */
|
---|
441 | #define IEMTLBE_F_PT_NO_ACCESSED RT_BIT_64(5) /**< Phys tables: Not accessed (need to be marked accessed). */
|
---|
442 | #define IEMTLBE_F_PT_NO_DIRTY RT_BIT_64(6) /**< Page tables: Not dirty (needs to be made dirty on write). */
|
---|
443 | #define IEMTLBE_F_NO_MAPPINGR3 RT_BIT_64(7) /**< TLB entry: The IEMTLBENTRY::pMappingR3 member is invalid. */
|
---|
444 | #define IEMTLBE_F_PG_UNASSIGNED RT_BIT_64(8) /**< Phys page: Unassigned memory (not RAM, ROM, MMIO2 or MMIO). */
|
---|
445 | #define IEMTLBE_F_PG_CODE_PAGE RT_BIT_64(9) /**< Phys page: Code page. */
|
---|
446 | #define IEMTLBE_F_PHYS_REV UINT64_C(0xfffffffffffffc00) /**< Physical revision mask. @sa IEMTLB_PHYS_REV_INCR */
|
---|
447 | /** @} */
|
---|
448 |
|
---|
449 |
|
---|
450 | /**
|
---|
451 | * An IEM TLB.
|
---|
452 | *
|
---|
453 | * We've got two of these, one for data and one for instructions.
|
---|
454 | */
|
---|
455 | typedef struct IEMTLB
|
---|
456 | {
|
---|
457 | /** The TLB entries.
|
---|
458 | * We've choosen 256 because that way we can obtain the result directly from a
|
---|
459 | * 8-bit register without an additional AND instruction. */
|
---|
460 | IEMTLBENTRY aEntries[256];
|
---|
461 | /** The TLB revision.
|
---|
462 | * This is actually only 28 bits wide (see IEMTLBENTRY::uTag) and is incremented
|
---|
463 | * by adding RT_BIT_64(36) to it. When it wraps around and becomes zero, all
|
---|
464 | * the tags in the TLB must be zeroed and the revision set to RT_BIT_64(36).
|
---|
465 | * (The revision zero indicates an invalid TLB entry.)
|
---|
466 | *
|
---|
467 | * The initial value is choosen to cause an early wraparound. */
|
---|
468 | uint64_t uTlbRevision;
|
---|
469 | /** The TLB physical address revision - shadow of PGM variable.
|
---|
470 | *
|
---|
471 | * This is actually only 56 bits wide (see IEMTLBENTRY::fFlagsAndPhysRev) and is
|
---|
472 | * incremented by adding RT_BIT_64(8). When it wraps around and becomes zero,
|
---|
473 | * a rendezvous is called and each CPU wipe the IEMTLBENTRY::pMappingR3 as well
|
---|
474 | * as IEMTLBENTRY::fFlagsAndPhysRev bits 63 thru 8, 4, and 3.
|
---|
475 | *
|
---|
476 | * The initial value is choosen to cause an early wraparound. */
|
---|
477 | uint64_t volatile uTlbPhysRev;
|
---|
478 |
|
---|
479 | /* Statistics: */
|
---|
480 |
|
---|
481 | /** TLB hits (VBOX_WITH_STATISTICS only). */
|
---|
482 | uint64_t cTlbHits;
|
---|
483 | /** TLB misses. */
|
---|
484 | uint32_t cTlbMisses;
|
---|
485 | /** Slow read path. */
|
---|
486 | uint32_t cTlbSlowReadPath;
|
---|
487 | /** Safe read path. */
|
---|
488 | uint32_t cTlbSafeReadPath;
|
---|
489 | /** Safe write path. */
|
---|
490 | uint32_t cTlbSafeWritePath;
|
---|
491 | #if 0
|
---|
492 | /** TLB misses because of tag mismatch. */
|
---|
493 | uint32_t cTlbMissesTag;
|
---|
494 | /** TLB misses because of virtual access violation. */
|
---|
495 | uint32_t cTlbMissesVirtAccess;
|
---|
496 | /** TLB misses because of dirty bit. */
|
---|
497 | uint32_t cTlbMissesDirty;
|
---|
498 | /** TLB misses because of MMIO */
|
---|
499 | uint32_t cTlbMissesMmio;
|
---|
500 | /** TLB misses because of write access handlers. */
|
---|
501 | uint32_t cTlbMissesWriteHandler;
|
---|
502 | /** TLB misses because no r3(/r0) mapping. */
|
---|
503 | uint32_t cTlbMissesMapping;
|
---|
504 | #endif
|
---|
505 | /** Alignment padding. */
|
---|
506 | uint32_t au32Padding[6];
|
---|
507 | } IEMTLB;
|
---|
508 | AssertCompileSizeAlignment(IEMTLB, 64);
|
---|
509 | /** IEMTLB::uTlbRevision increment. */
|
---|
510 | #define IEMTLB_REVISION_INCR RT_BIT_64(36)
|
---|
511 | /** IEMTLB::uTlbRevision mask. */
|
---|
512 | #define IEMTLB_REVISION_MASK (~(RT_BIT_64(36) - 1))
|
---|
513 | /** IEMTLB::uTlbPhysRev increment.
|
---|
514 | * @sa IEMTLBE_F_PHYS_REV */
|
---|
515 | #define IEMTLB_PHYS_REV_INCR RT_BIT_64(10)
|
---|
516 | /**
|
---|
517 | * Calculates the TLB tag for a virtual address.
|
---|
518 | * @returns Tag value for indexing and comparing with IEMTLB::uTag.
|
---|
519 | * @param a_pTlb The TLB.
|
---|
520 | * @param a_GCPtr The virtual address. Must be RTGCPTR or same size or
|
---|
521 | * the clearing of the top 16 bits won't work (if 32-bit
|
---|
522 | * we'll end up with mostly zeros).
|
---|
523 | */
|
---|
524 | #define IEMTLB_CALC_TAG(a_pTlb, a_GCPtr) ( IEMTLB_CALC_TAG_NO_REV(a_GCPtr) | (a_pTlb)->uTlbRevision )
|
---|
525 | /**
|
---|
526 | * Calculates the TLB tag for a virtual address but without TLB revision.
|
---|
527 | * @returns Tag value for indexing and comparing with IEMTLB::uTag.
|
---|
528 | * @param a_GCPtr The virtual address. Must be RTGCPTR or same size or
|
---|
529 | * the clearing of the top 16 bits won't work (if 32-bit
|
---|
530 | * we'll end up with mostly zeros).
|
---|
531 | */
|
---|
532 | #define IEMTLB_CALC_TAG_NO_REV(a_GCPtr) ( (((a_GCPtr) << 16) >> (GUEST_PAGE_SHIFT + 16)) )
|
---|
533 | /**
|
---|
534 | * Converts a TLB tag value into a TLB index.
|
---|
535 | * @returns Index into IEMTLB::aEntries.
|
---|
536 | * @param a_uTag Value returned by IEMTLB_CALC_TAG.
|
---|
537 | */
|
---|
538 | #define IEMTLB_TAG_TO_INDEX(a_uTag) ( (uint8_t)(a_uTag) )
|
---|
539 | /**
|
---|
540 | * Converts a TLB tag value into a TLB index.
|
---|
541 | * @returns Index into IEMTLB::aEntries.
|
---|
542 | * @param a_pTlb The TLB.
|
---|
543 | * @param a_uTag Value returned by IEMTLB_CALC_TAG.
|
---|
544 | */
|
---|
545 | #define IEMTLB_TAG_TO_ENTRY(a_pTlb, a_uTag) ( &(a_pTlb)->aEntries[IEMTLB_TAG_TO_INDEX(a_uTag)] )
|
---|
546 |
|
---|
547 |
|
---|
548 | /** @name IEM_MC_F_XXX - MC block flags/clues.
|
---|
549 | * @todo Merge with IEM_CIMPL_F_XXX
|
---|
550 | * @{ */
|
---|
551 | #define IEM_MC_F_ONLY_8086 RT_BIT_32(0)
|
---|
552 | #define IEM_MC_F_MIN_186 RT_BIT_32(1)
|
---|
553 | #define IEM_MC_F_MIN_286 RT_BIT_32(2)
|
---|
554 | #define IEM_MC_F_NOT_286_OR_OLDER IEM_MC_F_MIN_386
|
---|
555 | #define IEM_MC_F_MIN_386 RT_BIT_32(3)
|
---|
556 | #define IEM_MC_F_MIN_486 RT_BIT_32(4)
|
---|
557 | #define IEM_MC_F_MIN_PENTIUM RT_BIT_32(5)
|
---|
558 | #define IEM_MC_F_MIN_PENTIUM_II IEM_MC_F_MIN_PENTIUM
|
---|
559 | #define IEM_MC_F_MIN_CORE IEM_MC_F_MIN_PENTIUM
|
---|
560 | #define IEM_MC_F_64BIT RT_BIT_32(6)
|
---|
561 | #define IEM_MC_F_NOT_64BIT RT_BIT_32(7)
|
---|
562 | /** This is set by IEMAllN8vePython.py to indicate a variation without the
|
---|
563 | * flags-clearing-and-checking, when there is also a variation with that.
|
---|
564 | * @note Do not use this manully, it's only for python and for testing in
|
---|
565 | * the native recompiler! */
|
---|
566 | #define IEM_MC_F_WITHOUT_FLAGS RT_BIT_32(8)
|
---|
567 | /** @} */
|
---|
568 |
|
---|
569 | /** @name IEM_CIMPL_F_XXX - State change clues for CIMPL calls.
|
---|
570 | *
|
---|
571 | * These clues are mainly for the recompiler, so that it can emit correct code.
|
---|
572 | *
|
---|
573 | * They are processed by the python script and which also automatically
|
---|
574 | * calculates flags for MC blocks based on the statements, extending the use of
|
---|
575 | * these flags to describe MC block behavior to the recompiler core. The python
|
---|
576 | * script pass the flags to the IEM_MC2_END_EMIT_CALLS macro, but mainly for
|
---|
577 | * error checking purposes. The script emits the necessary fEndTb = true and
|
---|
578 | * similar statements as this reduces compile time a tiny bit.
|
---|
579 | *
|
---|
580 | * @{ */
|
---|
581 | /** Flag set if direct branch, clear if absolute or indirect. */
|
---|
582 | #define IEM_CIMPL_F_BRANCH_DIRECT RT_BIT_32(0)
|
---|
583 | /** Flag set if indirect branch, clear if direct or relative.
|
---|
584 | * This is also used for all system control transfers (SYSCALL, SYSRET, INT, ++)
|
---|
585 | * as well as for return instructions (RET, IRET, RETF). */
|
---|
586 | #define IEM_CIMPL_F_BRANCH_INDIRECT RT_BIT_32(1)
|
---|
587 | /** Flag set if relative branch, clear if absolute or indirect. */
|
---|
588 | #define IEM_CIMPL_F_BRANCH_RELATIVE RT_BIT_32(2)
|
---|
589 | /** Flag set if conditional branch, clear if unconditional. */
|
---|
590 | #define IEM_CIMPL_F_BRANCH_CONDITIONAL RT_BIT_32(3)
|
---|
591 | /** Flag set if it's a far branch (changes CS). */
|
---|
592 | #define IEM_CIMPL_F_BRANCH_FAR RT_BIT_32(4)
|
---|
593 | /** Convenience: Testing any kind of branch. */
|
---|
594 | #define IEM_CIMPL_F_BRANCH_ANY (IEM_CIMPL_F_BRANCH_DIRECT | IEM_CIMPL_F_BRANCH_INDIRECT | IEM_CIMPL_F_BRANCH_RELATIVE)
|
---|
595 |
|
---|
596 | /** Execution flags may change (IEMCPU::fExec). */
|
---|
597 | #define IEM_CIMPL_F_MODE RT_BIT_32(5)
|
---|
598 | /** May change significant portions of RFLAGS. */
|
---|
599 | #define IEM_CIMPL_F_RFLAGS RT_BIT_32(6)
|
---|
600 | /** May change the status bits (X86_EFL_STATUS_BITS) in RFLAGS. */
|
---|
601 | #define IEM_CIMPL_F_STATUS_FLAGS RT_BIT_32(7)
|
---|
602 | /** May trigger interrupt shadowing. */
|
---|
603 | #define IEM_CIMPL_F_INHIBIT_SHADOW RT_BIT_32(8)
|
---|
604 | /** May enable interrupts, so recheck IRQ immediately afterwards executing
|
---|
605 | * the instruction. */
|
---|
606 | #define IEM_CIMPL_F_CHECK_IRQ_AFTER RT_BIT_32(9)
|
---|
607 | /** May disable interrupts, so recheck IRQ immediately before executing the
|
---|
608 | * instruction. */
|
---|
609 | #define IEM_CIMPL_F_CHECK_IRQ_BEFORE RT_BIT_32(10)
|
---|
610 | /** Convenience: Check for IRQ both before and after an instruction. */
|
---|
611 | #define IEM_CIMPL_F_CHECK_IRQ_BEFORE_AND_AFTER (IEM_CIMPL_F_CHECK_IRQ_BEFORE | IEM_CIMPL_F_CHECK_IRQ_AFTER)
|
---|
612 | /** May trigger a VM exit (treated like IEM_CIMPL_F_MODE atm). */
|
---|
613 | #define IEM_CIMPL_F_VMEXIT RT_BIT_32(11)
|
---|
614 | /** May modify FPU state.
|
---|
615 | * @todo Not sure if this is useful yet. */
|
---|
616 | #define IEM_CIMPL_F_FPU RT_BIT_32(12)
|
---|
617 | /** REP prefixed instruction which may yield before updating PC.
|
---|
618 | * @todo Not sure if this is useful, REP functions now return non-zero
|
---|
619 | * status if they don't update the PC. */
|
---|
620 | #define IEM_CIMPL_F_REP RT_BIT_32(13)
|
---|
621 | /** I/O instruction.
|
---|
622 | * @todo Not sure if this is useful yet. */
|
---|
623 | #define IEM_CIMPL_F_IO RT_BIT_32(14)
|
---|
624 | /** Force end of TB after the instruction. */
|
---|
625 | #define IEM_CIMPL_F_END_TB RT_BIT_32(15)
|
---|
626 | /** Flag set if a branch may also modify the stack (push/pop return address). */
|
---|
627 | #define IEM_CIMPL_F_BRANCH_STACK RT_BIT_32(16)
|
---|
628 | /** Flag set if a branch may also modify the stack (push/pop return address)
|
---|
629 | * and switch it (load/restore SS:RSP). */
|
---|
630 | #define IEM_CIMPL_F_BRANCH_STACK_FAR RT_BIT_32(17)
|
---|
631 | /** Convenience: Raise exception (technically unnecessary, since it shouldn't return VINF_SUCCESS). */
|
---|
632 | #define IEM_CIMPL_F_XCPT \
|
---|
633 | (IEM_CIMPL_F_BRANCH_INDIRECT | IEM_CIMPL_F_BRANCH_FAR | IEM_CIMPL_F_BRANCH_STACK_FAR \
|
---|
634 | | IEM_CIMPL_F_MODE | IEM_CIMPL_F_RFLAGS | IEM_CIMPL_F_VMEXIT)
|
---|
635 |
|
---|
636 | /** The block calls a C-implementation instruction function with two implicit arguments.
|
---|
637 | * Mutually exclusive with IEM_CIMPL_F_CALLS_AIMPL and
|
---|
638 | * IEM_CIMPL_F_CALLS_AIMPL_WITH_FXSTATE.
|
---|
639 | * @note The python scripts will add this is missing. */
|
---|
640 | #define IEM_CIMPL_F_CALLS_CIMPL RT_BIT_32(18)
|
---|
641 | /** The block calls an ASM-implementation instruction function.
|
---|
642 | * Mutually exclusive with IEM_CIMPL_F_CALLS_CIMPL and
|
---|
643 | * IEM_CIMPL_F_CALLS_AIMPL_WITH_FXSTATE.
|
---|
644 | * @note The python scripts will add this is missing. */
|
---|
645 | #define IEM_CIMPL_F_CALLS_AIMPL RT_BIT_32(19)
|
---|
646 | /** The block calls an ASM-implementation instruction function with an implicit
|
---|
647 | * X86FXSTATE pointer argument.
|
---|
648 | * Mutually exclusive with IEM_CIMPL_F_CALLS_CIMPL and IEM_CIMPL_F_CALLS_AIMPL.
|
---|
649 | * @note The python scripts will add this is missing. */
|
---|
650 | #define IEM_CIMPL_F_CALLS_AIMPL_WITH_FXSTATE RT_BIT_32(20)
|
---|
651 | /** @} */
|
---|
652 |
|
---|
653 |
|
---|
654 | /** @name IEM_F_XXX - Execution mode flags (IEMCPU::fExec, IEMTB::fFlags).
|
---|
655 | *
|
---|
656 | * These flags are set when entering IEM and adjusted as code is executed, such
|
---|
657 | * that they will always contain the current values as instructions are
|
---|
658 | * finished.
|
---|
659 | *
|
---|
660 | * In recompiled execution mode, (most of) these flags are included in the
|
---|
661 | * translation block selection key and stored in IEMTB::fFlags alongside the
|
---|
662 | * IEMTB_F_XXX flags. The latter flags uses bits 31 thru 24, which are all zero
|
---|
663 | * in IEMCPU::fExec.
|
---|
664 | *
|
---|
665 | * @{ */
|
---|
666 | /** Mode: The block target mode mask. */
|
---|
667 | #define IEM_F_MODE_MASK UINT32_C(0x0000001f)
|
---|
668 | /** Mode: The IEMMODE part of the IEMTB_F_MODE_MASK value. */
|
---|
669 | #define IEM_F_MODE_CPUMODE_MASK UINT32_C(0x00000003)
|
---|
670 | /** X86 Mode: Bit used to indicating pre-386 CPU in 16-bit mode (for eliminating
|
---|
671 | * conditional in EIP/IP updating), and flat wide open CS, SS, DS, and ES in
|
---|
672 | * 32-bit mode (for simplifying most memory accesses). */
|
---|
673 | #define IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK UINT32_C(0x00000004)
|
---|
674 | /** X86 Mode: Bit indicating protected mode, real mode (or SMM) when not set. */
|
---|
675 | #define IEM_F_MODE_X86_PROT_MASK UINT32_C(0x00000008)
|
---|
676 | /** X86 Mode: Bit used to indicate virtual 8086 mode (only 16-bit). */
|
---|
677 | #define IEM_F_MODE_X86_V86_MASK UINT32_C(0x00000010)
|
---|
678 |
|
---|
679 | /** X86 Mode: 16-bit on 386 or later. */
|
---|
680 | #define IEM_F_MODE_X86_16BIT UINT32_C(0x00000000)
|
---|
681 | /** X86 Mode: 80286, 80186 and 8086/88 targetting blocks (EIP update opt). */
|
---|
682 | #define IEM_F_MODE_X86_16BIT_PRE_386 UINT32_C(0x00000004)
|
---|
683 | /** X86 Mode: 16-bit protected mode on 386 or later. */
|
---|
684 | #define IEM_F_MODE_X86_16BIT_PROT UINT32_C(0x00000008)
|
---|
685 | /** X86 Mode: 16-bit protected mode on 386 or later. */
|
---|
686 | #define IEM_F_MODE_X86_16BIT_PROT_PRE_386 UINT32_C(0x0000000c)
|
---|
687 | /** X86 Mode: 16-bit virtual 8086 protected mode (on 386 or later). */
|
---|
688 | #define IEM_F_MODE_X86_16BIT_PROT_V86 UINT32_C(0x00000018)
|
---|
689 |
|
---|
690 | /** X86 Mode: 32-bit on 386 or later. */
|
---|
691 | #define IEM_F_MODE_X86_32BIT UINT32_C(0x00000001)
|
---|
692 | /** X86 Mode: 32-bit mode with wide open flat CS, SS, DS and ES. */
|
---|
693 | #define IEM_F_MODE_X86_32BIT_FLAT UINT32_C(0x00000005)
|
---|
694 | /** X86 Mode: 32-bit protected mode. */
|
---|
695 | #define IEM_F_MODE_X86_32BIT_PROT UINT32_C(0x00000009)
|
---|
696 | /** X86 Mode: 32-bit protected mode with wide open flat CS, SS, DS and ES. */
|
---|
697 | #define IEM_F_MODE_X86_32BIT_PROT_FLAT UINT32_C(0x0000000d)
|
---|
698 |
|
---|
699 | /** X86 Mode: 64-bit (includes protected, but not the flat bit). */
|
---|
700 | #define IEM_F_MODE_X86_64BIT UINT32_C(0x0000000a)
|
---|
701 |
|
---|
702 | /** X86 Mode: Checks if @a a_fExec represent a FLAT mode. */
|
---|
703 | #define IEM_F_MODE_X86_IS_FLAT(a_fExec) ( ((a_fExec) & IEM_F_MODE_MASK) == IEM_F_MODE_X86_64BIT \
|
---|
704 | || ((a_fExec) & IEM_F_MODE_MASK) == IEM_F_MODE_X86_32BIT_PROT_FLAT \
|
---|
705 | || ((a_fExec) & IEM_F_MODE_MASK) == IEM_F_MODE_X86_32BIT_FLAT)
|
---|
706 |
|
---|
707 | /** Bypass access handlers when set. */
|
---|
708 | #define IEM_F_BYPASS_HANDLERS UINT32_C(0x00010000)
|
---|
709 | /** Have pending hardware instruction breakpoints. */
|
---|
710 | #define IEM_F_PENDING_BRK_INSTR UINT32_C(0x00020000)
|
---|
711 | /** Have pending hardware data breakpoints. */
|
---|
712 | #define IEM_F_PENDING_BRK_DATA UINT32_C(0x00040000)
|
---|
713 |
|
---|
714 | /** X86: Have pending hardware I/O breakpoints. */
|
---|
715 | #define IEM_F_PENDING_BRK_X86_IO UINT32_C(0x00000400)
|
---|
716 | /** X86: Disregard the lock prefix (implied or not) when set. */
|
---|
717 | #define IEM_F_X86_DISREGARD_LOCK UINT32_C(0x00000800)
|
---|
718 |
|
---|
719 | /** Pending breakpoint mask (what iemCalcExecDbgFlags works out). */
|
---|
720 | #define IEM_F_PENDING_BRK_MASK (IEM_F_PENDING_BRK_INSTR | IEM_F_PENDING_BRK_DATA | IEM_F_PENDING_BRK_X86_IO)
|
---|
721 |
|
---|
722 | /** Caller configurable options. */
|
---|
723 | #define IEM_F_USER_OPTS (IEM_F_BYPASS_HANDLERS | IEM_F_X86_DISREGARD_LOCK)
|
---|
724 |
|
---|
725 | /** X86: The current protection level (CPL) shift factor. */
|
---|
726 | #define IEM_F_X86_CPL_SHIFT 8
|
---|
727 | /** X86: The current protection level (CPL) mask. */
|
---|
728 | #define IEM_F_X86_CPL_MASK UINT32_C(0x00000300)
|
---|
729 | /** X86: The current protection level (CPL) shifted mask. */
|
---|
730 | #define IEM_F_X86_CPL_SMASK UINT32_C(0x00000003)
|
---|
731 |
|
---|
732 | /** X86 execution context.
|
---|
733 | * The IEM_F_X86_CTX_XXX values are individual flags that can be combined (with
|
---|
734 | * the exception of IEM_F_X86_CTX_NORMAL). This allows running VMs from SMM
|
---|
735 | * mode. */
|
---|
736 | #define IEM_F_X86_CTX_MASK UINT32_C(0x0000f000)
|
---|
737 | /** X86 context: Plain regular execution context. */
|
---|
738 | #define IEM_F_X86_CTX_NORMAL UINT32_C(0x00000000)
|
---|
739 | /** X86 context: VT-x enabled. */
|
---|
740 | #define IEM_F_X86_CTX_VMX UINT32_C(0x00001000)
|
---|
741 | /** X86 context: AMD-V enabled. */
|
---|
742 | #define IEM_F_X86_CTX_SVM UINT32_C(0x00002000)
|
---|
743 | /** X86 context: In AMD-V or VT-x guest mode. */
|
---|
744 | #define IEM_F_X86_CTX_IN_GUEST UINT32_C(0x00004000)
|
---|
745 | /** X86 context: System management mode (SMM). */
|
---|
746 | #define IEM_F_X86_CTX_SMM UINT32_C(0x00008000)
|
---|
747 |
|
---|
748 | /** @todo Add TF+RF+INHIBIT indicator(s), so we can eliminate the conditional in
|
---|
749 | * iemRegFinishClearingRF() most for most situations (CPUMCTX_DBG_HIT_DRX_MASK
|
---|
750 | * and CPUMCTX_DBG_DBGF_MASK are covered by the IEM_F_PENDING_BRK_XXX bits
|
---|
751 | * alread). */
|
---|
752 |
|
---|
753 | /** @todo Add TF+RF+INHIBIT indicator(s), so we can eliminate the conditional in
|
---|
754 | * iemRegFinishClearingRF() most for most situations
|
---|
755 | * (CPUMCTX_DBG_HIT_DRX_MASK and CPUMCTX_DBG_DBGF_MASK are covered by
|
---|
756 | * the IEM_F_PENDING_BRK_XXX bits alread). */
|
---|
757 |
|
---|
758 | /** @} */
|
---|
759 |
|
---|
760 |
|
---|
761 | /** @name IEMTB_F_XXX - Translation block flags (IEMTB::fFlags).
|
---|
762 | *
|
---|
763 | * Extends the IEM_F_XXX flags (subject to IEMTB_F_IEM_F_MASK) to make up the
|
---|
764 | * translation block flags. The combined flag mask (subject to
|
---|
765 | * IEMTB_F_KEY_MASK) is used as part of the lookup key for translation blocks.
|
---|
766 | *
|
---|
767 | * @{ */
|
---|
768 | /** Mask of IEM_F_XXX flags included in IEMTB_F_XXX. */
|
---|
769 | #define IEMTB_F_IEM_F_MASK UINT32_C(0x00ffffff)
|
---|
770 |
|
---|
771 | /** Type: The block type mask. */
|
---|
772 | #define IEMTB_F_TYPE_MASK UINT32_C(0x03000000)
|
---|
773 | /** Type: Purly threaded recompiler (via tables). */
|
---|
774 | #define IEMTB_F_TYPE_THREADED UINT32_C(0x01000000)
|
---|
775 | /** Type: Native recompilation. */
|
---|
776 | #define IEMTB_F_TYPE_NATIVE UINT32_C(0x02000000)
|
---|
777 |
|
---|
778 | /** Set when we're starting the block in an "interrupt shadow".
|
---|
779 | * We don't need to distingish between the two types of this mask, thus the one.
|
---|
780 | * @see CPUMCTX_INHIBIT_SHADOW, CPUMIsInInterruptShadow() */
|
---|
781 | #define IEMTB_F_INHIBIT_SHADOW UINT32_C(0x04000000)
|
---|
782 | /** Set when we're currently inhibiting NMIs
|
---|
783 | * @see CPUMCTX_INHIBIT_NMI, CPUMAreInterruptsInhibitedByNmi() */
|
---|
784 | #define IEMTB_F_INHIBIT_NMI UINT32_C(0x08000000)
|
---|
785 |
|
---|
786 | /** Checks that EIP/IP is wihin CS.LIM before each instruction. Used when
|
---|
787 | * we're close the limit before starting a TB, as determined by
|
---|
788 | * iemGetTbFlagsForCurrentPc(). */
|
---|
789 | #define IEMTB_F_CS_LIM_CHECKS UINT32_C(0x10000000)
|
---|
790 |
|
---|
791 | /** Mask of the IEMTB_F_XXX flags that are part of the TB lookup key.
|
---|
792 | *
|
---|
793 | * @note We skip all of IEM_F_X86_CTX_MASK, with the exception of SMM (which we
|
---|
794 | * don't implement), because we don't currently generate any context
|
---|
795 | * specific code - that's all handled in CIMPL functions.
|
---|
796 | *
|
---|
797 | * For the threaded recompiler we don't generate any CPL specific code
|
---|
798 | * either, but the native recompiler does for memory access (saves getting
|
---|
799 | * the CPL from fExec and turning it into IEMTLBE_F_PT_NO_USER).
|
---|
800 | * Since most OSes will not share code between rings, this shouldn't
|
---|
801 | * have any real effect on TB/memory/recompiling load.
|
---|
802 | */
|
---|
803 | #define IEMTB_F_KEY_MASK ((UINT32_MAX & ~(IEM_F_X86_CTX_MASK | IEMTB_F_TYPE_MASK)) | IEM_F_X86_CTX_SMM)
|
---|
804 | /** @} */
|
---|
805 |
|
---|
806 | AssertCompile( (IEM_F_MODE_X86_16BIT & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_16BIT);
|
---|
807 | AssertCompile(!(IEM_F_MODE_X86_16BIT & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK));
|
---|
808 | AssertCompile(!(IEM_F_MODE_X86_16BIT & IEM_F_MODE_X86_PROT_MASK));
|
---|
809 | AssertCompile(!(IEM_F_MODE_X86_16BIT & IEM_F_MODE_X86_V86_MASK));
|
---|
810 | AssertCompile( (IEM_F_MODE_X86_16BIT_PRE_386 & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_16BIT);
|
---|
811 | AssertCompile( IEM_F_MODE_X86_16BIT_PRE_386 & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK);
|
---|
812 | AssertCompile(!(IEM_F_MODE_X86_16BIT_PRE_386 & IEM_F_MODE_X86_PROT_MASK));
|
---|
813 | AssertCompile(!(IEM_F_MODE_X86_16BIT_PRE_386 & IEM_F_MODE_X86_V86_MASK));
|
---|
814 | AssertCompile( (IEM_F_MODE_X86_16BIT_PROT & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_16BIT);
|
---|
815 | AssertCompile(!(IEM_F_MODE_X86_16BIT_PROT & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK));
|
---|
816 | AssertCompile( IEM_F_MODE_X86_16BIT_PROT & IEM_F_MODE_X86_PROT_MASK);
|
---|
817 | AssertCompile(!(IEM_F_MODE_X86_16BIT_PROT & IEM_F_MODE_X86_V86_MASK));
|
---|
818 | AssertCompile( (IEM_F_MODE_X86_16BIT_PROT_PRE_386 & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_16BIT);
|
---|
819 | AssertCompile( IEM_F_MODE_X86_16BIT_PROT_PRE_386 & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK);
|
---|
820 | AssertCompile( IEM_F_MODE_X86_16BIT_PROT_PRE_386 & IEM_F_MODE_X86_PROT_MASK);
|
---|
821 | AssertCompile(!(IEM_F_MODE_X86_16BIT_PROT_PRE_386 & IEM_F_MODE_X86_V86_MASK));
|
---|
822 | AssertCompile( IEM_F_MODE_X86_16BIT_PROT_V86 & IEM_F_MODE_X86_PROT_MASK);
|
---|
823 | AssertCompile(!(IEM_F_MODE_X86_16BIT_PROT_V86 & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK));
|
---|
824 | AssertCompile( IEM_F_MODE_X86_16BIT_PROT_V86 & IEM_F_MODE_X86_V86_MASK);
|
---|
825 |
|
---|
826 | AssertCompile( (IEM_F_MODE_X86_32BIT & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_32BIT);
|
---|
827 | AssertCompile(!(IEM_F_MODE_X86_32BIT & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK));
|
---|
828 | AssertCompile(!(IEM_F_MODE_X86_32BIT & IEM_F_MODE_X86_PROT_MASK));
|
---|
829 | AssertCompile( (IEM_F_MODE_X86_32BIT_FLAT & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_32BIT);
|
---|
830 | AssertCompile( IEM_F_MODE_X86_32BIT_FLAT & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK);
|
---|
831 | AssertCompile(!(IEM_F_MODE_X86_32BIT_FLAT & IEM_F_MODE_X86_PROT_MASK));
|
---|
832 | AssertCompile( (IEM_F_MODE_X86_32BIT_PROT & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_32BIT);
|
---|
833 | AssertCompile(!(IEM_F_MODE_X86_32BIT_PROT & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK));
|
---|
834 | AssertCompile( IEM_F_MODE_X86_32BIT_PROT & IEM_F_MODE_X86_PROT_MASK);
|
---|
835 | AssertCompile( (IEM_F_MODE_X86_32BIT_PROT_FLAT & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_32BIT);
|
---|
836 | AssertCompile( IEM_F_MODE_X86_32BIT_PROT_FLAT & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK);
|
---|
837 | AssertCompile( IEM_F_MODE_X86_32BIT_PROT_FLAT & IEM_F_MODE_X86_PROT_MASK);
|
---|
838 |
|
---|
839 | AssertCompile( (IEM_F_MODE_X86_64BIT & IEM_F_MODE_CPUMODE_MASK) == IEMMODE_64BIT);
|
---|
840 | AssertCompile( IEM_F_MODE_X86_64BIT & IEM_F_MODE_X86_PROT_MASK);
|
---|
841 | AssertCompile(!(IEM_F_MODE_X86_64BIT & IEM_F_MODE_X86_FLAT_OR_PRE_386_MASK));
|
---|
842 |
|
---|
843 | /** Native instruction type for use with the native code generator.
|
---|
844 | * This is a byte (uint8_t) for x86 and amd64 and uint32_t for the other(s). */
|
---|
845 | #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
|
---|
846 | typedef uint8_t IEMNATIVEINSTR;
|
---|
847 | #else
|
---|
848 | typedef uint32_t IEMNATIVEINSTR;
|
---|
849 | #endif
|
---|
850 | /** Pointer to a native instruction unit. */
|
---|
851 | typedef IEMNATIVEINSTR *PIEMNATIVEINSTR;
|
---|
852 | /** Pointer to a const native instruction unit. */
|
---|
853 | typedef IEMNATIVEINSTR const *PCIEMNATIVEINSTR;
|
---|
854 |
|
---|
855 | /**
|
---|
856 | * A call for the threaded call table.
|
---|
857 | */
|
---|
858 | typedef struct IEMTHRDEDCALLENTRY
|
---|
859 | {
|
---|
860 | /** The function to call (IEMTHREADEDFUNCS). */
|
---|
861 | uint16_t enmFunction;
|
---|
862 | /** Instruction number in the TB (for statistics). */
|
---|
863 | uint8_t idxInstr;
|
---|
864 | uint8_t uUnused0;
|
---|
865 |
|
---|
866 | /** Offset into IEMTB::pabOpcodes. */
|
---|
867 | uint16_t offOpcode;
|
---|
868 | /** The opcode length. */
|
---|
869 | uint8_t cbOpcode;
|
---|
870 | /** Index in to IEMTB::aRanges. */
|
---|
871 | uint8_t idxRange;
|
---|
872 |
|
---|
873 | /** Generic parameters. */
|
---|
874 | uint64_t auParams[3];
|
---|
875 | } IEMTHRDEDCALLENTRY;
|
---|
876 | AssertCompileSize(IEMTHRDEDCALLENTRY, sizeof(uint64_t) * 4);
|
---|
877 | /** Pointer to a threaded call entry. */
|
---|
878 | typedef struct IEMTHRDEDCALLENTRY *PIEMTHRDEDCALLENTRY;
|
---|
879 | /** Pointer to a const threaded call entry. */
|
---|
880 | typedef IEMTHRDEDCALLENTRY const *PCIEMTHRDEDCALLENTRY;
|
---|
881 |
|
---|
882 | /**
|
---|
883 | * Native IEM TB 'function' typedef.
|
---|
884 | *
|
---|
885 | * This will throw/longjmp on occation.
|
---|
886 | *
|
---|
887 | * @note AMD64 doesn't have that many non-volatile registers and does sport
|
---|
888 | * 32-bit address displacments, so we don't need pCtx.
|
---|
889 | *
|
---|
890 | * On ARM64 pCtx allows us to directly address the whole register
|
---|
891 | * context without requiring a separate indexing register holding the
|
---|
892 | * offset. This saves an instruction loading the offset for each guest
|
---|
893 | * CPU context access, at the cost of a non-volatile register.
|
---|
894 | * Fortunately, ARM64 has quite a lot more registers.
|
---|
895 | */
|
---|
896 | typedef
|
---|
897 | #ifdef RT_ARCH_AMD64
|
---|
898 | int FNIEMTBNATIVE(PVMCPUCC pVCpu)
|
---|
899 | #else
|
---|
900 | int FNIEMTBNATIVE(PVMCPUCC pVCpu, PCPUMCTX pCtx)
|
---|
901 | #endif
|
---|
902 | #if RT_CPLUSPLUS_PREREQ(201700)
|
---|
903 | IEM_NOEXCEPT_MAY_LONGJMP
|
---|
904 | #endif
|
---|
905 | ;
|
---|
906 | /** Pointer to a native IEM TB entry point function.
|
---|
907 | * This will throw/longjmp on occation. */
|
---|
908 | typedef FNIEMTBNATIVE *PFNIEMTBNATIVE;
|
---|
909 |
|
---|
910 |
|
---|
911 | /**
|
---|
912 | * Translation block debug info entry type.
|
---|
913 | */
|
---|
914 | typedef enum IEMTBDBGENTRYTYPE
|
---|
915 | {
|
---|
916 | kIemTbDbgEntryType_Invalid = 0,
|
---|
917 | /** The entry is for marking a native code position.
|
---|
918 | * Entries following this all apply to this position. */
|
---|
919 | kIemTbDbgEntryType_NativeOffset,
|
---|
920 | /** The entry is for a new guest instruction. */
|
---|
921 | kIemTbDbgEntryType_GuestInstruction,
|
---|
922 | /** Marks the start of a threaded call. */
|
---|
923 | kIemTbDbgEntryType_ThreadedCall,
|
---|
924 | /** Marks the location of a label. */
|
---|
925 | kIemTbDbgEntryType_Label,
|
---|
926 | /** Info about a host register shadowing a guest register. */
|
---|
927 | kIemTbDbgEntryType_GuestRegShadowing,
|
---|
928 | kIemTbDbgEntryType_End
|
---|
929 | } IEMTBDBGENTRYTYPE;
|
---|
930 |
|
---|
931 | /**
|
---|
932 | * Translation block debug info entry.
|
---|
933 | */
|
---|
934 | typedef union IEMTBDBGENTRY
|
---|
935 | {
|
---|
936 | /** Plain 32-bit view. */
|
---|
937 | uint32_t u;
|
---|
938 |
|
---|
939 | /** Generic view for getting at the type field. */
|
---|
940 | struct
|
---|
941 | {
|
---|
942 | /** IEMTBDBGENTRYTYPE */
|
---|
943 | uint32_t uType : 4;
|
---|
944 | uint32_t uTypeSpecific : 28;
|
---|
945 | } Gen;
|
---|
946 |
|
---|
947 | struct
|
---|
948 | {
|
---|
949 | /** kIemTbDbgEntryType_ThreadedCall1. */
|
---|
950 | uint32_t uType : 4;
|
---|
951 | /** Native code offset. */
|
---|
952 | uint32_t offNative : 28;
|
---|
953 | } NativeOffset;
|
---|
954 |
|
---|
955 | struct
|
---|
956 | {
|
---|
957 | /** kIemTbDbgEntryType_GuestInstruction. */
|
---|
958 | uint32_t uType : 4;
|
---|
959 | uint32_t uUnused : 4;
|
---|
960 | /** The IEM_F_XXX flags. */
|
---|
961 | uint32_t fExec : 24;
|
---|
962 | } GuestInstruction;
|
---|
963 |
|
---|
964 | struct
|
---|
965 | {
|
---|
966 | /* kIemTbDbgEntryType_ThreadedCall. */
|
---|
967 | uint32_t uType : 4;
|
---|
968 | /** Set if the call was recompiled to native code, clear if just calling
|
---|
969 | * threaded function. */
|
---|
970 | uint32_t fRecompiled : 1;
|
---|
971 | uint32_t uUnused : 11;
|
---|
972 | /** The threaded call number (IEMTHREADEDFUNCS). */
|
---|
973 | uint32_t enmCall : 16;
|
---|
974 | } ThreadedCall;
|
---|
975 |
|
---|
976 | struct
|
---|
977 | {
|
---|
978 | /* kIemTbDbgEntryType_Label. */
|
---|
979 | uint32_t uType : 4;
|
---|
980 | uint32_t uUnused : 4;
|
---|
981 | /** The label type (IEMNATIVELABELTYPE). */
|
---|
982 | uint32_t enmLabel : 8;
|
---|
983 | /** The label data. */
|
---|
984 | uint32_t uData : 16;
|
---|
985 | } Label;
|
---|
986 |
|
---|
987 | struct
|
---|
988 | {
|
---|
989 | /* kIemTbDbgEntryType_GuestRegShadowing. */
|
---|
990 | uint32_t uType : 4;
|
---|
991 | uint32_t uUnused : 4;
|
---|
992 | /** The guest register being shadowed (IEMNATIVEGSTREG). */
|
---|
993 | uint32_t idxGstReg : 8;
|
---|
994 | /** The host new register number, UINT8_MAX if dropped. */
|
---|
995 | uint32_t idxHstReg : 8;
|
---|
996 | /** The previous host register number, UINT8_MAX if new. */
|
---|
997 | uint32_t idxHstRegPrev : 8;
|
---|
998 | } GuestRegShadowing;
|
---|
999 | } IEMTBDBGENTRY;
|
---|
1000 | AssertCompileSize(IEMTBDBGENTRY, sizeof(uint32_t));
|
---|
1001 | /** Pointer to a debug info entry. */
|
---|
1002 | typedef IEMTBDBGENTRY *PIEMTBDBGENTRY;
|
---|
1003 | /** Pointer to a const debug info entry. */
|
---|
1004 | typedef IEMTBDBGENTRY const *PCIEMTBDBGENTRY;
|
---|
1005 |
|
---|
1006 | /**
|
---|
1007 | * Translation block debug info.
|
---|
1008 | */
|
---|
1009 | typedef struct IEMTBDBG
|
---|
1010 | {
|
---|
1011 | /** Number of entries in aEntries. */
|
---|
1012 | uint32_t cEntries;
|
---|
1013 | /** Debug info entries. */
|
---|
1014 | RT_FLEXIBLE_ARRAY_EXTENSION
|
---|
1015 | IEMTBDBGENTRY aEntries[RT_FLEXIBLE_ARRAY];
|
---|
1016 | } IEMTBDBG;
|
---|
1017 | /** Pointer to TB debug info. */
|
---|
1018 | typedef IEMTBDBG *PIEMTBDBG;
|
---|
1019 | /** Pointer to const TB debug info. */
|
---|
1020 | typedef IEMTBDBG const *PCIEMTBDBG;
|
---|
1021 |
|
---|
1022 |
|
---|
1023 | /**
|
---|
1024 | * Translation block.
|
---|
1025 | *
|
---|
1026 | * The current plan is to just keep TBs and associated lookup hash table private
|
---|
1027 | * to each VCpu as that simplifies TB removal greatly (no races) and generally
|
---|
1028 | * avoids using expensive atomic primitives for updating lists and stuff.
|
---|
1029 | */
|
---|
1030 | #pragma pack(2) /* to prevent the Thrd structure from being padded unnecessarily */
|
---|
1031 | typedef struct IEMTB
|
---|
1032 | {
|
---|
1033 | /** Next block with the same hash table entry. */
|
---|
1034 | struct IEMTB *pNext;
|
---|
1035 | /** Usage counter. */
|
---|
1036 | uint32_t cUsed;
|
---|
1037 | /** The IEMCPU::msRecompilerPollNow last time it was used. */
|
---|
1038 | uint32_t msLastUsed;
|
---|
1039 |
|
---|
1040 | /** @name What uniquely identifies the block.
|
---|
1041 | * @{ */
|
---|
1042 | RTGCPHYS GCPhysPc;
|
---|
1043 | /** IEMTB_F_XXX (i.e. IEM_F_XXX ++). */
|
---|
1044 | uint32_t fFlags;
|
---|
1045 | union
|
---|
1046 | {
|
---|
1047 | struct
|
---|
1048 | {
|
---|
1049 | /**< Relevant CS X86DESCATTR_XXX bits. */
|
---|
1050 | uint16_t fAttr;
|
---|
1051 | } x86;
|
---|
1052 | };
|
---|
1053 | /** @} */
|
---|
1054 |
|
---|
1055 | /** Number of opcode ranges. */
|
---|
1056 | uint8_t cRanges;
|
---|
1057 | /** Statistics: Number of instructions in the block. */
|
---|
1058 | uint8_t cInstructions;
|
---|
1059 |
|
---|
1060 | /** Type specific info. */
|
---|
1061 | union
|
---|
1062 | {
|
---|
1063 | struct
|
---|
1064 | {
|
---|
1065 | /** The call sequence table. */
|
---|
1066 | PIEMTHRDEDCALLENTRY paCalls;
|
---|
1067 | /** Number of calls in paCalls. */
|
---|
1068 | uint16_t cCalls;
|
---|
1069 | /** Number of calls allocated. */
|
---|
1070 | uint16_t cAllocated;
|
---|
1071 | } Thrd;
|
---|
1072 | struct
|
---|
1073 | {
|
---|
1074 | /** The native instructions (PFNIEMTBNATIVE). */
|
---|
1075 | PIEMNATIVEINSTR paInstructions;
|
---|
1076 | /** Number of instructions pointed to by paInstructions. */
|
---|
1077 | uint32_t cInstructions;
|
---|
1078 | } Native;
|
---|
1079 | /** Generic view for zeroing when freeing. */
|
---|
1080 | struct
|
---|
1081 | {
|
---|
1082 | uintptr_t uPtr;
|
---|
1083 | uint32_t uData;
|
---|
1084 | } Gen;
|
---|
1085 | };
|
---|
1086 |
|
---|
1087 | /** The allocation chunk this TB belongs to. */
|
---|
1088 | uint8_t idxAllocChunk;
|
---|
1089 | uint8_t bUnused;
|
---|
1090 |
|
---|
1091 | /** Number of bytes of opcodes stored in pabOpcodes.
|
---|
1092 | * @todo this field isn't really needed, aRanges keeps the actual info. */
|
---|
1093 | uint16_t cbOpcodes;
|
---|
1094 | /** Pointer to the opcode bytes this block was recompiled from. */
|
---|
1095 | uint8_t *pabOpcodes;
|
---|
1096 |
|
---|
1097 | /** Debug info if enabled.
|
---|
1098 | * This is only generated by the native recompiler. */
|
---|
1099 | PIEMTBDBG pDbgInfo;
|
---|
1100 |
|
---|
1101 | /* --- 64 byte cache line end --- */
|
---|
1102 |
|
---|
1103 | /** Opcode ranges.
|
---|
1104 | *
|
---|
1105 | * The opcode checkers and maybe TLB loading functions will use this to figure
|
---|
1106 | * out what to do. The parameter will specify an entry and the opcode offset to
|
---|
1107 | * start at and the minimum number of bytes to verify (instruction length).
|
---|
1108 | *
|
---|
1109 | * When VT-x and AMD-V looks up the opcode bytes for an exitting instruction,
|
---|
1110 | * they'll first translate RIP (+ cbInstr - 1) to a physical address using the
|
---|
1111 | * code TLB (must have a valid entry for that address) and scan the ranges to
|
---|
1112 | * locate the corresponding opcodes. Probably.
|
---|
1113 | */
|
---|
1114 | struct IEMTBOPCODERANGE
|
---|
1115 | {
|
---|
1116 | /** Offset within pabOpcodes. */
|
---|
1117 | uint16_t offOpcodes;
|
---|
1118 | /** Number of bytes. */
|
---|
1119 | uint16_t cbOpcodes;
|
---|
1120 | /** The page offset. */
|
---|
1121 | RT_GCC_EXTENSION
|
---|
1122 | uint16_t offPhysPage : 12;
|
---|
1123 | /** Unused bits. */
|
---|
1124 | RT_GCC_EXTENSION
|
---|
1125 | uint16_t u2Unused : 2;
|
---|
1126 | /** Index into GCPhysPc + aGCPhysPages for the physical page address. */
|
---|
1127 | RT_GCC_EXTENSION
|
---|
1128 | uint16_t idxPhysPage : 2;
|
---|
1129 | } aRanges[8];
|
---|
1130 |
|
---|
1131 | /** Physical pages that this TB covers.
|
---|
1132 | * The GCPhysPc w/o page offset is element zero, so starting here with 1. */
|
---|
1133 | RTGCPHYS aGCPhysPages[2];
|
---|
1134 | } IEMTB;
|
---|
1135 | #pragma pack()
|
---|
1136 | AssertCompileMemberAlignment(IEMTB, GCPhysPc, sizeof(RTGCPHYS));
|
---|
1137 | AssertCompileMemberAlignment(IEMTB, Thrd, sizeof(void *));
|
---|
1138 | AssertCompileMemberAlignment(IEMTB, pabOpcodes, sizeof(void *));
|
---|
1139 | AssertCompileMemberAlignment(IEMTB, pDbgInfo, sizeof(void *));
|
---|
1140 | AssertCompileMemberAlignment(IEMTB, aGCPhysPages, sizeof(RTGCPHYS));
|
---|
1141 | AssertCompileMemberOffset(IEMTB, aRanges, 64);
|
---|
1142 | AssertCompileMemberSize(IEMTB, aRanges[0], 6);
|
---|
1143 | #if 1
|
---|
1144 | AssertCompileSize(IEMTB, 128);
|
---|
1145 | # define IEMTB_SIZE_IS_POWER_OF_TWO /**< The IEMTB size is a power of two. */
|
---|
1146 | #else
|
---|
1147 | AssertCompileSize(IEMTB, 168);
|
---|
1148 | # undef IEMTB_SIZE_IS_POWER_OF_TWO
|
---|
1149 | #endif
|
---|
1150 |
|
---|
1151 | /** Pointer to a translation block. */
|
---|
1152 | typedef IEMTB *PIEMTB;
|
---|
1153 | /** Pointer to a const translation block. */
|
---|
1154 | typedef IEMTB const *PCIEMTB;
|
---|
1155 |
|
---|
1156 | /**
|
---|
1157 | * A chunk of memory in the TB allocator.
|
---|
1158 | */
|
---|
1159 | typedef struct IEMTBCHUNK
|
---|
1160 | {
|
---|
1161 | /** Pointer to the translation blocks in this chunk. */
|
---|
1162 | PIEMTB paTbs;
|
---|
1163 | #ifdef IN_RING0
|
---|
1164 | /** Allocation handle. */
|
---|
1165 | RTR0MEMOBJ hMemObj;
|
---|
1166 | #endif
|
---|
1167 | } IEMTBCHUNK;
|
---|
1168 |
|
---|
1169 | /**
|
---|
1170 | * A per-CPU translation block allocator.
|
---|
1171 | *
|
---|
1172 | * Because of how the IEMTBCACHE uses the lower 6 bits of the TB address to keep
|
---|
1173 | * the length of the collision list, and of course also for cache line alignment
|
---|
1174 | * reasons, the TBs must be allocated with at least 64-byte alignment.
|
---|
1175 | * Memory is there therefore allocated using one of the page aligned allocators.
|
---|
1176 | *
|
---|
1177 | *
|
---|
1178 | * To avoid wasting too much memory, it is allocated piecemeal as needed,
|
---|
1179 | * in chunks (IEMTBCHUNK) of 2 MiB or more. The TB has an 8-bit chunk index
|
---|
1180 | * that enables us to quickly calculate the allocation bitmap position when
|
---|
1181 | * freeing the translation block.
|
---|
1182 | */
|
---|
1183 | typedef struct IEMTBALLOCATOR
|
---|
1184 | {
|
---|
1185 | /** Magic value (IEMTBALLOCATOR_MAGIC). */
|
---|
1186 | uint32_t uMagic;
|
---|
1187 |
|
---|
1188 | #ifdef IEMTB_SIZE_IS_POWER_OF_TWO
|
---|
1189 | /** Mask corresponding to cTbsPerChunk - 1. */
|
---|
1190 | uint32_t fChunkMask;
|
---|
1191 | /** Shift count corresponding to cTbsPerChunk. */
|
---|
1192 | uint8_t cChunkShift;
|
---|
1193 | #else
|
---|
1194 | uint32_t uUnused;
|
---|
1195 | uint8_t bUnused;
|
---|
1196 | #endif
|
---|
1197 | /** Number of chunks we're allowed to allocate. */
|
---|
1198 | uint8_t cMaxChunks;
|
---|
1199 | /** Number of chunks currently populated. */
|
---|
1200 | uint16_t cAllocatedChunks;
|
---|
1201 | /** Number of translation blocks per chunk. */
|
---|
1202 | uint32_t cTbsPerChunk;
|
---|
1203 | /** Chunk size. */
|
---|
1204 | uint32_t cbPerChunk;
|
---|
1205 |
|
---|
1206 | /** The maximum number of TBs. */
|
---|
1207 | uint32_t cMaxTbs;
|
---|
1208 | /** Total number of TBs in the populated chunks.
|
---|
1209 | * (cAllocatedChunks * cTbsPerChunk) */
|
---|
1210 | uint32_t cTotalTbs;
|
---|
1211 | /** The current number of TBs in use.
|
---|
1212 | * The number of free TBs: cAllocatedTbs - cInUseTbs; */
|
---|
1213 | uint32_t cInUseTbs;
|
---|
1214 | /** Statistics: Number of the cInUseTbs that are native ones. */
|
---|
1215 | uint32_t cNativeTbs;
|
---|
1216 | /** Statistics: Number of the cInUseTbs that are threaded ones. */
|
---|
1217 | uint32_t cThreadedTbs;
|
---|
1218 |
|
---|
1219 | /** Where to start pruning TBs from when we're out.
|
---|
1220 | * See iemTbAllocatorAllocSlow for details. */
|
---|
1221 | uint32_t iPruneFrom;
|
---|
1222 | /** Hint about which bit to start scanning the bitmap from. */
|
---|
1223 | uint32_t iStartHint;
|
---|
1224 | /** Where to start pruning native TBs from when we're out of executable memory.
|
---|
1225 | * See iemTbAllocatorFreeupNativeSpace for details. */
|
---|
1226 | uint32_t iPruneNativeFrom;
|
---|
1227 | uint32_t uPadding;
|
---|
1228 |
|
---|
1229 | /** Statistics: Number of TB allocation calls. */
|
---|
1230 | STAMCOUNTER StatAllocs;
|
---|
1231 | /** Statistics: Number of TB free calls. */
|
---|
1232 | STAMCOUNTER StatFrees;
|
---|
1233 | /** Statistics: Time spend pruning. */
|
---|
1234 | STAMPROFILE StatPrune;
|
---|
1235 | /** Statistics: Time spend pruning native TBs. */
|
---|
1236 | STAMPROFILE StatPruneNative;
|
---|
1237 |
|
---|
1238 | /** The delayed free list (see iemTbAlloctorScheduleForFree). */
|
---|
1239 | PIEMTB pDelayedFreeHead;
|
---|
1240 |
|
---|
1241 | /** Allocation chunks. */
|
---|
1242 | IEMTBCHUNK aChunks[256];
|
---|
1243 |
|
---|
1244 | /** Allocation bitmap for all possible chunk chunks. */
|
---|
1245 | RT_FLEXIBLE_ARRAY_EXTENSION
|
---|
1246 | uint64_t bmAllocated[RT_FLEXIBLE_ARRAY];
|
---|
1247 | } IEMTBALLOCATOR;
|
---|
1248 | /** Pointer to a TB allocator. */
|
---|
1249 | typedef struct IEMTBALLOCATOR *PIEMTBALLOCATOR;
|
---|
1250 |
|
---|
1251 | /** Magic value for the TB allocator (Emmet Harley Cohen). */
|
---|
1252 | #define IEMTBALLOCATOR_MAGIC UINT32_C(0x19900525)
|
---|
1253 |
|
---|
1254 |
|
---|
1255 | /**
|
---|
1256 | * A per-CPU translation block cache (hash table).
|
---|
1257 | *
|
---|
1258 | * The hash table is allocated once during IEM initialization and size double
|
---|
1259 | * the max TB count, rounded up to the nearest power of two (so we can use and
|
---|
1260 | * AND mask rather than a rest division when hashing).
|
---|
1261 | */
|
---|
1262 | typedef struct IEMTBCACHE
|
---|
1263 | {
|
---|
1264 | /** Magic value (IEMTBCACHE_MAGIC). */
|
---|
1265 | uint32_t uMagic;
|
---|
1266 | /** Size of the hash table. This is a power of two. */
|
---|
1267 | uint32_t cHash;
|
---|
1268 | /** The mask corresponding to cHash. */
|
---|
1269 | uint32_t uHashMask;
|
---|
1270 | uint32_t uPadding;
|
---|
1271 |
|
---|
1272 | /** @name Statistics
|
---|
1273 | * @{ */
|
---|
1274 | /** Number of collisions ever. */
|
---|
1275 | STAMCOUNTER cCollisions;
|
---|
1276 |
|
---|
1277 | /** Statistics: Number of TB lookup misses. */
|
---|
1278 | STAMCOUNTER cLookupMisses;
|
---|
1279 | /** Statistics: Number of TB lookup hits (debug only). */
|
---|
1280 | STAMCOUNTER cLookupHits;
|
---|
1281 | STAMCOUNTER auPadding2[3];
|
---|
1282 | /** Statistics: Collision list length pruning. */
|
---|
1283 | STAMPROFILE StatPrune;
|
---|
1284 | /** @} */
|
---|
1285 |
|
---|
1286 | /** The hash table itself.
|
---|
1287 | * @note The lower 6 bits of the pointer is used for keeping the collision
|
---|
1288 | * list length, so we can take action when it grows too long.
|
---|
1289 | * This works because TBs are allocated using a 64 byte (or
|
---|
1290 | * higher) alignment from page aligned chunks of memory, so the lower
|
---|
1291 | * 6 bits of the address will always be zero.
|
---|
1292 | * See IEMTBCACHE_PTR_COUNT_MASK, IEMTBCACHE_PTR_MAKE and friends.
|
---|
1293 | */
|
---|
1294 | RT_FLEXIBLE_ARRAY_EXTENSION
|
---|
1295 | PIEMTB apHash[RT_FLEXIBLE_ARRAY];
|
---|
1296 | } IEMTBCACHE;
|
---|
1297 | /** Pointer to a per-CPU translation block cahce. */
|
---|
1298 | typedef IEMTBCACHE *PIEMTBCACHE;
|
---|
1299 |
|
---|
1300 | /** Magic value for IEMTBCACHE (Johnny O'Neal). */
|
---|
1301 | #define IEMTBCACHE_MAGIC UINT32_C(0x19561010)
|
---|
1302 |
|
---|
1303 | /** The collision count mask for IEMTBCACHE::apHash entries. */
|
---|
1304 | #define IEMTBCACHE_PTR_COUNT_MASK ((uintptr_t)0x3f)
|
---|
1305 | /** The max collision count for IEMTBCACHE::apHash entries before pruning. */
|
---|
1306 | #define IEMTBCACHE_PTR_MAX_COUNT ((uintptr_t)0x30)
|
---|
1307 | /** Combine a TB pointer and a collision list length into a value for an
|
---|
1308 | * IEMTBCACHE::apHash entry. */
|
---|
1309 | #define IEMTBCACHE_PTR_MAKE(a_pTb, a_cCount) (PIEMTB)((uintptr_t)(a_pTb) | (a_cCount))
|
---|
1310 | /** Combine a TB pointer and a collision list length into a value for an
|
---|
1311 | * IEMTBCACHE::apHash entry. */
|
---|
1312 | #define IEMTBCACHE_PTR_GET_TB(a_pHashEntry) (PIEMTB)((uintptr_t)(a_pHashEntry) & ~IEMTBCACHE_PTR_COUNT_MASK)
|
---|
1313 | /** Combine a TB pointer and a collision list length into a value for an
|
---|
1314 | * IEMTBCACHE::apHash entry. */
|
---|
1315 | #define IEMTBCACHE_PTR_GET_COUNT(a_pHashEntry) ((uintptr_t)(a_pHashEntry) & IEMTBCACHE_PTR_COUNT_MASK)
|
---|
1316 |
|
---|
1317 | /**
|
---|
1318 | * Calculates the hash table slot for a TB from physical PC address and TB flags.
|
---|
1319 | */
|
---|
1320 | #define IEMTBCACHE_HASH(a_paCache, a_fTbFlags, a_GCPhysPc) \
|
---|
1321 | IEMTBCACHE_HASH_NO_KEY_MASK(a_paCache, (a_fTbFlags) & IEMTB_F_KEY_MASK, a_GCPhysPc)
|
---|
1322 |
|
---|
1323 | /**
|
---|
1324 | * Calculates the hash table slot for a TB from physical PC address and TB
|
---|
1325 | * flags, ASSUMING the caller has applied IEMTB_F_KEY_MASK to @a a_fTbFlags.
|
---|
1326 | */
|
---|
1327 | #define IEMTBCACHE_HASH_NO_KEY_MASK(a_paCache, a_fTbFlags, a_GCPhysPc) \
|
---|
1328 | (((uint32_t)(a_GCPhysPc) ^ (a_fTbFlags)) & (a_paCache)->uHashMask)
|
---|
1329 |
|
---|
1330 |
|
---|
1331 | /** @name IEMBRANCHED_F_XXX - Branched indicator (IEMCPU::fTbBranched).
|
---|
1332 | *
|
---|
1333 | * These flags parallels the main IEM_CIMPL_F_BRANCH_XXX flags.
|
---|
1334 | *
|
---|
1335 | * @{ */
|
---|
1336 | /** Value if no branching happened recently. */
|
---|
1337 | #define IEMBRANCHED_F_NO UINT8_C(0x00)
|
---|
1338 | /** Flag set if direct branch, clear if absolute or indirect. */
|
---|
1339 | #define IEMBRANCHED_F_DIRECT UINT8_C(0x01)
|
---|
1340 | /** Flag set if indirect branch, clear if direct or relative. */
|
---|
1341 | #define IEMBRANCHED_F_INDIRECT UINT8_C(0x02)
|
---|
1342 | /** Flag set if relative branch, clear if absolute or indirect. */
|
---|
1343 | #define IEMBRANCHED_F_RELATIVE UINT8_C(0x04)
|
---|
1344 | /** Flag set if conditional branch, clear if unconditional. */
|
---|
1345 | #define IEMBRANCHED_F_CONDITIONAL UINT8_C(0x08)
|
---|
1346 | /** Flag set if it's a far branch. */
|
---|
1347 | #define IEMBRANCHED_F_FAR UINT8_C(0x10)
|
---|
1348 | /** Flag set if the stack pointer is modified. */
|
---|
1349 | #define IEMBRANCHED_F_STACK UINT8_C(0x20)
|
---|
1350 | /** Flag set if the stack pointer and (maybe) the stack segment are modified. */
|
---|
1351 | #define IEMBRANCHED_F_STACK_FAR UINT8_C(0x40)
|
---|
1352 | /** Flag set (by IEM_MC_REL_JMP_XXX) if it's a zero bytes relative jump. */
|
---|
1353 | #define IEMBRANCHED_F_ZERO UINT8_C(0x80)
|
---|
1354 | /** @} */
|
---|
1355 |
|
---|
1356 |
|
---|
1357 | /**
|
---|
1358 | * The per-CPU IEM state.
|
---|
1359 | */
|
---|
1360 | typedef struct IEMCPU
|
---|
1361 | {
|
---|
1362 | /** Info status code that needs to be propagated to the IEM caller.
|
---|
1363 | * This cannot be passed internally, as it would complicate all success
|
---|
1364 | * checks within the interpreter making the code larger and almost impossible
|
---|
1365 | * to get right. Instead, we'll store status codes to pass on here. Each
|
---|
1366 | * source of these codes will perform appropriate sanity checks. */
|
---|
1367 | int32_t rcPassUp; /* 0x00 */
|
---|
1368 | /** Execution flag, IEM_F_XXX. */
|
---|
1369 | uint32_t fExec; /* 0x04 */
|
---|
1370 |
|
---|
1371 | /** @name Decoder state.
|
---|
1372 | * @{ */
|
---|
1373 | #ifdef IEM_WITH_CODE_TLB
|
---|
1374 | /** The offset of the next instruction byte. */
|
---|
1375 | uint32_t offInstrNextByte; /* 0x08 */
|
---|
1376 | /** The number of bytes available at pbInstrBuf for the current instruction.
|
---|
1377 | * This takes the max opcode length into account so that doesn't need to be
|
---|
1378 | * checked separately. */
|
---|
1379 | uint32_t cbInstrBuf; /* 0x0c */
|
---|
1380 | /** Pointer to the page containing RIP, user specified buffer or abOpcode.
|
---|
1381 | * This can be NULL if the page isn't mappable for some reason, in which
|
---|
1382 | * case we'll do fallback stuff.
|
---|
1383 | *
|
---|
1384 | * If we're executing an instruction from a user specified buffer,
|
---|
1385 | * IEMExecOneWithPrefetchedByPC and friends, this is not necessarily a page
|
---|
1386 | * aligned pointer but pointer to the user data.
|
---|
1387 | *
|
---|
1388 | * For instructions crossing pages, this will start on the first page and be
|
---|
1389 | * advanced to the next page by the time we've decoded the instruction. This
|
---|
1390 | * therefore precludes stuff like <tt>pbInstrBuf[offInstrNextByte + cbInstrBuf - cbCurInstr]</tt>
|
---|
1391 | */
|
---|
1392 | uint8_t const *pbInstrBuf; /* 0x10 */
|
---|
1393 | # if ARCH_BITS == 32
|
---|
1394 | uint32_t uInstrBufHigh; /** The high dword of the host context pbInstrBuf member. */
|
---|
1395 | # endif
|
---|
1396 | /** The program counter corresponding to pbInstrBuf.
|
---|
1397 | * This is set to a non-canonical address when we need to invalidate it. */
|
---|
1398 | uint64_t uInstrBufPc; /* 0x18 */
|
---|
1399 | /** The guest physical address corresponding to pbInstrBuf. */
|
---|
1400 | RTGCPHYS GCPhysInstrBuf; /* 0x20 */
|
---|
1401 | /** The number of bytes available at pbInstrBuf in total (for IEMExecLots).
|
---|
1402 | * This takes the CS segment limit into account.
|
---|
1403 | * @note Set to zero when the code TLB is flushed to trigger TLB reload. */
|
---|
1404 | uint16_t cbInstrBufTotal; /* 0x28 */
|
---|
1405 | # ifndef IEM_WITH_OPAQUE_DECODER_STATE
|
---|
1406 | /** Offset into pbInstrBuf of the first byte of the current instruction.
|
---|
1407 | * Can be negative to efficiently handle cross page instructions. */
|
---|
1408 | int16_t offCurInstrStart; /* 0x2a */
|
---|
1409 |
|
---|
1410 | /** The prefix mask (IEM_OP_PRF_XXX). */
|
---|
1411 | uint32_t fPrefixes; /* 0x2c */
|
---|
1412 | /** The extra REX ModR/M register field bit (REX.R << 3). */
|
---|
1413 | uint8_t uRexReg; /* 0x30 */
|
---|
1414 | /** The extra REX ModR/M r/m field, SIB base and opcode reg bit
|
---|
1415 | * (REX.B << 3). */
|
---|
1416 | uint8_t uRexB; /* 0x31 */
|
---|
1417 | /** The extra REX SIB index field bit (REX.X << 3). */
|
---|
1418 | uint8_t uRexIndex; /* 0x32 */
|
---|
1419 |
|
---|
1420 | /** The effective segment register (X86_SREG_XXX). */
|
---|
1421 | uint8_t iEffSeg; /* 0x33 */
|
---|
1422 |
|
---|
1423 | /** The offset of the ModR/M byte relative to the start of the instruction. */
|
---|
1424 | uint8_t offModRm; /* 0x34 */
|
---|
1425 |
|
---|
1426 | # ifdef IEM_WITH_CODE_TLB_AND_OPCODE_BUF
|
---|
1427 | /** The current offset into abOpcode. */
|
---|
1428 | uint8_t offOpcode; /* 0x35 */
|
---|
1429 | # else
|
---|
1430 | uint8_t bUnused; /* 0x35 */
|
---|
1431 | # endif
|
---|
1432 | # else /* IEM_WITH_OPAQUE_DECODER_STATE */
|
---|
1433 | uint8_t abOpaqueDecoderPart1[0x36 - 0x2a];
|
---|
1434 | # endif /* IEM_WITH_OPAQUE_DECODER_STATE */
|
---|
1435 |
|
---|
1436 | #else /* !IEM_WITH_CODE_TLB */
|
---|
1437 | # ifndef IEM_WITH_OPAQUE_DECODER_STATE
|
---|
1438 | /** The size of what has currently been fetched into abOpcode. */
|
---|
1439 | uint8_t cbOpcode; /* 0x08 */
|
---|
1440 | /** The current offset into abOpcode. */
|
---|
1441 | uint8_t offOpcode; /* 0x09 */
|
---|
1442 | /** The offset of the ModR/M byte relative to the start of the instruction. */
|
---|
1443 | uint8_t offModRm; /* 0x0a */
|
---|
1444 |
|
---|
1445 | /** The effective segment register (X86_SREG_XXX). */
|
---|
1446 | uint8_t iEffSeg; /* 0x0b */
|
---|
1447 |
|
---|
1448 | /** The prefix mask (IEM_OP_PRF_XXX). */
|
---|
1449 | uint32_t fPrefixes; /* 0x0c */
|
---|
1450 | /** The extra REX ModR/M register field bit (REX.R << 3). */
|
---|
1451 | uint8_t uRexReg; /* 0x10 */
|
---|
1452 | /** The extra REX ModR/M r/m field, SIB base and opcode reg bit
|
---|
1453 | * (REX.B << 3). */
|
---|
1454 | uint8_t uRexB; /* 0x11 */
|
---|
1455 | /** The extra REX SIB index field bit (REX.X << 3). */
|
---|
1456 | uint8_t uRexIndex; /* 0x12 */
|
---|
1457 |
|
---|
1458 | # else /* IEM_WITH_OPAQUE_DECODER_STATE */
|
---|
1459 | uint8_t abOpaqueDecoderPart1[0x13 - 0x08];
|
---|
1460 | # endif /* IEM_WITH_OPAQUE_DECODER_STATE */
|
---|
1461 | #endif /* !IEM_WITH_CODE_TLB */
|
---|
1462 |
|
---|
1463 | #ifndef IEM_WITH_OPAQUE_DECODER_STATE
|
---|
1464 | /** The effective operand mode. */
|
---|
1465 | IEMMODE enmEffOpSize; /* 0x36, 0x13 */
|
---|
1466 | /** The default addressing mode. */
|
---|
1467 | IEMMODE enmDefAddrMode; /* 0x37, 0x14 */
|
---|
1468 | /** The effective addressing mode. */
|
---|
1469 | IEMMODE enmEffAddrMode; /* 0x38, 0x15 */
|
---|
1470 | /** The default operand mode. */
|
---|
1471 | IEMMODE enmDefOpSize; /* 0x39, 0x16 */
|
---|
1472 |
|
---|
1473 | /** Prefix index (VEX.pp) for two byte and three byte tables. */
|
---|
1474 | uint8_t idxPrefix; /* 0x3a, 0x17 */
|
---|
1475 | /** 3rd VEX/EVEX/XOP register.
|
---|
1476 | * Please use IEM_GET_EFFECTIVE_VVVV to access. */
|
---|
1477 | uint8_t uVex3rdReg; /* 0x3b, 0x18 */
|
---|
1478 | /** The VEX/EVEX/XOP length field. */
|
---|
1479 | uint8_t uVexLength; /* 0x3c, 0x19 */
|
---|
1480 | /** Additional EVEX stuff. */
|
---|
1481 | uint8_t fEvexStuff; /* 0x3d, 0x1a */
|
---|
1482 |
|
---|
1483 | # ifndef IEM_WITH_CODE_TLB
|
---|
1484 | /** Explicit alignment padding. */
|
---|
1485 | uint8_t abAlignment2a[1]; /* 0x1b */
|
---|
1486 | # endif
|
---|
1487 | /** The FPU opcode (FOP). */
|
---|
1488 | uint16_t uFpuOpcode; /* 0x3e, 0x1c */
|
---|
1489 | # ifndef IEM_WITH_CODE_TLB
|
---|
1490 | /** Explicit alignment padding. */
|
---|
1491 | uint8_t abAlignment2b[2]; /* 0x1e */
|
---|
1492 | # endif
|
---|
1493 |
|
---|
1494 | /** The opcode bytes. */
|
---|
1495 | uint8_t abOpcode[15]; /* 0x40, 0x20 */
|
---|
1496 | /** Explicit alignment padding. */
|
---|
1497 | # ifdef IEM_WITH_CODE_TLB
|
---|
1498 | //uint8_t abAlignment2c[0x4f - 0x4f]; /* 0x4f */
|
---|
1499 | # else
|
---|
1500 | uint8_t abAlignment2c[0x4f - 0x2f]; /* 0x2f */
|
---|
1501 | # endif
|
---|
1502 |
|
---|
1503 | #else /* IEM_WITH_OPAQUE_DECODER_STATE */
|
---|
1504 | # ifdef IEM_WITH_CODE_TLB
|
---|
1505 | uint8_t abOpaqueDecoderPart2[0x4f - 0x36];
|
---|
1506 | # else
|
---|
1507 | uint8_t abOpaqueDecoderPart2[0x4f - 0x13];
|
---|
1508 | # endif
|
---|
1509 | #endif /* IEM_WITH_OPAQUE_DECODER_STATE */
|
---|
1510 | /** @} */
|
---|
1511 |
|
---|
1512 |
|
---|
1513 | /** The number of active guest memory mappings. */
|
---|
1514 | uint8_t cActiveMappings; /* 0x4f, 0x4f */
|
---|
1515 |
|
---|
1516 | /** Records for tracking guest memory mappings. */
|
---|
1517 | struct
|
---|
1518 | {
|
---|
1519 | /** The address of the mapped bytes. */
|
---|
1520 | R3R0PTRTYPE(void *) pv;
|
---|
1521 | /** The access flags (IEM_ACCESS_XXX).
|
---|
1522 | * IEM_ACCESS_INVALID if the entry is unused. */
|
---|
1523 | uint32_t fAccess;
|
---|
1524 | #if HC_ARCH_BITS == 64
|
---|
1525 | uint32_t u32Alignment4; /**< Alignment padding. */
|
---|
1526 | #endif
|
---|
1527 | } aMemMappings[3]; /* 0x50 LB 0x30 */
|
---|
1528 |
|
---|
1529 | /** Locking records for the mapped memory. */
|
---|
1530 | union
|
---|
1531 | {
|
---|
1532 | PGMPAGEMAPLOCK Lock;
|
---|
1533 | uint64_t au64Padding[2];
|
---|
1534 | } aMemMappingLocks[3]; /* 0x80 LB 0x30 */
|
---|
1535 |
|
---|
1536 | /** Bounce buffer info.
|
---|
1537 | * This runs in parallel to aMemMappings. */
|
---|
1538 | struct
|
---|
1539 | {
|
---|
1540 | /** The physical address of the first byte. */
|
---|
1541 | RTGCPHYS GCPhysFirst;
|
---|
1542 | /** The physical address of the second page. */
|
---|
1543 | RTGCPHYS GCPhysSecond;
|
---|
1544 | /** The number of bytes in the first page. */
|
---|
1545 | uint16_t cbFirst;
|
---|
1546 | /** The number of bytes in the second page. */
|
---|
1547 | uint16_t cbSecond;
|
---|
1548 | /** Whether it's unassigned memory. */
|
---|
1549 | bool fUnassigned;
|
---|
1550 | /** Explicit alignment padding. */
|
---|
1551 | bool afAlignment5[3];
|
---|
1552 | } aMemBbMappings[3]; /* 0xb0 LB 0x48 */
|
---|
1553 |
|
---|
1554 | /** The flags of the current exception / interrupt. */
|
---|
1555 | uint32_t fCurXcpt; /* 0xf8 */
|
---|
1556 | /** The current exception / interrupt. */
|
---|
1557 | uint8_t uCurXcpt; /* 0xfc */
|
---|
1558 | /** Exception / interrupt recursion depth. */
|
---|
1559 | int8_t cXcptRecursions; /* 0xfb */
|
---|
1560 |
|
---|
1561 | /** The next unused mapping index.
|
---|
1562 | * @todo try find room for this up with cActiveMappings. */
|
---|
1563 | uint8_t iNextMapping; /* 0xfd */
|
---|
1564 | uint8_t abAlignment7[1];
|
---|
1565 |
|
---|
1566 | /** Bounce buffer storage.
|
---|
1567 | * This runs in parallel to aMemMappings and aMemBbMappings. */
|
---|
1568 | struct
|
---|
1569 | {
|
---|
1570 | uint8_t ab[512];
|
---|
1571 | } aBounceBuffers[3]; /* 0x100 LB 0x600 */
|
---|
1572 |
|
---|
1573 |
|
---|
1574 | /** Pointer set jump buffer - ring-3 context. */
|
---|
1575 | R3PTRTYPE(jmp_buf *) pJmpBufR3;
|
---|
1576 | /** Pointer set jump buffer - ring-0 context. */
|
---|
1577 | R0PTRTYPE(jmp_buf *) pJmpBufR0;
|
---|
1578 |
|
---|
1579 | /** @todo Should move this near @a fCurXcpt later. */
|
---|
1580 | /** The CR2 for the current exception / interrupt. */
|
---|
1581 | uint64_t uCurXcptCr2;
|
---|
1582 | /** The error code for the current exception / interrupt. */
|
---|
1583 | uint32_t uCurXcptErr;
|
---|
1584 |
|
---|
1585 | /** @name Statistics
|
---|
1586 | * @{ */
|
---|
1587 | /** The number of instructions we've executed. */
|
---|
1588 | uint32_t cInstructions;
|
---|
1589 | /** The number of potential exits. */
|
---|
1590 | uint32_t cPotentialExits;
|
---|
1591 | /** The number of bytes data or stack written (mostly for IEMExecOneEx).
|
---|
1592 | * This may contain uncommitted writes. */
|
---|
1593 | uint32_t cbWritten;
|
---|
1594 | /** Counts the VERR_IEM_INSTR_NOT_IMPLEMENTED returns. */
|
---|
1595 | uint32_t cRetInstrNotImplemented;
|
---|
1596 | /** Counts the VERR_IEM_ASPECT_NOT_IMPLEMENTED returns. */
|
---|
1597 | uint32_t cRetAspectNotImplemented;
|
---|
1598 | /** Counts informational statuses returned (other than VINF_SUCCESS). */
|
---|
1599 | uint32_t cRetInfStatuses;
|
---|
1600 | /** Counts other error statuses returned. */
|
---|
1601 | uint32_t cRetErrStatuses;
|
---|
1602 | /** Number of times rcPassUp has been used. */
|
---|
1603 | uint32_t cRetPassUpStatus;
|
---|
1604 | /** Number of times RZ left with instruction commit pending for ring-3. */
|
---|
1605 | uint32_t cPendingCommit;
|
---|
1606 | /** Number of long jumps. */
|
---|
1607 | uint32_t cLongJumps;
|
---|
1608 | /** @} */
|
---|
1609 |
|
---|
1610 | /** @name Target CPU information.
|
---|
1611 | * @{ */
|
---|
1612 | #if IEM_CFG_TARGET_CPU == IEMTARGETCPU_DYNAMIC
|
---|
1613 | /** The target CPU. */
|
---|
1614 | uint8_t uTargetCpu;
|
---|
1615 | #else
|
---|
1616 | uint8_t bTargetCpuPadding;
|
---|
1617 | #endif
|
---|
1618 | /** For selecting assembly works matching the target CPU EFLAGS behaviour, see
|
---|
1619 | * IEMTARGETCPU_EFL_BEHAVIOR_XXX for values, with the 1st entry for when no
|
---|
1620 | * native host support and the 2nd for when there is.
|
---|
1621 | *
|
---|
1622 | * The two values are typically indexed by a g_CpumHostFeatures bit.
|
---|
1623 | *
|
---|
1624 | * This is for instance used for the BSF & BSR instructions where AMD and
|
---|
1625 | * Intel CPUs produce different EFLAGS. */
|
---|
1626 | uint8_t aidxTargetCpuEflFlavour[2];
|
---|
1627 |
|
---|
1628 | /** The CPU vendor. */
|
---|
1629 | CPUMCPUVENDOR enmCpuVendor;
|
---|
1630 | /** @} */
|
---|
1631 |
|
---|
1632 | /** @name Host CPU information.
|
---|
1633 | * @{ */
|
---|
1634 | /** The CPU vendor. */
|
---|
1635 | CPUMCPUVENDOR enmHostCpuVendor;
|
---|
1636 | /** @} */
|
---|
1637 |
|
---|
1638 | /** Counts RDMSR \#GP(0) LogRel(). */
|
---|
1639 | uint8_t cLogRelRdMsr;
|
---|
1640 | /** Counts WRMSR \#GP(0) LogRel(). */
|
---|
1641 | uint8_t cLogRelWrMsr;
|
---|
1642 | /** Alignment padding. */
|
---|
1643 | uint8_t abAlignment9[46];
|
---|
1644 |
|
---|
1645 | /** @name Recompilation
|
---|
1646 | * @{ */
|
---|
1647 | /** Pointer to the current translation block.
|
---|
1648 | * This can either be one being executed or one being compiled. */
|
---|
1649 | R3PTRTYPE(PIEMTB) pCurTbR3;
|
---|
1650 | /** Fixed TB used for threaded recompilation.
|
---|
1651 | * This is allocated once with maxed-out sizes and re-used afterwards. */
|
---|
1652 | R3PTRTYPE(PIEMTB) pThrdCompileTbR3;
|
---|
1653 | /** Pointer to the ring-3 TB cache for this EMT. */
|
---|
1654 | R3PTRTYPE(PIEMTBCACHE) pTbCacheR3;
|
---|
1655 | /** The PC (RIP) at the start of pCurTbR3/pCurTbR0.
|
---|
1656 | * The TBs are based on physical addresses, so this is needed to correleated
|
---|
1657 | * RIP to opcode bytes stored in the TB (AMD-V / VT-x). */
|
---|
1658 | uint64_t uCurTbStartPc;
|
---|
1659 | /** Number of threaded TBs executed. */
|
---|
1660 | uint64_t cTbExecThreaded;
|
---|
1661 | /** Number of native TBs executed. */
|
---|
1662 | uint64_t cTbExecNative;
|
---|
1663 | /** Whether we need to check the opcode bytes for the current instruction.
|
---|
1664 | * This is set by a previous instruction if it modified memory or similar. */
|
---|
1665 | bool fTbCheckOpcodes;
|
---|
1666 | /** Indicates whether and how we just branched - IEMBRANCHED_F_XXX. */
|
---|
1667 | uint8_t fTbBranched;
|
---|
1668 | /** Set when GCPhysInstrBuf is updated because of a page crossing. */
|
---|
1669 | bool fTbCrossedPage;
|
---|
1670 | /** Whether to end the current TB. */
|
---|
1671 | bool fEndTb;
|
---|
1672 | /** Number of instructions before we need emit an IRQ check call again.
|
---|
1673 | * This helps making sure we don't execute too long w/o checking for
|
---|
1674 | * interrupts and immediately following instructions that may enable
|
---|
1675 | * interrupts (e.g. POPF, IRET, STI). With STI an additional hack is
|
---|
1676 | * required to make sure we check following the next instruction as well, see
|
---|
1677 | * fTbCurInstrIsSti. */
|
---|
1678 | uint8_t cInstrTillIrqCheck;
|
---|
1679 | /** Indicates that the current instruction is an STI. This is set by the
|
---|
1680 | * iemCImpl_sti code and subsequently cleared by the recompiler. */
|
---|
1681 | bool fTbCurInstrIsSti;
|
---|
1682 | /** The size of the IEMTB::pabOpcodes allocation in pThrdCompileTbR3. */
|
---|
1683 | uint16_t cbOpcodesAllocated;
|
---|
1684 | /** The current instruction number in a native TB.
|
---|
1685 | * This is set by code that may trigger an unexpected TB exit (throw/longjmp)
|
---|
1686 | * and will be picked up by the TB execution loop. Only used when
|
---|
1687 | * IEMNATIVE_WITH_INSTRUCTION_COUNTING is defined. */
|
---|
1688 | uint8_t idxTbCurInstr;
|
---|
1689 | /** Spaced reserved for recompiler data / alignment. */
|
---|
1690 | bool afRecompilerStuff1[3];
|
---|
1691 | /** The virtual sync time at the last timer poll call. */
|
---|
1692 | uint32_t msRecompilerPollNow;
|
---|
1693 | /** The IEM_CIMPL_F_XXX mask for the current instruction. */
|
---|
1694 | uint32_t fTbCurInstr;
|
---|
1695 | /** The IEM_CIMPL_F_XXX mask for the previous instruction. */
|
---|
1696 | uint32_t fTbPrevInstr;
|
---|
1697 | /** Previous GCPhysInstrBuf value - only valid if fTbCrossedPage is set. */
|
---|
1698 | RTGCPHYS GCPhysInstrBufPrev;
|
---|
1699 | /** Copy of IEMCPU::GCPhysInstrBuf after decoding a branch instruction.
|
---|
1700 | * This is used together with fTbBranched and GCVirtTbBranchSrcBuf to determin
|
---|
1701 | * whether a branch instruction jumps to a new page or stays within the
|
---|
1702 | * current one. */
|
---|
1703 | RTGCPHYS GCPhysTbBranchSrcBuf;
|
---|
1704 | /** Copy of IEMCPU::uInstrBufPc after decoding a branch instruction. */
|
---|
1705 | uint64_t GCVirtTbBranchSrcBuf;
|
---|
1706 | /** Pointer to the ring-3 TB allocator for this EMT. */
|
---|
1707 | R3PTRTYPE(PIEMTBALLOCATOR) pTbAllocatorR3;
|
---|
1708 | /** Pointer to the ring-3 executable memory allocator for this EMT. */
|
---|
1709 | R3PTRTYPE(struct IEMEXECMEMALLOCATOR *) pExecMemAllocatorR3;
|
---|
1710 | /** Pointer to the native recompiler state for ring-3. */
|
---|
1711 | R3PTRTYPE(struct IEMRECOMPILERSTATE *) pNativeRecompilerStateR3;
|
---|
1712 | /** Alignment padding. */
|
---|
1713 | uint64_t auAlignment10[3];
|
---|
1714 | /** Statistics: Times TB execution was broken off before reaching the end. */
|
---|
1715 | STAMCOUNTER StatTbExecBreaks;
|
---|
1716 | /** Statistics: Times BltIn_CheckIrq breaks out of the TB. */
|
---|
1717 | STAMCOUNTER StatCheckIrqBreaks;
|
---|
1718 | /** Statistics: Times BltIn_CheckMode breaks out of the TB. */
|
---|
1719 | STAMCOUNTER StatCheckModeBreaks;
|
---|
1720 | /** Statistics: Times a post jump target check missed and had to find new TB. */
|
---|
1721 | STAMCOUNTER StatCheckBranchMisses;
|
---|
1722 | /** Statistics: Times a jump or page crossing required a TB with CS.LIM checking. */
|
---|
1723 | STAMCOUNTER StatCheckNeedCsLimChecking;
|
---|
1724 | /** Native TB statistics: Number of fully recompiled TBs. */
|
---|
1725 | STAMCOUNTER StatNativeFullyRecompiledTbs;
|
---|
1726 | /** Threaded TB statistics: Number of instructions per TB. */
|
---|
1727 | STAMPROFILE StatTbThreadedInstr;
|
---|
1728 | /** Threaded TB statistics: Number of calls per TB. */
|
---|
1729 | STAMPROFILE StatTbThreadedCalls;
|
---|
1730 | /** Native TB statistics: Native code size per TB. */
|
---|
1731 | STAMPROFILE StatTbNativeCode;
|
---|
1732 | /** Native TB statistics: Profiling native recompilation. */
|
---|
1733 | STAMPROFILE StatNativeRecompilation;
|
---|
1734 | /** Native TB statistics: Number of calls per TB that were recompiled properly. */
|
---|
1735 | STAMPROFILE StatNativeCallsRecompiled;
|
---|
1736 | /** Native TB statistics: Number of threaded calls per TB that weren't recompiled. */
|
---|
1737 | STAMPROFILE StatNativeCallsThreaded;
|
---|
1738 | /** @} */
|
---|
1739 |
|
---|
1740 | /** Data TLB.
|
---|
1741 | * @remarks Must be 64-byte aligned. */
|
---|
1742 | IEMTLB DataTlb;
|
---|
1743 | /** Instruction TLB.
|
---|
1744 | * @remarks Must be 64-byte aligned. */
|
---|
1745 | IEMTLB CodeTlb;
|
---|
1746 |
|
---|
1747 | /** Exception statistics. */
|
---|
1748 | STAMCOUNTER aStatXcpts[32];
|
---|
1749 | /** Interrupt statistics. */
|
---|
1750 | uint32_t aStatInts[256];
|
---|
1751 |
|
---|
1752 | #if defined(VBOX_WITH_STATISTICS) && !defined(IN_TSTVMSTRUCT) && !defined(DOXYGEN_RUNNING)
|
---|
1753 | /** Instruction statistics for ring-0/raw-mode. */
|
---|
1754 | IEMINSTRSTATS StatsRZ;
|
---|
1755 | /** Instruction statistics for ring-3. */
|
---|
1756 | IEMINSTRSTATS StatsR3;
|
---|
1757 | #endif
|
---|
1758 | } IEMCPU;
|
---|
1759 | AssertCompileMemberOffset(IEMCPU, cActiveMappings, 0x4f);
|
---|
1760 | AssertCompileMemberAlignment(IEMCPU, aMemMappings, 16);
|
---|
1761 | AssertCompileMemberAlignment(IEMCPU, aMemMappingLocks, 16);
|
---|
1762 | AssertCompileMemberAlignment(IEMCPU, aBounceBuffers, 64);
|
---|
1763 | AssertCompileMemberAlignment(IEMCPU, DataTlb, 64);
|
---|
1764 | AssertCompileMemberAlignment(IEMCPU, CodeTlb, 64);
|
---|
1765 |
|
---|
1766 | /** Pointer to the per-CPU IEM state. */
|
---|
1767 | typedef IEMCPU *PIEMCPU;
|
---|
1768 | /** Pointer to the const per-CPU IEM state. */
|
---|
1769 | typedef IEMCPU const *PCIEMCPU;
|
---|
1770 |
|
---|
1771 |
|
---|
1772 | /** @def IEM_GET_CTX
|
---|
1773 | * Gets the guest CPU context for the calling EMT.
|
---|
1774 | * @returns PCPUMCTX
|
---|
1775 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
1776 | */
|
---|
1777 | #define IEM_GET_CTX(a_pVCpu) (&(a_pVCpu)->cpum.GstCtx)
|
---|
1778 |
|
---|
1779 | /** @def IEM_CTX_ASSERT
|
---|
1780 | * Asserts that the @a a_fExtrnMbz is present in the CPU context.
|
---|
1781 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
1782 | * @param a_fExtrnMbz The mask of CPUMCTX_EXTRN_XXX flags that must be zero.
|
---|
1783 | */
|
---|
1784 | #define IEM_CTX_ASSERT(a_pVCpu, a_fExtrnMbz) \
|
---|
1785 | AssertMsg(!((a_pVCpu)->cpum.GstCtx.fExtrn & (a_fExtrnMbz)), \
|
---|
1786 | ("fExtrn=%#RX64 & fExtrnMbz=%#RX64 -> %#RX64\n", \
|
---|
1787 | (a_pVCpu)->cpum.GstCtx.fExtrn, (a_fExtrnMbz), (a_pVCpu)->cpum.GstCtx.fExtrn & (a_fExtrnMbz) ))
|
---|
1788 |
|
---|
1789 | /** @def IEM_CTX_IMPORT_RET
|
---|
1790 | * Makes sure the CPU context bits given by @a a_fExtrnImport are imported.
|
---|
1791 | *
|
---|
1792 | * Will call the keep to import the bits as needed.
|
---|
1793 | *
|
---|
1794 | * Returns on import failure.
|
---|
1795 | *
|
---|
1796 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
1797 | * @param a_fExtrnImport The mask of CPUMCTX_EXTRN_XXX flags to import.
|
---|
1798 | */
|
---|
1799 | #define IEM_CTX_IMPORT_RET(a_pVCpu, a_fExtrnImport) \
|
---|
1800 | do { \
|
---|
1801 | if (!((a_pVCpu)->cpum.GstCtx.fExtrn & (a_fExtrnImport))) \
|
---|
1802 | { /* likely */ } \
|
---|
1803 | else \
|
---|
1804 | { \
|
---|
1805 | int rcCtxImport = CPUMImportGuestStateOnDemand(a_pVCpu, a_fExtrnImport); \
|
---|
1806 | AssertRCReturn(rcCtxImport, rcCtxImport); \
|
---|
1807 | } \
|
---|
1808 | } while (0)
|
---|
1809 |
|
---|
1810 | /** @def IEM_CTX_IMPORT_NORET
|
---|
1811 | * Makes sure the CPU context bits given by @a a_fExtrnImport are imported.
|
---|
1812 | *
|
---|
1813 | * Will call the keep to import the bits as needed.
|
---|
1814 | *
|
---|
1815 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
1816 | * @param a_fExtrnImport The mask of CPUMCTX_EXTRN_XXX flags to import.
|
---|
1817 | */
|
---|
1818 | #define IEM_CTX_IMPORT_NORET(a_pVCpu, a_fExtrnImport) \
|
---|
1819 | do { \
|
---|
1820 | if (!((a_pVCpu)->cpum.GstCtx.fExtrn & (a_fExtrnImport))) \
|
---|
1821 | { /* likely */ } \
|
---|
1822 | else \
|
---|
1823 | { \
|
---|
1824 | int rcCtxImport = CPUMImportGuestStateOnDemand(a_pVCpu, a_fExtrnImport); \
|
---|
1825 | AssertLogRelRC(rcCtxImport); \
|
---|
1826 | } \
|
---|
1827 | } while (0)
|
---|
1828 |
|
---|
1829 | /** @def IEM_CTX_IMPORT_JMP
|
---|
1830 | * Makes sure the CPU context bits given by @a a_fExtrnImport are imported.
|
---|
1831 | *
|
---|
1832 | * Will call the keep to import the bits as needed.
|
---|
1833 | *
|
---|
1834 | * Jumps on import failure.
|
---|
1835 | *
|
---|
1836 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
1837 | * @param a_fExtrnImport The mask of CPUMCTX_EXTRN_XXX flags to import.
|
---|
1838 | */
|
---|
1839 | #define IEM_CTX_IMPORT_JMP(a_pVCpu, a_fExtrnImport) \
|
---|
1840 | do { \
|
---|
1841 | if (!((a_pVCpu)->cpum.GstCtx.fExtrn & (a_fExtrnImport))) \
|
---|
1842 | { /* likely */ } \
|
---|
1843 | else \
|
---|
1844 | { \
|
---|
1845 | int rcCtxImport = CPUMImportGuestStateOnDemand(a_pVCpu, a_fExtrnImport); \
|
---|
1846 | AssertRCStmt(rcCtxImport, IEM_DO_LONGJMP(pVCpu, rcCtxImport)); \
|
---|
1847 | } \
|
---|
1848 | } while (0)
|
---|
1849 |
|
---|
1850 |
|
---|
1851 |
|
---|
1852 | /** @def IEM_GET_TARGET_CPU
|
---|
1853 | * Gets the current IEMTARGETCPU value.
|
---|
1854 | * @returns IEMTARGETCPU value.
|
---|
1855 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
1856 | */
|
---|
1857 | #if IEM_CFG_TARGET_CPU != IEMTARGETCPU_DYNAMIC
|
---|
1858 | # define IEM_GET_TARGET_CPU(a_pVCpu) (IEM_CFG_TARGET_CPU)
|
---|
1859 | #else
|
---|
1860 | # define IEM_GET_TARGET_CPU(a_pVCpu) ((a_pVCpu)->iem.s.uTargetCpu)
|
---|
1861 | #endif
|
---|
1862 |
|
---|
1863 | /** @def IEM_GET_INSTR_LEN
|
---|
1864 | * Gets the instruction length. */
|
---|
1865 | #ifdef IEM_WITH_CODE_TLB
|
---|
1866 | # define IEM_GET_INSTR_LEN(a_pVCpu) ((a_pVCpu)->iem.s.offInstrNextByte - (uint32_t)(int32_t)(a_pVCpu)->iem.s.offCurInstrStart)
|
---|
1867 | #else
|
---|
1868 | # define IEM_GET_INSTR_LEN(a_pVCpu) ((a_pVCpu)->iem.s.offOpcode)
|
---|
1869 | #endif
|
---|
1870 |
|
---|
1871 | /** @def IEM_TRY_SETJMP
|
---|
1872 | * Wrapper around setjmp / try, hiding all the ugly differences.
|
---|
1873 | *
|
---|
1874 | * @note Use with extreme care as this is a fragile macro.
|
---|
1875 | * @param a_pVCpu The cross context virtual CPU structure of the calling EMT.
|
---|
1876 | * @param a_rcTarget The variable that should receive the status code in case
|
---|
1877 | * of a longjmp/throw.
|
---|
1878 | */
|
---|
1879 | /** @def IEM_TRY_SETJMP_AGAIN
|
---|
1880 | * For when setjmp / try is used again in the same variable scope as a previous
|
---|
1881 | * IEM_TRY_SETJMP invocation.
|
---|
1882 | */
|
---|
1883 | /** @def IEM_CATCH_LONGJMP_BEGIN
|
---|
1884 | * Start wrapper for catch / setjmp-else.
|
---|
1885 | *
|
---|
1886 | * This will set up a scope.
|
---|
1887 | *
|
---|
1888 | * @note Use with extreme care as this is a fragile macro.
|
---|
1889 | * @param a_pVCpu The cross context virtual CPU structure of the calling EMT.
|
---|
1890 | * @param a_rcTarget The variable that should receive the status code in case
|
---|
1891 | * of a longjmp/throw.
|
---|
1892 | */
|
---|
1893 | /** @def IEM_CATCH_LONGJMP_END
|
---|
1894 | * End wrapper for catch / setjmp-else.
|
---|
1895 | *
|
---|
1896 | * This will close the scope set up by IEM_CATCH_LONGJMP_BEGIN and clean up the
|
---|
1897 | * state.
|
---|
1898 | *
|
---|
1899 | * @note Use with extreme care as this is a fragile macro.
|
---|
1900 | * @param a_pVCpu The cross context virtual CPU structure of the calling EMT.
|
---|
1901 | */
|
---|
1902 | #if defined(IEM_WITH_SETJMP) || defined(DOXYGEN_RUNNING)
|
---|
1903 | # ifdef IEM_WITH_THROW_CATCH
|
---|
1904 | # define IEM_TRY_SETJMP(a_pVCpu, a_rcTarget) \
|
---|
1905 | a_rcTarget = VINF_SUCCESS; \
|
---|
1906 | try
|
---|
1907 | # define IEM_TRY_SETJMP_AGAIN(a_pVCpu, a_rcTarget) \
|
---|
1908 | IEM_TRY_SETJMP(a_pVCpu, a_rcTarget)
|
---|
1909 | # define IEM_CATCH_LONGJMP_BEGIN(a_pVCpu, a_rcTarget) \
|
---|
1910 | catch (int rcThrown) \
|
---|
1911 | { \
|
---|
1912 | a_rcTarget = rcThrown
|
---|
1913 | # define IEM_CATCH_LONGJMP_END(a_pVCpu) \
|
---|
1914 | } \
|
---|
1915 | ((void)0)
|
---|
1916 | # else /* !IEM_WITH_THROW_CATCH */
|
---|
1917 | # define IEM_TRY_SETJMP(a_pVCpu, a_rcTarget) \
|
---|
1918 | jmp_buf JmpBuf; \
|
---|
1919 | jmp_buf * volatile pSavedJmpBuf = (a_pVCpu)->iem.s.CTX_SUFF(pJmpBuf); \
|
---|
1920 | (a_pVCpu)->iem.s.CTX_SUFF(pJmpBuf) = &JmpBuf; \
|
---|
1921 | if ((rcStrict = setjmp(JmpBuf)) == 0)
|
---|
1922 | # define IEM_TRY_SETJMP_AGAIN(a_pVCpu, a_rcTarget) \
|
---|
1923 | pSavedJmpBuf = (a_pVCpu)->iem.s.CTX_SUFF(pJmpBuf); \
|
---|
1924 | (a_pVCpu)->iem.s.CTX_SUFF(pJmpBuf) = &JmpBuf; \
|
---|
1925 | if ((rcStrict = setjmp(JmpBuf)) == 0)
|
---|
1926 | # define IEM_CATCH_LONGJMP_BEGIN(a_pVCpu, a_rcTarget) \
|
---|
1927 | else \
|
---|
1928 | { \
|
---|
1929 | ((void)0)
|
---|
1930 | # define IEM_CATCH_LONGJMP_END(a_pVCpu) \
|
---|
1931 | } \
|
---|
1932 | (a_pVCpu)->iem.s.CTX_SUFF(pJmpBuf) = pSavedJmpBuf
|
---|
1933 | # endif /* !IEM_WITH_THROW_CATCH */
|
---|
1934 | #endif /* IEM_WITH_SETJMP */
|
---|
1935 |
|
---|
1936 |
|
---|
1937 | /**
|
---|
1938 | * Shared per-VM IEM data.
|
---|
1939 | */
|
---|
1940 | typedef struct IEM
|
---|
1941 | {
|
---|
1942 | /** The VMX APIC-access page handler type. */
|
---|
1943 | PGMPHYSHANDLERTYPE hVmxApicAccessPage;
|
---|
1944 | #ifndef VBOX_WITHOUT_CPUID_HOST_CALL
|
---|
1945 | /** Set if the CPUID host call functionality is enabled. */
|
---|
1946 | bool fCpuIdHostCall;
|
---|
1947 | #endif
|
---|
1948 | } IEM;
|
---|
1949 |
|
---|
1950 |
|
---|
1951 |
|
---|
1952 | /** @name IEM_ACCESS_XXX - Access details.
|
---|
1953 | * @{ */
|
---|
1954 | #define IEM_ACCESS_INVALID UINT32_C(0x000000ff)
|
---|
1955 | #define IEM_ACCESS_TYPE_READ UINT32_C(0x00000001)
|
---|
1956 | #define IEM_ACCESS_TYPE_WRITE UINT32_C(0x00000002)
|
---|
1957 | #define IEM_ACCESS_TYPE_EXEC UINT32_C(0x00000004)
|
---|
1958 | #define IEM_ACCESS_TYPE_MASK UINT32_C(0x00000007)
|
---|
1959 | #define IEM_ACCESS_WHAT_CODE UINT32_C(0x00000010)
|
---|
1960 | #define IEM_ACCESS_WHAT_DATA UINT32_C(0x00000020)
|
---|
1961 | #define IEM_ACCESS_WHAT_STACK UINT32_C(0x00000030)
|
---|
1962 | #define IEM_ACCESS_WHAT_SYS UINT32_C(0x00000040)
|
---|
1963 | #define IEM_ACCESS_WHAT_MASK UINT32_C(0x00000070)
|
---|
1964 | /** The writes are partial, so if initialize the bounce buffer with the
|
---|
1965 | * orignal RAM content. */
|
---|
1966 | #define IEM_ACCESS_PARTIAL_WRITE UINT32_C(0x00000100)
|
---|
1967 | /** Used in aMemMappings to indicate that the entry is bounce buffered. */
|
---|
1968 | #define IEM_ACCESS_BOUNCE_BUFFERED UINT32_C(0x00000200)
|
---|
1969 | /** Bounce buffer with ring-3 write pending, first page. */
|
---|
1970 | #define IEM_ACCESS_PENDING_R3_WRITE_1ST UINT32_C(0x00000400)
|
---|
1971 | /** Bounce buffer with ring-3 write pending, second page. */
|
---|
1972 | #define IEM_ACCESS_PENDING_R3_WRITE_2ND UINT32_C(0x00000800)
|
---|
1973 | /** Not locked, accessed via the TLB. */
|
---|
1974 | #define IEM_ACCESS_NOT_LOCKED UINT32_C(0x00001000)
|
---|
1975 | /** Valid bit mask. */
|
---|
1976 | #define IEM_ACCESS_VALID_MASK UINT32_C(0x00001fff)
|
---|
1977 | /** Shift count for the TLB flags (upper word). */
|
---|
1978 | #define IEM_ACCESS_SHIFT_TLB_FLAGS 16
|
---|
1979 |
|
---|
1980 | /** Read+write data alias. */
|
---|
1981 | #define IEM_ACCESS_DATA_RW (IEM_ACCESS_TYPE_READ | IEM_ACCESS_TYPE_WRITE | IEM_ACCESS_WHAT_DATA)
|
---|
1982 | /** Write data alias. */
|
---|
1983 | #define IEM_ACCESS_DATA_W (IEM_ACCESS_TYPE_WRITE | IEM_ACCESS_WHAT_DATA)
|
---|
1984 | /** Read data alias. */
|
---|
1985 | #define IEM_ACCESS_DATA_R (IEM_ACCESS_TYPE_READ | IEM_ACCESS_WHAT_DATA)
|
---|
1986 | /** Instruction fetch alias. */
|
---|
1987 | #define IEM_ACCESS_INSTRUCTION (IEM_ACCESS_TYPE_EXEC | IEM_ACCESS_WHAT_CODE)
|
---|
1988 | /** Stack write alias. */
|
---|
1989 | #define IEM_ACCESS_STACK_W (IEM_ACCESS_TYPE_WRITE | IEM_ACCESS_WHAT_STACK)
|
---|
1990 | /** Stack read alias. */
|
---|
1991 | #define IEM_ACCESS_STACK_R (IEM_ACCESS_TYPE_READ | IEM_ACCESS_WHAT_STACK)
|
---|
1992 | /** Stack read+write alias. */
|
---|
1993 | #define IEM_ACCESS_STACK_RW (IEM_ACCESS_TYPE_READ | IEM_ACCESS_TYPE_WRITE | IEM_ACCESS_WHAT_STACK)
|
---|
1994 | /** Read system table alias. */
|
---|
1995 | #define IEM_ACCESS_SYS_R (IEM_ACCESS_TYPE_READ | IEM_ACCESS_WHAT_SYS)
|
---|
1996 | /** Read+write system table alias. */
|
---|
1997 | #define IEM_ACCESS_SYS_RW (IEM_ACCESS_TYPE_READ | IEM_ACCESS_TYPE_WRITE | IEM_ACCESS_WHAT_SYS)
|
---|
1998 | /** @} */
|
---|
1999 |
|
---|
2000 | /** @name Prefix constants (IEMCPU::fPrefixes)
|
---|
2001 | * @{ */
|
---|
2002 | #define IEM_OP_PRF_SEG_CS RT_BIT_32(0) /**< CS segment prefix (0x2e). */
|
---|
2003 | #define IEM_OP_PRF_SEG_SS RT_BIT_32(1) /**< SS segment prefix (0x36). */
|
---|
2004 | #define IEM_OP_PRF_SEG_DS RT_BIT_32(2) /**< DS segment prefix (0x3e). */
|
---|
2005 | #define IEM_OP_PRF_SEG_ES RT_BIT_32(3) /**< ES segment prefix (0x26). */
|
---|
2006 | #define IEM_OP_PRF_SEG_FS RT_BIT_32(4) /**< FS segment prefix (0x64). */
|
---|
2007 | #define IEM_OP_PRF_SEG_GS RT_BIT_32(5) /**< GS segment prefix (0x65). */
|
---|
2008 | #define IEM_OP_PRF_SEG_MASK UINT32_C(0x3f)
|
---|
2009 |
|
---|
2010 | #define IEM_OP_PRF_SIZE_OP RT_BIT_32(8) /**< Operand size prefix (0x66). */
|
---|
2011 | #define IEM_OP_PRF_SIZE_REX_W RT_BIT_32(9) /**< REX.W prefix (0x48-0x4f). */
|
---|
2012 | #define IEM_OP_PRF_SIZE_ADDR RT_BIT_32(10) /**< Address size prefix (0x67). */
|
---|
2013 |
|
---|
2014 | #define IEM_OP_PRF_LOCK RT_BIT_32(16) /**< Lock prefix (0xf0). */
|
---|
2015 | #define IEM_OP_PRF_REPNZ RT_BIT_32(17) /**< Repeat-not-zero prefix (0xf2). */
|
---|
2016 | #define IEM_OP_PRF_REPZ RT_BIT_32(18) /**< Repeat-if-zero prefix (0xf3). */
|
---|
2017 |
|
---|
2018 | #define IEM_OP_PRF_REX RT_BIT_32(24) /**< Any REX prefix (0x40-0x4f). */
|
---|
2019 | #define IEM_OP_PRF_REX_R RT_BIT_32(25) /**< REX.R prefix (0x44,0x45,0x46,0x47,0x4c,0x4d,0x4e,0x4f). */
|
---|
2020 | #define IEM_OP_PRF_REX_B RT_BIT_32(26) /**< REX.B prefix (0x41,0x43,0x45,0x47,0x49,0x4b,0x4d,0x4f). */
|
---|
2021 | #define IEM_OP_PRF_REX_X RT_BIT_32(27) /**< REX.X prefix (0x42,0x43,0x46,0x47,0x4a,0x4b,0x4e,0x4f). */
|
---|
2022 | /** Mask with all the REX prefix flags.
|
---|
2023 | * This is generally for use when needing to undo the REX prefixes when they
|
---|
2024 | * are followed legacy prefixes and therefore does not immediately preceed
|
---|
2025 | * the first opcode byte.
|
---|
2026 | * For testing whether any REX prefix is present, use IEM_OP_PRF_REX instead. */
|
---|
2027 | #define IEM_OP_PRF_REX_MASK (IEM_OP_PRF_REX | IEM_OP_PRF_REX_R | IEM_OP_PRF_REX_B | IEM_OP_PRF_REX_X | IEM_OP_PRF_SIZE_REX_W )
|
---|
2028 |
|
---|
2029 | #define IEM_OP_PRF_VEX RT_BIT_32(28) /**< Indiciates VEX prefix. */
|
---|
2030 | #define IEM_OP_PRF_EVEX RT_BIT_32(29) /**< Indiciates EVEX prefix. */
|
---|
2031 | #define IEM_OP_PRF_XOP RT_BIT_32(30) /**< Indiciates XOP prefix. */
|
---|
2032 | /** @} */
|
---|
2033 |
|
---|
2034 | /** @name IEMOPFORM_XXX - Opcode forms
|
---|
2035 | * @note These are ORed together with IEMOPHINT_XXX.
|
---|
2036 | * @{ */
|
---|
2037 | /** ModR/M: reg, r/m */
|
---|
2038 | #define IEMOPFORM_RM 0
|
---|
2039 | /** ModR/M: reg, r/m (register) */
|
---|
2040 | #define IEMOPFORM_RM_REG (IEMOPFORM_RM | IEMOPFORM_MOD3)
|
---|
2041 | /** ModR/M: reg, r/m (memory) */
|
---|
2042 | #define IEMOPFORM_RM_MEM (IEMOPFORM_RM | IEMOPFORM_NOT_MOD3)
|
---|
2043 | /** ModR/M: reg, r/m */
|
---|
2044 | #define IEMOPFORM_RMI 1
|
---|
2045 | /** ModR/M: reg, r/m (register) */
|
---|
2046 | #define IEMOPFORM_RMI_REG (IEMOPFORM_RM | IEMOPFORM_MOD3)
|
---|
2047 | /** ModR/M: reg, r/m (memory) */
|
---|
2048 | #define IEMOPFORM_RMI_MEM (IEMOPFORM_RM | IEMOPFORM_NOT_MOD3)
|
---|
2049 | /** ModR/M: r/m, reg */
|
---|
2050 | #define IEMOPFORM_MR 2
|
---|
2051 | /** ModR/M: r/m (register), reg */
|
---|
2052 | #define IEMOPFORM_MR_REG (IEMOPFORM_MR | IEMOPFORM_MOD3)
|
---|
2053 | /** ModR/M: r/m (memory), reg */
|
---|
2054 | #define IEMOPFORM_MR_MEM (IEMOPFORM_MR | IEMOPFORM_NOT_MOD3)
|
---|
2055 | /** ModR/M: r/m, reg */
|
---|
2056 | #define IEMOPFORM_MRI 3
|
---|
2057 | /** ModR/M: r/m (register), reg */
|
---|
2058 | #define IEMOPFORM_MRI_REG (IEMOPFORM_MR | IEMOPFORM_MOD3)
|
---|
2059 | /** ModR/M: r/m (memory), reg */
|
---|
2060 | #define IEMOPFORM_MRI_MEM (IEMOPFORM_MR | IEMOPFORM_NOT_MOD3)
|
---|
2061 | /** ModR/M: r/m only */
|
---|
2062 | #define IEMOPFORM_M 4
|
---|
2063 | /** ModR/M: r/m only (register). */
|
---|
2064 | #define IEMOPFORM_M_REG (IEMOPFORM_M | IEMOPFORM_MOD3)
|
---|
2065 | /** ModR/M: r/m only (memory). */
|
---|
2066 | #define IEMOPFORM_M_MEM (IEMOPFORM_M | IEMOPFORM_NOT_MOD3)
|
---|
2067 | /** ModR/M: reg only */
|
---|
2068 | #define IEMOPFORM_R 5
|
---|
2069 |
|
---|
2070 | /** VEX+ModR/M: reg, r/m */
|
---|
2071 | #define IEMOPFORM_VEX_RM 8
|
---|
2072 | /** VEX+ModR/M: reg, r/m (register) */
|
---|
2073 | #define IEMOPFORM_VEX_RM_REG (IEMOPFORM_VEX_RM | IEMOPFORM_MOD3)
|
---|
2074 | /** VEX+ModR/M: reg, r/m (memory) */
|
---|
2075 | #define IEMOPFORM_VEX_RM_MEM (IEMOPFORM_VEX_RM | IEMOPFORM_NOT_MOD3)
|
---|
2076 | /** VEX+ModR/M: r/m, reg */
|
---|
2077 | #define IEMOPFORM_VEX_MR 9
|
---|
2078 | /** VEX+ModR/M: r/m (register), reg */
|
---|
2079 | #define IEMOPFORM_VEX_MR_REG (IEMOPFORM_VEX_MR | IEMOPFORM_MOD3)
|
---|
2080 | /** VEX+ModR/M: r/m (memory), reg */
|
---|
2081 | #define IEMOPFORM_VEX_MR_MEM (IEMOPFORM_VEX_MR | IEMOPFORM_NOT_MOD3)
|
---|
2082 | /** VEX+ModR/M: r/m only */
|
---|
2083 | #define IEMOPFORM_VEX_M 10
|
---|
2084 | /** VEX+ModR/M: r/m only (register). */
|
---|
2085 | #define IEMOPFORM_VEX_M_REG (IEMOPFORM_VEX_M | IEMOPFORM_MOD3)
|
---|
2086 | /** VEX+ModR/M: r/m only (memory). */
|
---|
2087 | #define IEMOPFORM_VEX_M_MEM (IEMOPFORM_VEX_M | IEMOPFORM_NOT_MOD3)
|
---|
2088 | /** VEX+ModR/M: reg only */
|
---|
2089 | #define IEMOPFORM_VEX_R 11
|
---|
2090 | /** VEX+ModR/M: reg, vvvv, r/m */
|
---|
2091 | #define IEMOPFORM_VEX_RVM 12
|
---|
2092 | /** VEX+ModR/M: reg, vvvv, r/m (register). */
|
---|
2093 | #define IEMOPFORM_VEX_RVM_REG (IEMOPFORM_VEX_RVM | IEMOPFORM_MOD3)
|
---|
2094 | /** VEX+ModR/M: reg, vvvv, r/m (memory). */
|
---|
2095 | #define IEMOPFORM_VEX_RVM_MEM (IEMOPFORM_VEX_RVM | IEMOPFORM_NOT_MOD3)
|
---|
2096 | /** VEX+ModR/M: reg, r/m, vvvv */
|
---|
2097 | #define IEMOPFORM_VEX_RMV 13
|
---|
2098 | /** VEX+ModR/M: reg, r/m, vvvv (register). */
|
---|
2099 | #define IEMOPFORM_VEX_RMV_REG (IEMOPFORM_VEX_RMV | IEMOPFORM_MOD3)
|
---|
2100 | /** VEX+ModR/M: reg, r/m, vvvv (memory). */
|
---|
2101 | #define IEMOPFORM_VEX_RMV_MEM (IEMOPFORM_VEX_RMV | IEMOPFORM_NOT_MOD3)
|
---|
2102 | /** VEX+ModR/M: reg, r/m, imm8 */
|
---|
2103 | #define IEMOPFORM_VEX_RMI 14
|
---|
2104 | /** VEX+ModR/M: reg, r/m, imm8 (register). */
|
---|
2105 | #define IEMOPFORM_VEX_RMI_REG (IEMOPFORM_VEX_RMI | IEMOPFORM_MOD3)
|
---|
2106 | /** VEX+ModR/M: reg, r/m, imm8 (memory). */
|
---|
2107 | #define IEMOPFORM_VEX_RMI_MEM (IEMOPFORM_VEX_RMI | IEMOPFORM_NOT_MOD3)
|
---|
2108 | /** VEX+ModR/M: r/m, vvvv, reg */
|
---|
2109 | #define IEMOPFORM_VEX_MVR 15
|
---|
2110 | /** VEX+ModR/M: r/m, vvvv, reg (register) */
|
---|
2111 | #define IEMOPFORM_VEX_MVR_REG (IEMOPFORM_VEX_MVR | IEMOPFORM_MOD3)
|
---|
2112 | /** VEX+ModR/M: r/m, vvvv, reg (memory) */
|
---|
2113 | #define IEMOPFORM_VEX_MVR_MEM (IEMOPFORM_VEX_MVR | IEMOPFORM_NOT_MOD3)
|
---|
2114 | /** VEX+ModR/M+/n: vvvv, r/m */
|
---|
2115 | #define IEMOPFORM_VEX_VM 16
|
---|
2116 | /** VEX+ModR/M+/n: vvvv, r/m (register) */
|
---|
2117 | #define IEMOPFORM_VEX_VM_REG (IEMOPFORM_VEX_VM | IEMOPFORM_MOD3)
|
---|
2118 | /** VEX+ModR/M+/n: vvvv, r/m (memory) */
|
---|
2119 | #define IEMOPFORM_VEX_VM_MEM (IEMOPFORM_VEX_VM | IEMOPFORM_NOT_MOD3)
|
---|
2120 |
|
---|
2121 | /** Fixed register instruction, no R/M. */
|
---|
2122 | #define IEMOPFORM_FIXED 32
|
---|
2123 |
|
---|
2124 | /** The r/m is a register. */
|
---|
2125 | #define IEMOPFORM_MOD3 RT_BIT_32(8)
|
---|
2126 | /** The r/m is a memory access. */
|
---|
2127 | #define IEMOPFORM_NOT_MOD3 RT_BIT_32(9)
|
---|
2128 | /** @} */
|
---|
2129 |
|
---|
2130 | /** @name IEMOPHINT_XXX - Additional Opcode Hints
|
---|
2131 | * @note These are ORed together with IEMOPFORM_XXX.
|
---|
2132 | * @{ */
|
---|
2133 | /** Ignores the operand size prefix (66h). */
|
---|
2134 | #define IEMOPHINT_IGNORES_OZ_PFX RT_BIT_32(10)
|
---|
2135 | /** Ignores REX.W (aka WIG). */
|
---|
2136 | #define IEMOPHINT_IGNORES_REXW RT_BIT_32(11)
|
---|
2137 | /** Both the operand size prefixes (66h + REX.W) are ignored. */
|
---|
2138 | #define IEMOPHINT_IGNORES_OP_SIZES (IEMOPHINT_IGNORES_OZ_PFX | IEMOPHINT_IGNORES_REXW)
|
---|
2139 | /** Allowed with the lock prefix. */
|
---|
2140 | #define IEMOPHINT_LOCK_ALLOWED RT_BIT_32(11)
|
---|
2141 | /** The VEX.L value is ignored (aka LIG). */
|
---|
2142 | #define IEMOPHINT_VEX_L_IGNORED RT_BIT_32(12)
|
---|
2143 | /** The VEX.L value must be zero (i.e. 128-bit width only). */
|
---|
2144 | #define IEMOPHINT_VEX_L_ZERO RT_BIT_32(13)
|
---|
2145 | /** The VEX.V value must be zero. */
|
---|
2146 | #define IEMOPHINT_VEX_V_ZERO RT_BIT_32(14)
|
---|
2147 |
|
---|
2148 | /** Hint to IEMAllInstructionPython.py that this macro should be skipped. */
|
---|
2149 | #define IEMOPHINT_SKIP_PYTHON RT_BIT_32(31)
|
---|
2150 | /** @} */
|
---|
2151 |
|
---|
2152 | /**
|
---|
2153 | * Possible hardware task switch sources.
|
---|
2154 | */
|
---|
2155 | typedef enum IEMTASKSWITCH
|
---|
2156 | {
|
---|
2157 | /** Task switch caused by an interrupt/exception. */
|
---|
2158 | IEMTASKSWITCH_INT_XCPT = 1,
|
---|
2159 | /** Task switch caused by a far CALL. */
|
---|
2160 | IEMTASKSWITCH_CALL,
|
---|
2161 | /** Task switch caused by a far JMP. */
|
---|
2162 | IEMTASKSWITCH_JUMP,
|
---|
2163 | /** Task switch caused by an IRET. */
|
---|
2164 | IEMTASKSWITCH_IRET
|
---|
2165 | } IEMTASKSWITCH;
|
---|
2166 | AssertCompileSize(IEMTASKSWITCH, 4);
|
---|
2167 |
|
---|
2168 | /**
|
---|
2169 | * Possible CrX load (write) sources.
|
---|
2170 | */
|
---|
2171 | typedef enum IEMACCESSCRX
|
---|
2172 | {
|
---|
2173 | /** CrX access caused by 'mov crX' instruction. */
|
---|
2174 | IEMACCESSCRX_MOV_CRX,
|
---|
2175 | /** CrX (CR0) write caused by 'lmsw' instruction. */
|
---|
2176 | IEMACCESSCRX_LMSW,
|
---|
2177 | /** CrX (CR0) write caused by 'clts' instruction. */
|
---|
2178 | IEMACCESSCRX_CLTS,
|
---|
2179 | /** CrX (CR0) read caused by 'smsw' instruction. */
|
---|
2180 | IEMACCESSCRX_SMSW
|
---|
2181 | } IEMACCESSCRX;
|
---|
2182 |
|
---|
2183 | #ifdef VBOX_WITH_NESTED_HWVIRT_VMX
|
---|
2184 | /** @name IEM_SLAT_FAIL_XXX - Second-level address translation failure information.
|
---|
2185 | *
|
---|
2186 | * These flags provide further context to SLAT page-walk failures that could not be
|
---|
2187 | * determined by PGM (e.g, PGM is not privy to memory access permissions).
|
---|
2188 | *
|
---|
2189 | * @{
|
---|
2190 | */
|
---|
2191 | /** Translating a nested-guest linear address failed accessing a nested-guest
|
---|
2192 | * physical address. */
|
---|
2193 | # define IEM_SLAT_FAIL_LINEAR_TO_PHYS_ADDR RT_BIT_32(0)
|
---|
2194 | /** Translating a nested-guest linear address failed accessing a
|
---|
2195 | * paging-structure entry or updating accessed/dirty bits. */
|
---|
2196 | # define IEM_SLAT_FAIL_LINEAR_TO_PAGE_TABLE RT_BIT_32(1)
|
---|
2197 | /** @} */
|
---|
2198 |
|
---|
2199 | DECLCALLBACK(FNPGMPHYSHANDLER) iemVmxApicAccessPageHandler;
|
---|
2200 | # ifndef IN_RING3
|
---|
2201 | DECLCALLBACK(FNPGMRZPHYSPFHANDLER) iemVmxApicAccessPagePfHandler;
|
---|
2202 | # endif
|
---|
2203 | #endif
|
---|
2204 |
|
---|
2205 | /**
|
---|
2206 | * Indicates to the verifier that the given flag set is undefined.
|
---|
2207 | *
|
---|
2208 | * Can be invoked again to add more flags.
|
---|
2209 | *
|
---|
2210 | * This is a NOOP if the verifier isn't compiled in.
|
---|
2211 | *
|
---|
2212 | * @note We're temporarily keeping this until code is converted to new
|
---|
2213 | * disassembler style opcode handling.
|
---|
2214 | */
|
---|
2215 | #define IEMOP_VERIFICATION_UNDEFINED_EFLAGS(a_fEfl) do { } while (0)
|
---|
2216 |
|
---|
2217 |
|
---|
2218 | /** @def IEM_DECL_IMPL_TYPE
|
---|
2219 | * For typedef'ing an instruction implementation function.
|
---|
2220 | *
|
---|
2221 | * @param a_RetType The return type.
|
---|
2222 | * @param a_Name The name of the type.
|
---|
2223 | * @param a_ArgList The argument list enclosed in parentheses.
|
---|
2224 | */
|
---|
2225 |
|
---|
2226 | /** @def IEM_DECL_IMPL_DEF
|
---|
2227 | * For defining an instruction implementation function.
|
---|
2228 | *
|
---|
2229 | * @param a_RetType The return type.
|
---|
2230 | * @param a_Name The name of the type.
|
---|
2231 | * @param a_ArgList The argument list enclosed in parentheses.
|
---|
2232 | */
|
---|
2233 |
|
---|
2234 | #if defined(__GNUC__) && defined(RT_ARCH_X86)
|
---|
2235 | # define IEM_DECL_IMPL_TYPE(a_RetType, a_Name, a_ArgList) \
|
---|
2236 | __attribute__((__fastcall__)) a_RetType (a_Name) a_ArgList
|
---|
2237 | # define IEM_DECL_IMPL_DEF(a_RetType, a_Name, a_ArgList) \
|
---|
2238 | __attribute__((__fastcall__, __nothrow__)) DECL_HIDDEN_ONLY(a_RetType) a_Name a_ArgList
|
---|
2239 | # define IEM_DECL_IMPL_PROTO(a_RetType, a_Name, a_ArgList) \
|
---|
2240 | __attribute__((__fastcall__, __nothrow__)) DECL_HIDDEN_ONLY(a_RetType) a_Name a_ArgList
|
---|
2241 |
|
---|
2242 | #elif defined(_MSC_VER) && defined(RT_ARCH_X86)
|
---|
2243 | # define IEM_DECL_IMPL_TYPE(a_RetType, a_Name, a_ArgList) \
|
---|
2244 | a_RetType (__fastcall a_Name) a_ArgList
|
---|
2245 | # define IEM_DECL_IMPL_DEF(a_RetType, a_Name, a_ArgList) \
|
---|
2246 | a_RetType __fastcall a_Name a_ArgList RT_NOEXCEPT
|
---|
2247 | # define IEM_DECL_IMPL_PROTO(a_RetType, a_Name, a_ArgList) \
|
---|
2248 | a_RetType __fastcall a_Name a_ArgList RT_NOEXCEPT
|
---|
2249 |
|
---|
2250 | #elif __cplusplus >= 201700 /* P0012R1 support */
|
---|
2251 | # define IEM_DECL_IMPL_TYPE(a_RetType, a_Name, a_ArgList) \
|
---|
2252 | a_RetType (VBOXCALL a_Name) a_ArgList RT_NOEXCEPT
|
---|
2253 | # define IEM_DECL_IMPL_DEF(a_RetType, a_Name, a_ArgList) \
|
---|
2254 | DECL_HIDDEN_ONLY(a_RetType) VBOXCALL a_Name a_ArgList RT_NOEXCEPT
|
---|
2255 | # define IEM_DECL_IMPL_PROTO(a_RetType, a_Name, a_ArgList) \
|
---|
2256 | DECL_HIDDEN_ONLY(a_RetType) VBOXCALL a_Name a_ArgList RT_NOEXCEPT
|
---|
2257 |
|
---|
2258 | #else
|
---|
2259 | # define IEM_DECL_IMPL_TYPE(a_RetType, a_Name, a_ArgList) \
|
---|
2260 | a_RetType (VBOXCALL a_Name) a_ArgList
|
---|
2261 | # define IEM_DECL_IMPL_DEF(a_RetType, a_Name, a_ArgList) \
|
---|
2262 | DECL_HIDDEN_ONLY(a_RetType) VBOXCALL a_Name a_ArgList
|
---|
2263 | # define IEM_DECL_IMPL_PROTO(a_RetType, a_Name, a_ArgList) \
|
---|
2264 | DECL_HIDDEN_ONLY(a_RetType) VBOXCALL a_Name a_ArgList
|
---|
2265 |
|
---|
2266 | #endif
|
---|
2267 |
|
---|
2268 | /** Defined in IEMAllAImplC.cpp but also used by IEMAllAImplA.asm. */
|
---|
2269 | RT_C_DECLS_BEGIN
|
---|
2270 | extern uint8_t const g_afParity[256];
|
---|
2271 | RT_C_DECLS_END
|
---|
2272 |
|
---|
2273 |
|
---|
2274 | /** @name Arithmetic assignment operations on bytes (binary).
|
---|
2275 | * @{ */
|
---|
2276 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINU8, (uint8_t *pu8Dst, uint8_t u8Src, uint32_t *pEFlags));
|
---|
2277 | typedef FNIEMAIMPLBINU8 *PFNIEMAIMPLBINU8;
|
---|
2278 | FNIEMAIMPLBINU8 iemAImpl_add_u8, iemAImpl_add_u8_locked;
|
---|
2279 | FNIEMAIMPLBINU8 iemAImpl_adc_u8, iemAImpl_adc_u8_locked;
|
---|
2280 | FNIEMAIMPLBINU8 iemAImpl_sub_u8, iemAImpl_sub_u8_locked;
|
---|
2281 | FNIEMAIMPLBINU8 iemAImpl_sbb_u8, iemAImpl_sbb_u8_locked;
|
---|
2282 | FNIEMAIMPLBINU8 iemAImpl_or_u8, iemAImpl_or_u8_locked;
|
---|
2283 | FNIEMAIMPLBINU8 iemAImpl_xor_u8, iemAImpl_xor_u8_locked;
|
---|
2284 | FNIEMAIMPLBINU8 iemAImpl_and_u8, iemAImpl_and_u8_locked;
|
---|
2285 | /** @} */
|
---|
2286 |
|
---|
2287 | /** @name Arithmetic assignment operations on words (binary).
|
---|
2288 | * @{ */
|
---|
2289 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINU16, (uint16_t *pu16Dst, uint16_t u16Src, uint32_t *pEFlags));
|
---|
2290 | typedef FNIEMAIMPLBINU16 *PFNIEMAIMPLBINU16;
|
---|
2291 | FNIEMAIMPLBINU16 iemAImpl_add_u16, iemAImpl_add_u16_locked;
|
---|
2292 | FNIEMAIMPLBINU16 iemAImpl_adc_u16, iemAImpl_adc_u16_locked;
|
---|
2293 | FNIEMAIMPLBINU16 iemAImpl_sub_u16, iemAImpl_sub_u16_locked;
|
---|
2294 | FNIEMAIMPLBINU16 iemAImpl_sbb_u16, iemAImpl_sbb_u16_locked;
|
---|
2295 | FNIEMAIMPLBINU16 iemAImpl_or_u16, iemAImpl_or_u16_locked;
|
---|
2296 | FNIEMAIMPLBINU16 iemAImpl_xor_u16, iemAImpl_xor_u16_locked;
|
---|
2297 | FNIEMAIMPLBINU16 iemAImpl_and_u16, iemAImpl_and_u16_locked;
|
---|
2298 | /** @} */
|
---|
2299 |
|
---|
2300 | /** @name Arithmetic assignment operations on double words (binary).
|
---|
2301 | * @{ */
|
---|
2302 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINU32, (uint32_t *pu32Dst, uint32_t u32Src, uint32_t *pEFlags));
|
---|
2303 | typedef FNIEMAIMPLBINU32 *PFNIEMAIMPLBINU32;
|
---|
2304 | FNIEMAIMPLBINU32 iemAImpl_add_u32, iemAImpl_add_u32_locked;
|
---|
2305 | FNIEMAIMPLBINU32 iemAImpl_adc_u32, iemAImpl_adc_u32_locked;
|
---|
2306 | FNIEMAIMPLBINU32 iemAImpl_sub_u32, iemAImpl_sub_u32_locked;
|
---|
2307 | FNIEMAIMPLBINU32 iemAImpl_sbb_u32, iemAImpl_sbb_u32_locked;
|
---|
2308 | FNIEMAIMPLBINU32 iemAImpl_or_u32, iemAImpl_or_u32_locked;
|
---|
2309 | FNIEMAIMPLBINU32 iemAImpl_xor_u32, iemAImpl_xor_u32_locked;
|
---|
2310 | FNIEMAIMPLBINU32 iemAImpl_and_u32, iemAImpl_and_u32_locked;
|
---|
2311 | FNIEMAIMPLBINU32 iemAImpl_blsi_u32, iemAImpl_blsi_u32_fallback;
|
---|
2312 | FNIEMAIMPLBINU32 iemAImpl_blsr_u32, iemAImpl_blsr_u32_fallback;
|
---|
2313 | FNIEMAIMPLBINU32 iemAImpl_blsmsk_u32, iemAImpl_blsmsk_u32_fallback;
|
---|
2314 | /** @} */
|
---|
2315 |
|
---|
2316 | /** @name Arithmetic assignment operations on quad words (binary).
|
---|
2317 | * @{ */
|
---|
2318 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINU64, (uint64_t *pu64Dst, uint64_t u64Src, uint32_t *pEFlags));
|
---|
2319 | typedef FNIEMAIMPLBINU64 *PFNIEMAIMPLBINU64;
|
---|
2320 | FNIEMAIMPLBINU64 iemAImpl_add_u64, iemAImpl_add_u64_locked;
|
---|
2321 | FNIEMAIMPLBINU64 iemAImpl_adc_u64, iemAImpl_adc_u64_locked;
|
---|
2322 | FNIEMAIMPLBINU64 iemAImpl_sub_u64, iemAImpl_sub_u64_locked;
|
---|
2323 | FNIEMAIMPLBINU64 iemAImpl_sbb_u64, iemAImpl_sbb_u64_locked;
|
---|
2324 | FNIEMAIMPLBINU64 iemAImpl_or_u64, iemAImpl_or_u64_locked;
|
---|
2325 | FNIEMAIMPLBINU64 iemAImpl_xor_u64, iemAImpl_xor_u64_locked;
|
---|
2326 | FNIEMAIMPLBINU64 iemAImpl_and_u64, iemAImpl_and_u64_locked;
|
---|
2327 | FNIEMAIMPLBINU64 iemAImpl_blsi_u64, iemAImpl_blsi_u64_fallback;
|
---|
2328 | FNIEMAIMPLBINU64 iemAImpl_blsr_u64, iemAImpl_blsr_u64_fallback;
|
---|
2329 | FNIEMAIMPLBINU64 iemAImpl_blsmsk_u64, iemAImpl_blsmsk_u64_fallback;
|
---|
2330 | /** @} */
|
---|
2331 |
|
---|
2332 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINROU8,(uint8_t const *pu8Dst, uint8_t u8Src, uint32_t *pEFlags));
|
---|
2333 | typedef FNIEMAIMPLBINROU8 *PFNIEMAIMPLBINROU8;
|
---|
2334 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINROU16,(uint16_t const *pu16Dst, uint16_t u16Src, uint32_t *pEFlags));
|
---|
2335 | typedef FNIEMAIMPLBINROU16 *PFNIEMAIMPLBINROU16;
|
---|
2336 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINROU32,(uint32_t const *pu32Dst, uint32_t u32Src, uint32_t *pEFlags));
|
---|
2337 | typedef FNIEMAIMPLBINROU32 *PFNIEMAIMPLBINROU32;
|
---|
2338 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINROU64,(uint64_t const *pu64Dst, uint64_t u64Src, uint32_t *pEFlags));
|
---|
2339 | typedef FNIEMAIMPLBINROU64 *PFNIEMAIMPLBINROU64;
|
---|
2340 |
|
---|
2341 | /** @name Compare operations (thrown in with the binary ops).
|
---|
2342 | * @{ */
|
---|
2343 | FNIEMAIMPLBINROU8 iemAImpl_cmp_u8;
|
---|
2344 | FNIEMAIMPLBINROU16 iemAImpl_cmp_u16;
|
---|
2345 | FNIEMAIMPLBINROU32 iemAImpl_cmp_u32;
|
---|
2346 | FNIEMAIMPLBINROU64 iemAImpl_cmp_u64;
|
---|
2347 | /** @} */
|
---|
2348 |
|
---|
2349 | /** @name Test operations (thrown in with the binary ops).
|
---|
2350 | * @{ */
|
---|
2351 | FNIEMAIMPLBINROU8 iemAImpl_test_u8;
|
---|
2352 | FNIEMAIMPLBINROU16 iemAImpl_test_u16;
|
---|
2353 | FNIEMAIMPLBINROU32 iemAImpl_test_u32;
|
---|
2354 | FNIEMAIMPLBINROU64 iemAImpl_test_u64;
|
---|
2355 | /** @} */
|
---|
2356 |
|
---|
2357 | /** @name Bit operations operations (thrown in with the binary ops).
|
---|
2358 | * @{ */
|
---|
2359 | FNIEMAIMPLBINROU16 iemAImpl_bt_u16;
|
---|
2360 | FNIEMAIMPLBINROU32 iemAImpl_bt_u32;
|
---|
2361 | FNIEMAIMPLBINROU64 iemAImpl_bt_u64;
|
---|
2362 | FNIEMAIMPLBINU16 iemAImpl_btc_u16, iemAImpl_btc_u16_locked;
|
---|
2363 | FNIEMAIMPLBINU32 iemAImpl_btc_u32, iemAImpl_btc_u32_locked;
|
---|
2364 | FNIEMAIMPLBINU64 iemAImpl_btc_u64, iemAImpl_btc_u64_locked;
|
---|
2365 | FNIEMAIMPLBINU16 iemAImpl_btr_u16, iemAImpl_btr_u16_locked;
|
---|
2366 | FNIEMAIMPLBINU32 iemAImpl_btr_u32, iemAImpl_btr_u32_locked;
|
---|
2367 | FNIEMAIMPLBINU64 iemAImpl_btr_u64, iemAImpl_btr_u64_locked;
|
---|
2368 | FNIEMAIMPLBINU16 iemAImpl_bts_u16, iemAImpl_bts_u16_locked;
|
---|
2369 | FNIEMAIMPLBINU32 iemAImpl_bts_u32, iemAImpl_bts_u32_locked;
|
---|
2370 | FNIEMAIMPLBINU64 iemAImpl_bts_u64, iemAImpl_bts_u64_locked;
|
---|
2371 | /** @} */
|
---|
2372 |
|
---|
2373 | /** @name Arithmetic three operand operations on double words (binary).
|
---|
2374 | * @{ */
|
---|
2375 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINVEXU32, (uint32_t *pu32Dst, uint32_t u32Src1, uint32_t u32Src2, uint32_t *pEFlags));
|
---|
2376 | typedef FNIEMAIMPLBINVEXU32 *PFNIEMAIMPLBINVEXU32;
|
---|
2377 | FNIEMAIMPLBINVEXU32 iemAImpl_andn_u32, iemAImpl_andn_u32_fallback;
|
---|
2378 | FNIEMAIMPLBINVEXU32 iemAImpl_bextr_u32, iemAImpl_bextr_u32_fallback;
|
---|
2379 | FNIEMAIMPLBINVEXU32 iemAImpl_bzhi_u32, iemAImpl_bzhi_u32_fallback;
|
---|
2380 | /** @} */
|
---|
2381 |
|
---|
2382 | /** @name Arithmetic three operand operations on quad words (binary).
|
---|
2383 | * @{ */
|
---|
2384 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINVEXU64, (uint64_t *pu64Dst, uint64_t u64Src1, uint64_t u64Src2, uint32_t *pEFlags));
|
---|
2385 | typedef FNIEMAIMPLBINVEXU64 *PFNIEMAIMPLBINVEXU64;
|
---|
2386 | FNIEMAIMPLBINVEXU64 iemAImpl_andn_u64, iemAImpl_andn_u64_fallback;
|
---|
2387 | FNIEMAIMPLBINVEXU64 iemAImpl_bextr_u64, iemAImpl_bextr_u64_fallback;
|
---|
2388 | FNIEMAIMPLBINVEXU64 iemAImpl_bzhi_u64, iemAImpl_bzhi_u64_fallback;
|
---|
2389 | /** @} */
|
---|
2390 |
|
---|
2391 | /** @name Arithmetic three operand operations on double words w/o EFLAGS (binary).
|
---|
2392 | * @{ */
|
---|
2393 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINVEXU32NOEFL, (uint32_t *pu32Dst, uint32_t u32Src1, uint32_t u32Src2));
|
---|
2394 | typedef FNIEMAIMPLBINVEXU32NOEFL *PFNIEMAIMPLBINVEXU32NOEFL;
|
---|
2395 | FNIEMAIMPLBINVEXU32NOEFL iemAImpl_pdep_u32, iemAImpl_pdep_u32_fallback;
|
---|
2396 | FNIEMAIMPLBINVEXU32NOEFL iemAImpl_pext_u32, iemAImpl_pext_u32_fallback;
|
---|
2397 | FNIEMAIMPLBINVEXU32NOEFL iemAImpl_sarx_u32, iemAImpl_sarx_u32_fallback;
|
---|
2398 | FNIEMAIMPLBINVEXU32NOEFL iemAImpl_shlx_u32, iemAImpl_shlx_u32_fallback;
|
---|
2399 | FNIEMAIMPLBINVEXU32NOEFL iemAImpl_shrx_u32, iemAImpl_shrx_u32_fallback;
|
---|
2400 | FNIEMAIMPLBINVEXU32NOEFL iemAImpl_rorx_u32;
|
---|
2401 | /** @} */
|
---|
2402 |
|
---|
2403 | /** @name Arithmetic three operand operations on quad words w/o EFLAGS (binary).
|
---|
2404 | * @{ */
|
---|
2405 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINVEXU64NOEFL, (uint64_t *pu64Dst, uint64_t u64Src1, uint64_t u64Src2));
|
---|
2406 | typedef FNIEMAIMPLBINVEXU64NOEFL *PFNIEMAIMPLBINVEXU64NOEFL;
|
---|
2407 | FNIEMAIMPLBINVEXU64NOEFL iemAImpl_pdep_u64, iemAImpl_pdep_u64_fallback;
|
---|
2408 | FNIEMAIMPLBINVEXU64NOEFL iemAImpl_pext_u64, iemAImpl_pext_u64_fallback;
|
---|
2409 | FNIEMAIMPLBINVEXU64NOEFL iemAImpl_sarx_u64, iemAImpl_sarx_u64_fallback;
|
---|
2410 | FNIEMAIMPLBINVEXU64NOEFL iemAImpl_shlx_u64, iemAImpl_shlx_u64_fallback;
|
---|
2411 | FNIEMAIMPLBINVEXU64NOEFL iemAImpl_shrx_u64, iemAImpl_shrx_u64_fallback;
|
---|
2412 | FNIEMAIMPLBINVEXU64NOEFL iemAImpl_rorx_u64;
|
---|
2413 | /** @} */
|
---|
2414 |
|
---|
2415 | /** @name MULX 32-bit and 64-bit.
|
---|
2416 | * @{ */
|
---|
2417 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMULXVEXU32, (uint32_t *puDst1, uint32_t *puDst2, uint32_t uSrc1, uint32_t uSrc2));
|
---|
2418 | typedef FNIEMAIMPLMULXVEXU32 *PFNIEMAIMPLMULXVEXU32;
|
---|
2419 | FNIEMAIMPLMULXVEXU32 iemAImpl_mulx_u32, iemAImpl_mulx_u32_fallback;
|
---|
2420 |
|
---|
2421 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMULXVEXU64, (uint64_t *puDst1, uint64_t *puDst2, uint64_t uSrc1, uint64_t uSrc2));
|
---|
2422 | typedef FNIEMAIMPLMULXVEXU64 *PFNIEMAIMPLMULXVEXU64;
|
---|
2423 | FNIEMAIMPLMULXVEXU64 iemAImpl_mulx_u64, iemAImpl_mulx_u64_fallback;
|
---|
2424 | /** @} */
|
---|
2425 |
|
---|
2426 |
|
---|
2427 | /** @name Exchange memory with register operations.
|
---|
2428 | * @{ */
|
---|
2429 | IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u8_locked, (uint8_t *pu8Mem, uint8_t *pu8Reg));
|
---|
2430 | IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u16_locked,(uint16_t *pu16Mem, uint16_t *pu16Reg));
|
---|
2431 | IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u32_locked,(uint32_t *pu32Mem, uint32_t *pu32Reg));
|
---|
2432 | IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u64_locked,(uint64_t *pu64Mem, uint64_t *pu64Reg));
|
---|
2433 | IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u8_unlocked, (uint8_t *pu8Mem, uint8_t *pu8Reg));
|
---|
2434 | IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u16_unlocked,(uint16_t *pu16Mem, uint16_t *pu16Reg));
|
---|
2435 | IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u32_unlocked,(uint32_t *pu32Mem, uint32_t *pu32Reg));
|
---|
2436 | IEM_DECL_IMPL_DEF(void, iemAImpl_xchg_u64_unlocked,(uint64_t *pu64Mem, uint64_t *pu64Reg));
|
---|
2437 | /** @} */
|
---|
2438 |
|
---|
2439 | /** @name Exchange and add operations.
|
---|
2440 | * @{ */
|
---|
2441 | IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u8, (uint8_t *pu8Dst, uint8_t *pu8Reg, uint32_t *pEFlags));
|
---|
2442 | IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u16,(uint16_t *pu16Dst, uint16_t *pu16Reg, uint32_t *pEFlags));
|
---|
2443 | IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u32,(uint32_t *pu32Dst, uint32_t *pu32Reg, uint32_t *pEFlags));
|
---|
2444 | IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u64,(uint64_t *pu64Dst, uint64_t *pu64Reg, uint32_t *pEFlags));
|
---|
2445 | IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u8_locked, (uint8_t *pu8Dst, uint8_t *pu8Reg, uint32_t *pEFlags));
|
---|
2446 | IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u16_locked,(uint16_t *pu16Dst, uint16_t *pu16Reg, uint32_t *pEFlags));
|
---|
2447 | IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u32_locked,(uint32_t *pu32Dst, uint32_t *pu32Reg, uint32_t *pEFlags));
|
---|
2448 | IEM_DECL_IMPL_DEF(void, iemAImpl_xadd_u64_locked,(uint64_t *pu64Dst, uint64_t *pu64Reg, uint32_t *pEFlags));
|
---|
2449 | /** @} */
|
---|
2450 |
|
---|
2451 | /** @name Compare and exchange.
|
---|
2452 | * @{ */
|
---|
2453 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u8, (uint8_t *pu8Dst, uint8_t *puAl, uint8_t uSrcReg, uint32_t *pEFlags));
|
---|
2454 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u8_locked, (uint8_t *pu8Dst, uint8_t *puAl, uint8_t uSrcReg, uint32_t *pEFlags));
|
---|
2455 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u16, (uint16_t *pu16Dst, uint16_t *puAx, uint16_t uSrcReg, uint32_t *pEFlags));
|
---|
2456 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u16_locked,(uint16_t *pu16Dst, uint16_t *puAx, uint16_t uSrcReg, uint32_t *pEFlags));
|
---|
2457 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u32, (uint32_t *pu32Dst, uint32_t *puEax, uint32_t uSrcReg, uint32_t *pEFlags));
|
---|
2458 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u32_locked,(uint32_t *pu32Dst, uint32_t *puEax, uint32_t uSrcReg, uint32_t *pEFlags));
|
---|
2459 | #if ARCH_BITS == 32
|
---|
2460 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u64, (uint64_t *pu64Dst, uint64_t *puRax, uint64_t *puSrcReg, uint32_t *pEFlags));
|
---|
2461 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u64_locked,(uint64_t *pu64Dst, uint64_t *puRax, uint64_t *puSrcReg, uint32_t *pEFlags));
|
---|
2462 | #else
|
---|
2463 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u64, (uint64_t *pu64Dst, uint64_t *puRax, uint64_t uSrcReg, uint32_t *pEFlags));
|
---|
2464 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg_u64_locked,(uint64_t *pu64Dst, uint64_t *puRax, uint64_t uSrcReg, uint32_t *pEFlags));
|
---|
2465 | #endif
|
---|
2466 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg8b,(uint64_t *pu64Dst, PRTUINT64U pu64EaxEdx, PRTUINT64U pu64EbxEcx,
|
---|
2467 | uint32_t *pEFlags));
|
---|
2468 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg8b_locked,(uint64_t *pu64Dst, PRTUINT64U pu64EaxEdx, PRTUINT64U pu64EbxEcx,
|
---|
2469 | uint32_t *pEFlags));
|
---|
2470 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg16b,(PRTUINT128U pu128Dst, PRTUINT128U pu128RaxRdx, PRTUINT128U pu128RbxRcx,
|
---|
2471 | uint32_t *pEFlags));
|
---|
2472 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg16b_locked,(PRTUINT128U pu128Dst, PRTUINT128U pu128RaxRdx, PRTUINT128U pu128RbxRcx,
|
---|
2473 | uint32_t *pEFlags));
|
---|
2474 | #ifndef RT_ARCH_ARM64
|
---|
2475 | IEM_DECL_IMPL_DEF(void, iemAImpl_cmpxchg16b_fallback,(PRTUINT128U pu128Dst, PRTUINT128U pu128RaxRdx,
|
---|
2476 | PRTUINT128U pu128RbxRcx, uint32_t *pEFlags));
|
---|
2477 | #endif
|
---|
2478 | /** @} */
|
---|
2479 |
|
---|
2480 | /** @name Memory ordering
|
---|
2481 | * @{ */
|
---|
2482 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEMFENCE,(void));
|
---|
2483 | typedef FNIEMAIMPLMEMFENCE *PFNIEMAIMPLMEMFENCE;
|
---|
2484 | IEM_DECL_IMPL_DEF(void, iemAImpl_mfence,(void));
|
---|
2485 | IEM_DECL_IMPL_DEF(void, iemAImpl_sfence,(void));
|
---|
2486 | IEM_DECL_IMPL_DEF(void, iemAImpl_lfence,(void));
|
---|
2487 | #ifndef RT_ARCH_ARM64
|
---|
2488 | IEM_DECL_IMPL_DEF(void, iemAImpl_alt_mem_fence,(void));
|
---|
2489 | #endif
|
---|
2490 | /** @} */
|
---|
2491 |
|
---|
2492 | /** @name Double precision shifts
|
---|
2493 | * @{ */
|
---|
2494 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSHIFTDBLU16,(uint16_t *pu16Dst, uint16_t u16Src, uint8_t cShift, uint32_t *pEFlags));
|
---|
2495 | typedef FNIEMAIMPLSHIFTDBLU16 *PFNIEMAIMPLSHIFTDBLU16;
|
---|
2496 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSHIFTDBLU32,(uint32_t *pu32Dst, uint32_t u32Src, uint8_t cShift, uint32_t *pEFlags));
|
---|
2497 | typedef FNIEMAIMPLSHIFTDBLU32 *PFNIEMAIMPLSHIFTDBLU32;
|
---|
2498 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSHIFTDBLU64,(uint64_t *pu64Dst, uint64_t u64Src, uint8_t cShift, uint32_t *pEFlags));
|
---|
2499 | typedef FNIEMAIMPLSHIFTDBLU64 *PFNIEMAIMPLSHIFTDBLU64;
|
---|
2500 | FNIEMAIMPLSHIFTDBLU16 iemAImpl_shld_u16, iemAImpl_shld_u16_amd, iemAImpl_shld_u16_intel;
|
---|
2501 | FNIEMAIMPLSHIFTDBLU32 iemAImpl_shld_u32, iemAImpl_shld_u32_amd, iemAImpl_shld_u32_intel;
|
---|
2502 | FNIEMAIMPLSHIFTDBLU64 iemAImpl_shld_u64, iemAImpl_shld_u64_amd, iemAImpl_shld_u64_intel;
|
---|
2503 | FNIEMAIMPLSHIFTDBLU16 iemAImpl_shrd_u16, iemAImpl_shrd_u16_amd, iemAImpl_shrd_u16_intel;
|
---|
2504 | FNIEMAIMPLSHIFTDBLU32 iemAImpl_shrd_u32, iemAImpl_shrd_u32_amd, iemAImpl_shrd_u32_intel;
|
---|
2505 | FNIEMAIMPLSHIFTDBLU64 iemAImpl_shrd_u64, iemAImpl_shrd_u64_amd, iemAImpl_shrd_u64_intel;
|
---|
2506 | /** @} */
|
---|
2507 |
|
---|
2508 |
|
---|
2509 | /** @name Bit search operations (thrown in with the binary ops).
|
---|
2510 | * @{ */
|
---|
2511 | FNIEMAIMPLBINU16 iemAImpl_bsf_u16, iemAImpl_bsf_u16_amd, iemAImpl_bsf_u16_intel;
|
---|
2512 | FNIEMAIMPLBINU32 iemAImpl_bsf_u32, iemAImpl_bsf_u32_amd, iemAImpl_bsf_u32_intel;
|
---|
2513 | FNIEMAIMPLBINU64 iemAImpl_bsf_u64, iemAImpl_bsf_u64_amd, iemAImpl_bsf_u64_intel;
|
---|
2514 | FNIEMAIMPLBINU16 iemAImpl_bsr_u16, iemAImpl_bsr_u16_amd, iemAImpl_bsr_u16_intel;
|
---|
2515 | FNIEMAIMPLBINU32 iemAImpl_bsr_u32, iemAImpl_bsr_u32_amd, iemAImpl_bsr_u32_intel;
|
---|
2516 | FNIEMAIMPLBINU64 iemAImpl_bsr_u64, iemAImpl_bsr_u64_amd, iemAImpl_bsr_u64_intel;
|
---|
2517 | FNIEMAIMPLBINU16 iemAImpl_lzcnt_u16, iemAImpl_lzcnt_u16_amd, iemAImpl_lzcnt_u16_intel;
|
---|
2518 | FNIEMAIMPLBINU32 iemAImpl_lzcnt_u32, iemAImpl_lzcnt_u32_amd, iemAImpl_lzcnt_u32_intel;
|
---|
2519 | FNIEMAIMPLBINU64 iemAImpl_lzcnt_u64, iemAImpl_lzcnt_u64_amd, iemAImpl_lzcnt_u64_intel;
|
---|
2520 | FNIEMAIMPLBINU16 iemAImpl_tzcnt_u16, iemAImpl_tzcnt_u16_amd, iemAImpl_tzcnt_u16_intel;
|
---|
2521 | FNIEMAIMPLBINU32 iemAImpl_tzcnt_u32, iemAImpl_tzcnt_u32_amd, iemAImpl_tzcnt_u32_intel;
|
---|
2522 | FNIEMAIMPLBINU64 iemAImpl_tzcnt_u64, iemAImpl_tzcnt_u64_amd, iemAImpl_tzcnt_u64_intel;
|
---|
2523 | FNIEMAIMPLBINU16 iemAImpl_popcnt_u16, iemAImpl_popcnt_u16_fallback;
|
---|
2524 | FNIEMAIMPLBINU32 iemAImpl_popcnt_u32, iemAImpl_popcnt_u32_fallback;
|
---|
2525 | FNIEMAIMPLBINU64 iemAImpl_popcnt_u64, iemAImpl_popcnt_u64_fallback;
|
---|
2526 | /** @} */
|
---|
2527 |
|
---|
2528 | /** @name Signed multiplication operations (thrown in with the binary ops).
|
---|
2529 | * @{ */
|
---|
2530 | FNIEMAIMPLBINU16 iemAImpl_imul_two_u16, iemAImpl_imul_two_u16_amd, iemAImpl_imul_two_u16_intel;
|
---|
2531 | FNIEMAIMPLBINU32 iemAImpl_imul_two_u32, iemAImpl_imul_two_u32_amd, iemAImpl_imul_two_u32_intel;
|
---|
2532 | FNIEMAIMPLBINU64 iemAImpl_imul_two_u64, iemAImpl_imul_two_u64_amd, iemAImpl_imul_two_u64_intel;
|
---|
2533 | /** @} */
|
---|
2534 |
|
---|
2535 | /** @name Arithmetic assignment operations on bytes (unary).
|
---|
2536 | * @{ */
|
---|
2537 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLUNARYU8, (uint8_t *pu8Dst, uint32_t *pEFlags));
|
---|
2538 | typedef FNIEMAIMPLUNARYU8 *PFNIEMAIMPLUNARYU8;
|
---|
2539 | FNIEMAIMPLUNARYU8 iemAImpl_inc_u8, iemAImpl_inc_u8_locked;
|
---|
2540 | FNIEMAIMPLUNARYU8 iemAImpl_dec_u8, iemAImpl_dec_u8_locked;
|
---|
2541 | FNIEMAIMPLUNARYU8 iemAImpl_not_u8, iemAImpl_not_u8_locked;
|
---|
2542 | FNIEMAIMPLUNARYU8 iemAImpl_neg_u8, iemAImpl_neg_u8_locked;
|
---|
2543 | /** @} */
|
---|
2544 |
|
---|
2545 | /** @name Arithmetic assignment operations on words (unary).
|
---|
2546 | * @{ */
|
---|
2547 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLUNARYU16, (uint16_t *pu16Dst, uint32_t *pEFlags));
|
---|
2548 | typedef FNIEMAIMPLUNARYU16 *PFNIEMAIMPLUNARYU16;
|
---|
2549 | FNIEMAIMPLUNARYU16 iemAImpl_inc_u16, iemAImpl_inc_u16_locked;
|
---|
2550 | FNIEMAIMPLUNARYU16 iemAImpl_dec_u16, iemAImpl_dec_u16_locked;
|
---|
2551 | FNIEMAIMPLUNARYU16 iemAImpl_not_u16, iemAImpl_not_u16_locked;
|
---|
2552 | FNIEMAIMPLUNARYU16 iemAImpl_neg_u16, iemAImpl_neg_u16_locked;
|
---|
2553 | /** @} */
|
---|
2554 |
|
---|
2555 | /** @name Arithmetic assignment operations on double words (unary).
|
---|
2556 | * @{ */
|
---|
2557 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLUNARYU32, (uint32_t *pu32Dst, uint32_t *pEFlags));
|
---|
2558 | typedef FNIEMAIMPLUNARYU32 *PFNIEMAIMPLUNARYU32;
|
---|
2559 | FNIEMAIMPLUNARYU32 iemAImpl_inc_u32, iemAImpl_inc_u32_locked;
|
---|
2560 | FNIEMAIMPLUNARYU32 iemAImpl_dec_u32, iemAImpl_dec_u32_locked;
|
---|
2561 | FNIEMAIMPLUNARYU32 iemAImpl_not_u32, iemAImpl_not_u32_locked;
|
---|
2562 | FNIEMAIMPLUNARYU32 iemAImpl_neg_u32, iemAImpl_neg_u32_locked;
|
---|
2563 | /** @} */
|
---|
2564 |
|
---|
2565 | /** @name Arithmetic assignment operations on quad words (unary).
|
---|
2566 | * @{ */
|
---|
2567 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLUNARYU64, (uint64_t *pu64Dst, uint32_t *pEFlags));
|
---|
2568 | typedef FNIEMAIMPLUNARYU64 *PFNIEMAIMPLUNARYU64;
|
---|
2569 | FNIEMAIMPLUNARYU64 iemAImpl_inc_u64, iemAImpl_inc_u64_locked;
|
---|
2570 | FNIEMAIMPLUNARYU64 iemAImpl_dec_u64, iemAImpl_dec_u64_locked;
|
---|
2571 | FNIEMAIMPLUNARYU64 iemAImpl_not_u64, iemAImpl_not_u64_locked;
|
---|
2572 | FNIEMAIMPLUNARYU64 iemAImpl_neg_u64, iemAImpl_neg_u64_locked;
|
---|
2573 | /** @} */
|
---|
2574 |
|
---|
2575 |
|
---|
2576 | /** @name Shift operations on bytes (Group 2).
|
---|
2577 | * @{ */
|
---|
2578 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSHIFTU8,(uint8_t *pu8Dst, uint8_t cShift, uint32_t *pEFlags));
|
---|
2579 | typedef FNIEMAIMPLSHIFTU8 *PFNIEMAIMPLSHIFTU8;
|
---|
2580 | FNIEMAIMPLSHIFTU8 iemAImpl_rol_u8, iemAImpl_rol_u8_amd, iemAImpl_rol_u8_intel;
|
---|
2581 | FNIEMAIMPLSHIFTU8 iemAImpl_ror_u8, iemAImpl_ror_u8_amd, iemAImpl_ror_u8_intel;
|
---|
2582 | FNIEMAIMPLSHIFTU8 iemAImpl_rcl_u8, iemAImpl_rcl_u8_amd, iemAImpl_rcl_u8_intel;
|
---|
2583 | FNIEMAIMPLSHIFTU8 iemAImpl_rcr_u8, iemAImpl_rcr_u8_amd, iemAImpl_rcr_u8_intel;
|
---|
2584 | FNIEMAIMPLSHIFTU8 iemAImpl_shl_u8, iemAImpl_shl_u8_amd, iemAImpl_shl_u8_intel;
|
---|
2585 | FNIEMAIMPLSHIFTU8 iemAImpl_shr_u8, iemAImpl_shr_u8_amd, iemAImpl_shr_u8_intel;
|
---|
2586 | FNIEMAIMPLSHIFTU8 iemAImpl_sar_u8, iemAImpl_sar_u8_amd, iemAImpl_sar_u8_intel;
|
---|
2587 | /** @} */
|
---|
2588 |
|
---|
2589 | /** @name Shift operations on words (Group 2).
|
---|
2590 | * @{ */
|
---|
2591 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSHIFTU16,(uint16_t *pu16Dst, uint8_t cShift, uint32_t *pEFlags));
|
---|
2592 | typedef FNIEMAIMPLSHIFTU16 *PFNIEMAIMPLSHIFTU16;
|
---|
2593 | FNIEMAIMPLSHIFTU16 iemAImpl_rol_u16, iemAImpl_rol_u16_amd, iemAImpl_rol_u16_intel;
|
---|
2594 | FNIEMAIMPLSHIFTU16 iemAImpl_ror_u16, iemAImpl_ror_u16_amd, iemAImpl_ror_u16_intel;
|
---|
2595 | FNIEMAIMPLSHIFTU16 iemAImpl_rcl_u16, iemAImpl_rcl_u16_amd, iemAImpl_rcl_u16_intel;
|
---|
2596 | FNIEMAIMPLSHIFTU16 iemAImpl_rcr_u16, iemAImpl_rcr_u16_amd, iemAImpl_rcr_u16_intel;
|
---|
2597 | FNIEMAIMPLSHIFTU16 iemAImpl_shl_u16, iemAImpl_shl_u16_amd, iemAImpl_shl_u16_intel;
|
---|
2598 | FNIEMAIMPLSHIFTU16 iemAImpl_shr_u16, iemAImpl_shr_u16_amd, iemAImpl_shr_u16_intel;
|
---|
2599 | FNIEMAIMPLSHIFTU16 iemAImpl_sar_u16, iemAImpl_sar_u16_amd, iemAImpl_sar_u16_intel;
|
---|
2600 | /** @} */
|
---|
2601 |
|
---|
2602 | /** @name Shift operations on double words (Group 2).
|
---|
2603 | * @{ */
|
---|
2604 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSHIFTU32,(uint32_t *pu32Dst, uint8_t cShift, uint32_t *pEFlags));
|
---|
2605 | typedef FNIEMAIMPLSHIFTU32 *PFNIEMAIMPLSHIFTU32;
|
---|
2606 | FNIEMAIMPLSHIFTU32 iemAImpl_rol_u32, iemAImpl_rol_u32_amd, iemAImpl_rol_u32_intel;
|
---|
2607 | FNIEMAIMPLSHIFTU32 iemAImpl_ror_u32, iemAImpl_ror_u32_amd, iemAImpl_ror_u32_intel;
|
---|
2608 | FNIEMAIMPLSHIFTU32 iemAImpl_rcl_u32, iemAImpl_rcl_u32_amd, iemAImpl_rcl_u32_intel;
|
---|
2609 | FNIEMAIMPLSHIFTU32 iemAImpl_rcr_u32, iemAImpl_rcr_u32_amd, iemAImpl_rcr_u32_intel;
|
---|
2610 | FNIEMAIMPLSHIFTU32 iemAImpl_shl_u32, iemAImpl_shl_u32_amd, iemAImpl_shl_u32_intel;
|
---|
2611 | FNIEMAIMPLSHIFTU32 iemAImpl_shr_u32, iemAImpl_shr_u32_amd, iemAImpl_shr_u32_intel;
|
---|
2612 | FNIEMAIMPLSHIFTU32 iemAImpl_sar_u32, iemAImpl_sar_u32_amd, iemAImpl_sar_u32_intel;
|
---|
2613 | /** @} */
|
---|
2614 |
|
---|
2615 | /** @name Shift operations on words (Group 2).
|
---|
2616 | * @{ */
|
---|
2617 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSHIFTU64,(uint64_t *pu64Dst, uint8_t cShift, uint32_t *pEFlags));
|
---|
2618 | typedef FNIEMAIMPLSHIFTU64 *PFNIEMAIMPLSHIFTU64;
|
---|
2619 | FNIEMAIMPLSHIFTU64 iemAImpl_rol_u64, iemAImpl_rol_u64_amd, iemAImpl_rol_u64_intel;
|
---|
2620 | FNIEMAIMPLSHIFTU64 iemAImpl_ror_u64, iemAImpl_ror_u64_amd, iemAImpl_ror_u64_intel;
|
---|
2621 | FNIEMAIMPLSHIFTU64 iemAImpl_rcl_u64, iemAImpl_rcl_u64_amd, iemAImpl_rcl_u64_intel;
|
---|
2622 | FNIEMAIMPLSHIFTU64 iemAImpl_rcr_u64, iemAImpl_rcr_u64_amd, iemAImpl_rcr_u64_intel;
|
---|
2623 | FNIEMAIMPLSHIFTU64 iemAImpl_shl_u64, iemAImpl_shl_u64_amd, iemAImpl_shl_u64_intel;
|
---|
2624 | FNIEMAIMPLSHIFTU64 iemAImpl_shr_u64, iemAImpl_shr_u64_amd, iemAImpl_shr_u64_intel;
|
---|
2625 | FNIEMAIMPLSHIFTU64 iemAImpl_sar_u64, iemAImpl_sar_u64_amd, iemAImpl_sar_u64_intel;
|
---|
2626 | /** @} */
|
---|
2627 |
|
---|
2628 | /** @name Multiplication and division operations.
|
---|
2629 | * @{ */
|
---|
2630 | typedef IEM_DECL_IMPL_TYPE(int, FNIEMAIMPLMULDIVU8,(uint16_t *pu16AX, uint8_t u8FactorDivisor, uint32_t *pEFlags));
|
---|
2631 | typedef FNIEMAIMPLMULDIVU8 *PFNIEMAIMPLMULDIVU8;
|
---|
2632 | FNIEMAIMPLMULDIVU8 iemAImpl_mul_u8, iemAImpl_mul_u8_amd, iemAImpl_mul_u8_intel;
|
---|
2633 | FNIEMAIMPLMULDIVU8 iemAImpl_imul_u8, iemAImpl_imul_u8_amd, iemAImpl_imul_u8_intel;
|
---|
2634 | FNIEMAIMPLMULDIVU8 iemAImpl_div_u8, iemAImpl_div_u8_amd, iemAImpl_div_u8_intel;
|
---|
2635 | FNIEMAIMPLMULDIVU8 iemAImpl_idiv_u8, iemAImpl_idiv_u8_amd, iemAImpl_idiv_u8_intel;
|
---|
2636 |
|
---|
2637 | typedef IEM_DECL_IMPL_TYPE(int, FNIEMAIMPLMULDIVU16,(uint16_t *pu16AX, uint16_t *pu16DX, uint16_t u16FactorDivisor, uint32_t *pEFlags));
|
---|
2638 | typedef FNIEMAIMPLMULDIVU16 *PFNIEMAIMPLMULDIVU16;
|
---|
2639 | FNIEMAIMPLMULDIVU16 iemAImpl_mul_u16, iemAImpl_mul_u16_amd, iemAImpl_mul_u16_intel;
|
---|
2640 | FNIEMAIMPLMULDIVU16 iemAImpl_imul_u16, iemAImpl_imul_u16_amd, iemAImpl_imul_u16_intel;
|
---|
2641 | FNIEMAIMPLMULDIVU16 iemAImpl_div_u16, iemAImpl_div_u16_amd, iemAImpl_div_u16_intel;
|
---|
2642 | FNIEMAIMPLMULDIVU16 iemAImpl_idiv_u16, iemAImpl_idiv_u16_amd, iemAImpl_idiv_u16_intel;
|
---|
2643 |
|
---|
2644 | typedef IEM_DECL_IMPL_TYPE(int, FNIEMAIMPLMULDIVU32,(uint32_t *pu32EAX, uint32_t *pu32EDX, uint32_t u32FactorDivisor, uint32_t *pEFlags));
|
---|
2645 | typedef FNIEMAIMPLMULDIVU32 *PFNIEMAIMPLMULDIVU32;
|
---|
2646 | FNIEMAIMPLMULDIVU32 iemAImpl_mul_u32, iemAImpl_mul_u32_amd, iemAImpl_mul_u32_intel;
|
---|
2647 | FNIEMAIMPLMULDIVU32 iemAImpl_imul_u32, iemAImpl_imul_u32_amd, iemAImpl_imul_u32_intel;
|
---|
2648 | FNIEMAIMPLMULDIVU32 iemAImpl_div_u32, iemAImpl_div_u32_amd, iemAImpl_div_u32_intel;
|
---|
2649 | FNIEMAIMPLMULDIVU32 iemAImpl_idiv_u32, iemAImpl_idiv_u32_amd, iemAImpl_idiv_u32_intel;
|
---|
2650 |
|
---|
2651 | typedef IEM_DECL_IMPL_TYPE(int, FNIEMAIMPLMULDIVU64,(uint64_t *pu64RAX, uint64_t *pu64RDX, uint64_t u64FactorDivisor, uint32_t *pEFlags));
|
---|
2652 | typedef FNIEMAIMPLMULDIVU64 *PFNIEMAIMPLMULDIVU64;
|
---|
2653 | FNIEMAIMPLMULDIVU64 iemAImpl_mul_u64, iemAImpl_mul_u64_amd, iemAImpl_mul_u64_intel;
|
---|
2654 | FNIEMAIMPLMULDIVU64 iemAImpl_imul_u64, iemAImpl_imul_u64_amd, iemAImpl_imul_u64_intel;
|
---|
2655 | FNIEMAIMPLMULDIVU64 iemAImpl_div_u64, iemAImpl_div_u64_amd, iemAImpl_div_u64_intel;
|
---|
2656 | FNIEMAIMPLMULDIVU64 iemAImpl_idiv_u64, iemAImpl_idiv_u64_amd, iemAImpl_idiv_u64_intel;
|
---|
2657 | /** @} */
|
---|
2658 |
|
---|
2659 | /** @name Byte Swap.
|
---|
2660 | * @{ */
|
---|
2661 | IEM_DECL_IMPL_TYPE(void, iemAImpl_bswap_u16,(uint32_t *pu32Dst)); /* Yes, 32-bit register access. */
|
---|
2662 | IEM_DECL_IMPL_TYPE(void, iemAImpl_bswap_u32,(uint32_t *pu32Dst));
|
---|
2663 | IEM_DECL_IMPL_TYPE(void, iemAImpl_bswap_u64,(uint64_t *pu64Dst));
|
---|
2664 | /** @} */
|
---|
2665 |
|
---|
2666 | /** @name Misc.
|
---|
2667 | * @{ */
|
---|
2668 | FNIEMAIMPLBINU16 iemAImpl_arpl;
|
---|
2669 | /** @} */
|
---|
2670 |
|
---|
2671 | /** @name RDRAND and RDSEED
|
---|
2672 | * @{ */
|
---|
2673 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLRDRANDSEEDU16,(uint16_t *puDst, uint32_t *pEFlags));
|
---|
2674 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLRDRANDSEEDU32,(uint32_t *puDst, uint32_t *pEFlags));
|
---|
2675 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLRDRANDSEEDU64,(uint64_t *puDst, uint32_t *pEFlags));
|
---|
2676 | typedef FNIEMAIMPLRDRANDSEEDU16 *PFNIEMAIMPLRDRANDSEEDU16;
|
---|
2677 | typedef FNIEMAIMPLRDRANDSEEDU32 *PFNIEMAIMPLRDRANDSEEDU32;
|
---|
2678 | typedef FNIEMAIMPLRDRANDSEEDU64 *PFNIEMAIMPLRDRANDSEEDU64;
|
---|
2679 |
|
---|
2680 | FNIEMAIMPLRDRANDSEEDU16 iemAImpl_rdrand_u16, iemAImpl_rdrand_u16_fallback;
|
---|
2681 | FNIEMAIMPLRDRANDSEEDU32 iemAImpl_rdrand_u32, iemAImpl_rdrand_u32_fallback;
|
---|
2682 | FNIEMAIMPLRDRANDSEEDU64 iemAImpl_rdrand_u64, iemAImpl_rdrand_u64_fallback;
|
---|
2683 | FNIEMAIMPLRDRANDSEEDU16 iemAImpl_rdseed_u16, iemAImpl_rdseed_u16_fallback;
|
---|
2684 | FNIEMAIMPLRDRANDSEEDU32 iemAImpl_rdseed_u32, iemAImpl_rdseed_u32_fallback;
|
---|
2685 | FNIEMAIMPLRDRANDSEEDU64 iemAImpl_rdseed_u64, iemAImpl_rdseed_u64_fallback;
|
---|
2686 | /** @} */
|
---|
2687 |
|
---|
2688 | /** @name ADOX and ADCX
|
---|
2689 | * @{ */
|
---|
2690 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLADXU32,(uint32_t *puDst, uint32_t *pfEFlags, uint32_t uSrc));
|
---|
2691 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLADXU64,(uint64_t *puDst, uint32_t *pfEFlags, uint64_t uSrc));
|
---|
2692 | typedef FNIEMAIMPLADXU32 *PFNIEMAIMPLADXU32;
|
---|
2693 | typedef FNIEMAIMPLADXU64 *PFNIEMAIMPLADXU64;
|
---|
2694 |
|
---|
2695 | FNIEMAIMPLADXU32 iemAImpl_adcx_u32, iemAImpl_adcx_u32_fallback;
|
---|
2696 | FNIEMAIMPLADXU64 iemAImpl_adcx_u64, iemAImpl_adcx_u64_fallback;
|
---|
2697 | FNIEMAIMPLADXU32 iemAImpl_adox_u32, iemAImpl_adox_u32_fallback;
|
---|
2698 | FNIEMAIMPLADXU64 iemAImpl_adox_u64, iemAImpl_adox_u64_fallback;
|
---|
2699 | /** @} */
|
---|
2700 |
|
---|
2701 | /** @name FPU operations taking a 32-bit float argument
|
---|
2702 | * @{ */
|
---|
2703 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR32FSW,(PCX86FXSTATE pFpuState, uint16_t *pFSW,
|
---|
2704 | PCRTFLOAT80U pr80Val1, PCRTFLOAT32U pr32Val2));
|
---|
2705 | typedef FNIEMAIMPLFPUR32FSW *PFNIEMAIMPLFPUR32FSW;
|
---|
2706 |
|
---|
2707 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR32,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes,
|
---|
2708 | PCRTFLOAT80U pr80Val1, PCRTFLOAT32U pr32Val2));
|
---|
2709 | typedef FNIEMAIMPLFPUR32 *PFNIEMAIMPLFPUR32;
|
---|
2710 |
|
---|
2711 | FNIEMAIMPLFPUR32FSW iemAImpl_fcom_r80_by_r32;
|
---|
2712 | FNIEMAIMPLFPUR32 iemAImpl_fadd_r80_by_r32;
|
---|
2713 | FNIEMAIMPLFPUR32 iemAImpl_fmul_r80_by_r32;
|
---|
2714 | FNIEMAIMPLFPUR32 iemAImpl_fsub_r80_by_r32;
|
---|
2715 | FNIEMAIMPLFPUR32 iemAImpl_fsubr_r80_by_r32;
|
---|
2716 | FNIEMAIMPLFPUR32 iemAImpl_fdiv_r80_by_r32;
|
---|
2717 | FNIEMAIMPLFPUR32 iemAImpl_fdivr_r80_by_r32;
|
---|
2718 |
|
---|
2719 | IEM_DECL_IMPL_DEF(void, iemAImpl_fld_r80_from_r32,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT32U pr32Val));
|
---|
2720 | IEM_DECL_IMPL_DEF(void, iemAImpl_fst_r80_to_r32,(PCX86FXSTATE pFpuState, uint16_t *pu16FSW,
|
---|
2721 | PRTFLOAT32U pr32Val, PCRTFLOAT80U pr80Val));
|
---|
2722 | /** @} */
|
---|
2723 |
|
---|
2724 | /** @name FPU operations taking a 64-bit float argument
|
---|
2725 | * @{ */
|
---|
2726 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR64FSW,(PCX86FXSTATE pFpuState, uint16_t *pFSW,
|
---|
2727 | PCRTFLOAT80U pr80Val1, PCRTFLOAT64U pr64Val2));
|
---|
2728 | typedef FNIEMAIMPLFPUR64FSW *PFNIEMAIMPLFPUR64FSW;
|
---|
2729 |
|
---|
2730 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR64,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes,
|
---|
2731 | PCRTFLOAT80U pr80Val1, PCRTFLOAT64U pr64Val2));
|
---|
2732 | typedef FNIEMAIMPLFPUR64 *PFNIEMAIMPLFPUR64;
|
---|
2733 |
|
---|
2734 | FNIEMAIMPLFPUR64FSW iemAImpl_fcom_r80_by_r64;
|
---|
2735 | FNIEMAIMPLFPUR64 iemAImpl_fadd_r80_by_r64;
|
---|
2736 | FNIEMAIMPLFPUR64 iemAImpl_fmul_r80_by_r64;
|
---|
2737 | FNIEMAIMPLFPUR64 iemAImpl_fsub_r80_by_r64;
|
---|
2738 | FNIEMAIMPLFPUR64 iemAImpl_fsubr_r80_by_r64;
|
---|
2739 | FNIEMAIMPLFPUR64 iemAImpl_fdiv_r80_by_r64;
|
---|
2740 | FNIEMAIMPLFPUR64 iemAImpl_fdivr_r80_by_r64;
|
---|
2741 |
|
---|
2742 | IEM_DECL_IMPL_DEF(void, iemAImpl_fld_r80_from_r64,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT64U pr64Val));
|
---|
2743 | IEM_DECL_IMPL_DEF(void, iemAImpl_fst_r80_to_r64,(PCX86FXSTATE pFpuState, uint16_t *pu16FSW,
|
---|
2744 | PRTFLOAT64U pr32Val, PCRTFLOAT80U pr80Val));
|
---|
2745 | /** @} */
|
---|
2746 |
|
---|
2747 | /** @name FPU operations taking a 80-bit float argument
|
---|
2748 | * @{ */
|
---|
2749 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR80,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes,
|
---|
2750 | PCRTFLOAT80U pr80Val1, PCRTFLOAT80U pr80Val2));
|
---|
2751 | typedef FNIEMAIMPLFPUR80 *PFNIEMAIMPLFPUR80;
|
---|
2752 | FNIEMAIMPLFPUR80 iemAImpl_fadd_r80_by_r80;
|
---|
2753 | FNIEMAIMPLFPUR80 iemAImpl_fmul_r80_by_r80;
|
---|
2754 | FNIEMAIMPLFPUR80 iemAImpl_fsub_r80_by_r80;
|
---|
2755 | FNIEMAIMPLFPUR80 iemAImpl_fsubr_r80_by_r80;
|
---|
2756 | FNIEMAIMPLFPUR80 iemAImpl_fdiv_r80_by_r80;
|
---|
2757 | FNIEMAIMPLFPUR80 iemAImpl_fdivr_r80_by_r80;
|
---|
2758 | FNIEMAIMPLFPUR80 iemAImpl_fprem_r80_by_r80;
|
---|
2759 | FNIEMAIMPLFPUR80 iemAImpl_fprem1_r80_by_r80;
|
---|
2760 | FNIEMAIMPLFPUR80 iemAImpl_fscale_r80_by_r80;
|
---|
2761 |
|
---|
2762 | FNIEMAIMPLFPUR80 iemAImpl_fpatan_r80_by_r80, iemAImpl_fpatan_r80_by_r80_amd, iemAImpl_fpatan_r80_by_r80_intel;
|
---|
2763 | FNIEMAIMPLFPUR80 iemAImpl_fyl2x_r80_by_r80, iemAImpl_fyl2x_r80_by_r80_amd, iemAImpl_fyl2x_r80_by_r80_intel;
|
---|
2764 | FNIEMAIMPLFPUR80 iemAImpl_fyl2xp1_r80_by_r80, iemAImpl_fyl2xp1_r80_by_r80_amd, iemAImpl_fyl2xp1_r80_by_r80_intel;
|
---|
2765 |
|
---|
2766 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR80FSW,(PCX86FXSTATE pFpuState, uint16_t *pFSW,
|
---|
2767 | PCRTFLOAT80U pr80Val1, PCRTFLOAT80U pr80Val2));
|
---|
2768 | typedef FNIEMAIMPLFPUR80FSW *PFNIEMAIMPLFPUR80FSW;
|
---|
2769 | FNIEMAIMPLFPUR80FSW iemAImpl_fcom_r80_by_r80;
|
---|
2770 | FNIEMAIMPLFPUR80FSW iemAImpl_fucom_r80_by_r80;
|
---|
2771 |
|
---|
2772 | typedef IEM_DECL_IMPL_TYPE(uint32_t, FNIEMAIMPLFPUR80EFL,(PCX86FXSTATE pFpuState, uint16_t *pu16Fsw,
|
---|
2773 | PCRTFLOAT80U pr80Val1, PCRTFLOAT80U pr80Val2));
|
---|
2774 | typedef FNIEMAIMPLFPUR80EFL *PFNIEMAIMPLFPUR80EFL;
|
---|
2775 | FNIEMAIMPLFPUR80EFL iemAImpl_fcomi_r80_by_r80;
|
---|
2776 | FNIEMAIMPLFPUR80EFL iemAImpl_fucomi_r80_by_r80;
|
---|
2777 |
|
---|
2778 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR80UNARY,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val));
|
---|
2779 | typedef FNIEMAIMPLFPUR80UNARY *PFNIEMAIMPLFPUR80UNARY;
|
---|
2780 | FNIEMAIMPLFPUR80UNARY iemAImpl_fabs_r80;
|
---|
2781 | FNIEMAIMPLFPUR80UNARY iemAImpl_fchs_r80;
|
---|
2782 | FNIEMAIMPLFPUR80UNARY iemAImpl_f2xm1_r80, iemAImpl_f2xm1_r80_amd, iemAImpl_f2xm1_r80_intel;
|
---|
2783 | FNIEMAIMPLFPUR80UNARY iemAImpl_fsqrt_r80;
|
---|
2784 | FNIEMAIMPLFPUR80UNARY iemAImpl_frndint_r80;
|
---|
2785 | FNIEMAIMPLFPUR80UNARY iemAImpl_fsin_r80, iemAImpl_fsin_r80_amd, iemAImpl_fsin_r80_intel;
|
---|
2786 | FNIEMAIMPLFPUR80UNARY iemAImpl_fcos_r80, iemAImpl_fcos_r80_amd, iemAImpl_fcos_r80_intel;
|
---|
2787 |
|
---|
2788 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR80UNARYFSW,(PCX86FXSTATE pFpuState, uint16_t *pu16Fsw, PCRTFLOAT80U pr80Val));
|
---|
2789 | typedef FNIEMAIMPLFPUR80UNARYFSW *PFNIEMAIMPLFPUR80UNARYFSW;
|
---|
2790 | FNIEMAIMPLFPUR80UNARYFSW iemAImpl_ftst_r80;
|
---|
2791 | FNIEMAIMPLFPUR80UNARYFSW iemAImpl_fxam_r80;
|
---|
2792 |
|
---|
2793 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR80LDCONST,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes));
|
---|
2794 | typedef FNIEMAIMPLFPUR80LDCONST *PFNIEMAIMPLFPUR80LDCONST;
|
---|
2795 | FNIEMAIMPLFPUR80LDCONST iemAImpl_fld1;
|
---|
2796 | FNIEMAIMPLFPUR80LDCONST iemAImpl_fldl2t;
|
---|
2797 | FNIEMAIMPLFPUR80LDCONST iemAImpl_fldl2e;
|
---|
2798 | FNIEMAIMPLFPUR80LDCONST iemAImpl_fldpi;
|
---|
2799 | FNIEMAIMPLFPUR80LDCONST iemAImpl_fldlg2;
|
---|
2800 | FNIEMAIMPLFPUR80LDCONST iemAImpl_fldln2;
|
---|
2801 | FNIEMAIMPLFPUR80LDCONST iemAImpl_fldz;
|
---|
2802 |
|
---|
2803 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUR80UNARYTWO,(PCX86FXSTATE pFpuState, PIEMFPURESULTTWO pFpuResTwo,
|
---|
2804 | PCRTFLOAT80U pr80Val));
|
---|
2805 | typedef FNIEMAIMPLFPUR80UNARYTWO *PFNIEMAIMPLFPUR80UNARYTWO;
|
---|
2806 | FNIEMAIMPLFPUR80UNARYTWO iemAImpl_fptan_r80_r80, iemAImpl_fptan_r80_r80_amd, iemAImpl_fptan_r80_r80_intel;
|
---|
2807 | FNIEMAIMPLFPUR80UNARYTWO iemAImpl_fxtract_r80_r80;
|
---|
2808 | FNIEMAIMPLFPUR80UNARYTWO iemAImpl_fsincos_r80_r80, iemAImpl_fsincos_r80_r80_amd, iemAImpl_fsincos_r80_r80_intel;
|
---|
2809 |
|
---|
2810 | IEM_DECL_IMPL_DEF(void, iemAImpl_fld_r80_from_r80,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTFLOAT80U pr80Val));
|
---|
2811 | IEM_DECL_IMPL_DEF(void, iemAImpl_fst_r80_to_r80,(PCX86FXSTATE pFpuState, uint16_t *pu16FSW,
|
---|
2812 | PRTFLOAT80U pr80Dst, PCRTFLOAT80U pr80Src));
|
---|
2813 |
|
---|
2814 | IEM_DECL_IMPL_DEF(void, iemAImpl_fld_r80_from_d80,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, PCRTPBCD80U pd80Val));
|
---|
2815 | IEM_DECL_IMPL_DEF(void, iemAImpl_fst_r80_to_d80,(PCX86FXSTATE pFpuState, uint16_t *pu16FSW,
|
---|
2816 | PRTPBCD80U pd80Dst, PCRTFLOAT80U pr80Src));
|
---|
2817 |
|
---|
2818 | /** @} */
|
---|
2819 |
|
---|
2820 | /** @name FPU operations taking a 16-bit signed integer argument
|
---|
2821 | * @{ */
|
---|
2822 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUI16,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes,
|
---|
2823 | PCRTFLOAT80U pr80Val1, int16_t const *pi16Val2));
|
---|
2824 | typedef FNIEMAIMPLFPUI16 *PFNIEMAIMPLFPUI16;
|
---|
2825 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUSTR80TOI16,(PCX86FXSTATE pFpuState, uint16_t *pFpuRes,
|
---|
2826 | int16_t *pi16Dst, PCRTFLOAT80U pr80Src));
|
---|
2827 | typedef FNIEMAIMPLFPUSTR80TOI16 *PFNIEMAIMPLFPUSTR80TOI16;
|
---|
2828 |
|
---|
2829 | FNIEMAIMPLFPUI16 iemAImpl_fiadd_r80_by_i16;
|
---|
2830 | FNIEMAIMPLFPUI16 iemAImpl_fimul_r80_by_i16;
|
---|
2831 | FNIEMAIMPLFPUI16 iemAImpl_fisub_r80_by_i16;
|
---|
2832 | FNIEMAIMPLFPUI16 iemAImpl_fisubr_r80_by_i16;
|
---|
2833 | FNIEMAIMPLFPUI16 iemAImpl_fidiv_r80_by_i16;
|
---|
2834 | FNIEMAIMPLFPUI16 iemAImpl_fidivr_r80_by_i16;
|
---|
2835 |
|
---|
2836 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUI16FSW,(PCX86FXSTATE pFpuState, uint16_t *pFSW,
|
---|
2837 | PCRTFLOAT80U pr80Val1, int16_t const *pi16Val2));
|
---|
2838 | typedef FNIEMAIMPLFPUI16FSW *PFNIEMAIMPLFPUI16FSW;
|
---|
2839 | FNIEMAIMPLFPUI16FSW iemAImpl_ficom_r80_by_i16;
|
---|
2840 |
|
---|
2841 | IEM_DECL_IMPL_DEF(void, iemAImpl_fild_r80_from_i16,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, int16_t const *pi16Val));
|
---|
2842 | FNIEMAIMPLFPUSTR80TOI16 iemAImpl_fist_r80_to_i16;
|
---|
2843 | FNIEMAIMPLFPUSTR80TOI16 iemAImpl_fistt_r80_to_i16, iemAImpl_fistt_r80_to_i16_amd, iemAImpl_fistt_r80_to_i16_intel;
|
---|
2844 | /** @} */
|
---|
2845 |
|
---|
2846 | /** @name FPU operations taking a 32-bit signed integer argument
|
---|
2847 | * @{ */
|
---|
2848 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUI32,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes,
|
---|
2849 | PCRTFLOAT80U pr80Val1, int32_t const *pi32Val2));
|
---|
2850 | typedef FNIEMAIMPLFPUI32 *PFNIEMAIMPLFPUI32;
|
---|
2851 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUSTR80TOI32,(PCX86FXSTATE pFpuState, uint16_t *pFpuRes,
|
---|
2852 | int32_t *pi32Dst, PCRTFLOAT80U pr80Src));
|
---|
2853 | typedef FNIEMAIMPLFPUSTR80TOI32 *PFNIEMAIMPLFPUSTR80TOI32;
|
---|
2854 |
|
---|
2855 | FNIEMAIMPLFPUI32 iemAImpl_fiadd_r80_by_i32;
|
---|
2856 | FNIEMAIMPLFPUI32 iemAImpl_fimul_r80_by_i32;
|
---|
2857 | FNIEMAIMPLFPUI32 iemAImpl_fisub_r80_by_i32;
|
---|
2858 | FNIEMAIMPLFPUI32 iemAImpl_fisubr_r80_by_i32;
|
---|
2859 | FNIEMAIMPLFPUI32 iemAImpl_fidiv_r80_by_i32;
|
---|
2860 | FNIEMAIMPLFPUI32 iemAImpl_fidivr_r80_by_i32;
|
---|
2861 |
|
---|
2862 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUI32FSW,(PCX86FXSTATE pFpuState, uint16_t *pFSW,
|
---|
2863 | PCRTFLOAT80U pr80Val1, int32_t const *pi32Val2));
|
---|
2864 | typedef FNIEMAIMPLFPUI32FSW *PFNIEMAIMPLFPUI32FSW;
|
---|
2865 | FNIEMAIMPLFPUI32FSW iemAImpl_ficom_r80_by_i32;
|
---|
2866 |
|
---|
2867 | IEM_DECL_IMPL_DEF(void, iemAImpl_fild_r80_from_i32,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, int32_t const *pi32Val));
|
---|
2868 | FNIEMAIMPLFPUSTR80TOI32 iemAImpl_fist_r80_to_i32;
|
---|
2869 | FNIEMAIMPLFPUSTR80TOI32 iemAImpl_fistt_r80_to_i32;
|
---|
2870 | /** @} */
|
---|
2871 |
|
---|
2872 | /** @name FPU operations taking a 64-bit signed integer argument
|
---|
2873 | * @{ */
|
---|
2874 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPUSTR80TOI64,(PCX86FXSTATE pFpuState, uint16_t *pFpuRes,
|
---|
2875 | int64_t *pi64Dst, PCRTFLOAT80U pr80Src));
|
---|
2876 | typedef FNIEMAIMPLFPUSTR80TOI64 *PFNIEMAIMPLFPUSTR80TOI64;
|
---|
2877 |
|
---|
2878 | IEM_DECL_IMPL_DEF(void, iemAImpl_fild_r80_from_i64,(PCX86FXSTATE pFpuState, PIEMFPURESULT pFpuRes, int64_t const *pi64Val));
|
---|
2879 | FNIEMAIMPLFPUSTR80TOI64 iemAImpl_fist_r80_to_i64;
|
---|
2880 | FNIEMAIMPLFPUSTR80TOI64 iemAImpl_fistt_r80_to_i64;
|
---|
2881 | /** @} */
|
---|
2882 |
|
---|
2883 |
|
---|
2884 | /** Temporary type representing a 256-bit vector register. */
|
---|
2885 | typedef struct { uint64_t au64[4]; } IEMVMM256;
|
---|
2886 | /** Temporary type pointing to a 256-bit vector register. */
|
---|
2887 | typedef IEMVMM256 *PIEMVMM256;
|
---|
2888 | /** Temporary type pointing to a const 256-bit vector register. */
|
---|
2889 | typedef IEMVMM256 *PCIEMVMM256;
|
---|
2890 |
|
---|
2891 |
|
---|
2892 | /** @name Media (SSE/MMX/AVX) operations: full1 + full2 -> full1.
|
---|
2893 | * @{ */
|
---|
2894 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAF2U64,(PCX86FXSTATE pFpuState, uint64_t *puDst, uint64_t const *puSrc));
|
---|
2895 | typedef FNIEMAIMPLMEDIAF2U64 *PFNIEMAIMPLMEDIAF2U64;
|
---|
2896 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAF2U128,(PCX86FXSTATE pFpuState, PRTUINT128U puDst, PCRTUINT128U puSrc));
|
---|
2897 | typedef FNIEMAIMPLMEDIAF2U128 *PFNIEMAIMPLMEDIAF2U128;
|
---|
2898 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAF3U128,(PX86XSAVEAREA pExtState, PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2));
|
---|
2899 | typedef FNIEMAIMPLMEDIAF3U128 *PFNIEMAIMPLMEDIAF3U128;
|
---|
2900 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAF3U256,(PX86XSAVEAREA pExtState, PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2));
|
---|
2901 | typedef FNIEMAIMPLMEDIAF3U256 *PFNIEMAIMPLMEDIAF3U256;
|
---|
2902 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAOPTF2U64,(uint64_t *puDst, uint64_t const *puSrc));
|
---|
2903 | typedef FNIEMAIMPLMEDIAOPTF2U64 *PFNIEMAIMPLMEDIAOPTF2U64;
|
---|
2904 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAOPTF2U128,(PRTUINT128U puDst, PCRTUINT128U puSrc));
|
---|
2905 | typedef FNIEMAIMPLMEDIAOPTF2U128 *PFNIEMAIMPLMEDIAOPTF2U128;
|
---|
2906 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAOPTF3U128,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2));
|
---|
2907 | typedef FNIEMAIMPLMEDIAOPTF3U128 *PFNIEMAIMPLMEDIAOPTF3U128;
|
---|
2908 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAOPTF3U256,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2));
|
---|
2909 | typedef FNIEMAIMPLMEDIAOPTF3U256 *PFNIEMAIMPLMEDIAOPTF3U256;
|
---|
2910 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAOPTF2U256,(PRTUINT256U puDst, PCRTUINT256U puSrc));
|
---|
2911 | typedef FNIEMAIMPLMEDIAOPTF2U256 *PFNIEMAIMPLMEDIAOPTF2U256;
|
---|
2912 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pshufb_u64, iemAImpl_pshufb_u64_fallback;
|
---|
2913 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pand_u64, iemAImpl_pandn_u64, iemAImpl_por_u64, iemAImpl_pxor_u64;
|
---|
2914 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pcmpeqb_u64, iemAImpl_pcmpeqw_u64, iemAImpl_pcmpeqd_u64;
|
---|
2915 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pcmpgtb_u64, iemAImpl_pcmpgtw_u64, iemAImpl_pcmpgtd_u64;
|
---|
2916 | FNIEMAIMPLMEDIAF2U64 iemAImpl_paddb_u64, iemAImpl_paddsb_u64, iemAImpl_paddusb_u64;
|
---|
2917 | FNIEMAIMPLMEDIAF2U64 iemAImpl_paddw_u64, iemAImpl_paddsw_u64, iemAImpl_paddusw_u64;
|
---|
2918 | FNIEMAIMPLMEDIAF2U64 iemAImpl_paddd_u64;
|
---|
2919 | FNIEMAIMPLMEDIAF2U64 iemAImpl_paddq_u64;
|
---|
2920 | FNIEMAIMPLMEDIAF2U64 iemAImpl_psubb_u64, iemAImpl_psubsb_u64, iemAImpl_psubusb_u64;
|
---|
2921 | FNIEMAIMPLMEDIAF2U64 iemAImpl_psubw_u64, iemAImpl_psubsw_u64, iemAImpl_psubusw_u64;
|
---|
2922 | FNIEMAIMPLMEDIAF2U64 iemAImpl_psubd_u64;
|
---|
2923 | FNIEMAIMPLMEDIAF2U64 iemAImpl_psubq_u64;
|
---|
2924 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pmaddwd_u64;
|
---|
2925 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pmullw_u64, iemAImpl_pmulhw_u64;
|
---|
2926 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pminub_u64, iemAImpl_pmaxub_u64;
|
---|
2927 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pminsw_u64, iemAImpl_pmaxsw_u64;
|
---|
2928 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pabsb_u64, iemAImpl_pabsb_u64_fallback;
|
---|
2929 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pabsw_u64, iemAImpl_pabsw_u64_fallback;
|
---|
2930 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pabsd_u64, iemAImpl_pabsd_u64_fallback;
|
---|
2931 | FNIEMAIMPLMEDIAF2U64 iemAImpl_psignb_u64, iemAImpl_psignb_u64_fallback;
|
---|
2932 | FNIEMAIMPLMEDIAF2U64 iemAImpl_psignw_u64, iemAImpl_psignw_u64_fallback;
|
---|
2933 | FNIEMAIMPLMEDIAF2U64 iemAImpl_psignd_u64, iemAImpl_psignd_u64_fallback;
|
---|
2934 | FNIEMAIMPLMEDIAF2U64 iemAImpl_phaddw_u64, iemAImpl_phaddw_u64_fallback;
|
---|
2935 | FNIEMAIMPLMEDIAF2U64 iemAImpl_phaddd_u64, iemAImpl_phaddd_u64_fallback;
|
---|
2936 | FNIEMAIMPLMEDIAF2U64 iemAImpl_phsubw_u64, iemAImpl_phsubw_u64_fallback;
|
---|
2937 | FNIEMAIMPLMEDIAF2U64 iemAImpl_phsubd_u64, iemAImpl_phsubd_u64_fallback;
|
---|
2938 | FNIEMAIMPLMEDIAF2U64 iemAImpl_phaddsw_u64, iemAImpl_phaddsw_u64_fallback;
|
---|
2939 | FNIEMAIMPLMEDIAF2U64 iemAImpl_phsubsw_u64, iemAImpl_phsubsw_u64_fallback;
|
---|
2940 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pmaddubsw_u64, iemAImpl_pmaddubsw_u64_fallback;
|
---|
2941 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pmulhrsw_u64, iemAImpl_pmulhrsw_u64_fallback;
|
---|
2942 | FNIEMAIMPLMEDIAF2U64 iemAImpl_pmuludq_u64;
|
---|
2943 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_psllw_u64, iemAImpl_psrlw_u64, iemAImpl_psraw_u64;
|
---|
2944 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_pslld_u64, iemAImpl_psrld_u64, iemAImpl_psrad_u64;
|
---|
2945 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_psllq_u64, iemAImpl_psrlq_u64;
|
---|
2946 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_packsswb_u64, iemAImpl_packuswb_u64;
|
---|
2947 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_packssdw_u64;
|
---|
2948 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_pmulhuw_u64;
|
---|
2949 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_pavgb_u64, iemAImpl_pavgw_u64;
|
---|
2950 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_psadbw_u64;
|
---|
2951 |
|
---|
2952 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pshufb_u128, iemAImpl_pshufb_u128_fallback;
|
---|
2953 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pand_u128, iemAImpl_pandn_u128, iemAImpl_por_u128, iemAImpl_pxor_u128;
|
---|
2954 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pcmpeqb_u128, iemAImpl_pcmpeqw_u128, iemAImpl_pcmpeqd_u128;
|
---|
2955 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pcmpeqq_u128, iemAImpl_pcmpeqq_u128_fallback;
|
---|
2956 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pcmpgtb_u128, iemAImpl_pcmpgtw_u128, iemAImpl_pcmpgtd_u128;
|
---|
2957 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pcmpgtq_u128, iemAImpl_pcmpgtq_u128_fallback;
|
---|
2958 | FNIEMAIMPLMEDIAF2U128 iemAImpl_paddb_u128, iemAImpl_paddsb_u128, iemAImpl_paddusb_u128;
|
---|
2959 | FNIEMAIMPLMEDIAF2U128 iemAImpl_paddw_u128, iemAImpl_paddsw_u128, iemAImpl_paddusw_u128;
|
---|
2960 | FNIEMAIMPLMEDIAF2U128 iemAImpl_paddd_u128;
|
---|
2961 | FNIEMAIMPLMEDIAF2U128 iemAImpl_paddq_u128;
|
---|
2962 | FNIEMAIMPLMEDIAF2U128 iemAImpl_psubb_u128, iemAImpl_psubsb_u128, iemAImpl_psubusb_u128;
|
---|
2963 | FNIEMAIMPLMEDIAF2U128 iemAImpl_psubw_u128, iemAImpl_psubsw_u128, iemAImpl_psubusw_u128;
|
---|
2964 | FNIEMAIMPLMEDIAF2U128 iemAImpl_psubd_u128;
|
---|
2965 | FNIEMAIMPLMEDIAF2U128 iemAImpl_psubq_u128;
|
---|
2966 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmullw_u128, iemAImpl_pmullw_u128_fallback;
|
---|
2967 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmulhw_u128;
|
---|
2968 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmulld_u128, iemAImpl_pmulld_u128_fallback;
|
---|
2969 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmaddwd_u128;
|
---|
2970 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pminub_u128;
|
---|
2971 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pminud_u128, iemAImpl_pminud_u128_fallback;
|
---|
2972 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pminuw_u128, iemAImpl_pminuw_u128_fallback;
|
---|
2973 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pminsb_u128, iemAImpl_pminsb_u128_fallback;
|
---|
2974 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pminsd_u128, iemAImpl_pminsd_u128_fallback;
|
---|
2975 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pminsw_u128, iemAImpl_pminsw_u128_fallback;
|
---|
2976 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmaxub_u128;
|
---|
2977 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmaxud_u128, iemAImpl_pmaxud_u128_fallback;
|
---|
2978 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmaxuw_u128, iemAImpl_pmaxuw_u128_fallback;
|
---|
2979 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmaxsb_u128, iemAImpl_pmaxsb_u128_fallback;
|
---|
2980 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmaxsw_u128;
|
---|
2981 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmaxsd_u128, iemAImpl_pmaxsd_u128_fallback;
|
---|
2982 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pabsb_u128, iemAImpl_pabsb_u128_fallback;
|
---|
2983 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pabsw_u128, iemAImpl_pabsw_u128_fallback;
|
---|
2984 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pabsd_u128, iemAImpl_pabsd_u128_fallback;
|
---|
2985 | FNIEMAIMPLMEDIAF2U128 iemAImpl_psignb_u128, iemAImpl_psignb_u128_fallback;
|
---|
2986 | FNIEMAIMPLMEDIAF2U128 iemAImpl_psignw_u128, iemAImpl_psignw_u128_fallback;
|
---|
2987 | FNIEMAIMPLMEDIAF2U128 iemAImpl_psignd_u128, iemAImpl_psignd_u128_fallback;
|
---|
2988 | FNIEMAIMPLMEDIAF2U128 iemAImpl_phaddw_u128, iemAImpl_phaddw_u128_fallback;
|
---|
2989 | FNIEMAIMPLMEDIAF2U128 iemAImpl_phaddd_u128, iemAImpl_phaddd_u128_fallback;
|
---|
2990 | FNIEMAIMPLMEDIAF2U128 iemAImpl_phsubw_u128, iemAImpl_phsubw_u128_fallback;
|
---|
2991 | FNIEMAIMPLMEDIAF2U128 iemAImpl_phsubd_u128, iemAImpl_phsubd_u128_fallback;
|
---|
2992 | FNIEMAIMPLMEDIAF2U128 iemAImpl_phaddsw_u128, iemAImpl_phaddsw_u128_fallback;
|
---|
2993 | FNIEMAIMPLMEDIAF2U128 iemAImpl_phsubsw_u128, iemAImpl_phsubsw_u128_fallback;
|
---|
2994 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmaddubsw_u128, iemAImpl_pmaddubsw_u128_fallback;
|
---|
2995 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmulhrsw_u128, iemAImpl_pmulhrsw_u128_fallback;
|
---|
2996 | FNIEMAIMPLMEDIAF2U128 iemAImpl_pmuludq_u128;
|
---|
2997 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_packsswb_u128, iemAImpl_packuswb_u128;
|
---|
2998 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_packssdw_u128, iemAImpl_packusdw_u128;
|
---|
2999 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_psllw_u128, iemAImpl_psrlw_u128, iemAImpl_psraw_u128;
|
---|
3000 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_pslld_u128, iemAImpl_psrld_u128, iemAImpl_psrad_u128;
|
---|
3001 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_psllq_u128, iemAImpl_psrlq_u128;
|
---|
3002 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_pmulhuw_u128;
|
---|
3003 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_pavgb_u128, iemAImpl_pavgw_u128;
|
---|
3004 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_psadbw_u128;
|
---|
3005 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_pmuldq_u128, iemAImpl_pmuldq_u128_fallback;
|
---|
3006 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_unpcklps_u128, iemAImpl_unpcklpd_u128;
|
---|
3007 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_unpckhps_u128, iemAImpl_unpckhpd_u128;
|
---|
3008 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_phminposuw_u128, iemAImpl_phminposuw_u128_fallback;
|
---|
3009 |
|
---|
3010 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpshufb_u128, iemAImpl_vpshufb_u128_fallback;
|
---|
3011 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpand_u128, iemAImpl_vpand_u128_fallback;
|
---|
3012 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpandn_u128, iemAImpl_vpandn_u128_fallback;
|
---|
3013 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpor_u128, iemAImpl_vpor_u128_fallback;
|
---|
3014 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpxor_u128, iemAImpl_vpxor_u128_fallback;
|
---|
3015 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpcmpeqb_u128, iemAImpl_vpcmpeqb_u128_fallback;
|
---|
3016 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpcmpeqw_u128, iemAImpl_vpcmpeqw_u128_fallback;
|
---|
3017 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpcmpeqd_u128, iemAImpl_vpcmpeqd_u128_fallback;
|
---|
3018 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpcmpeqq_u128, iemAImpl_vpcmpeqq_u128_fallback;
|
---|
3019 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpcmpgtb_u128, iemAImpl_vpcmpgtb_u128_fallback;
|
---|
3020 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpcmpgtw_u128, iemAImpl_vpcmpgtw_u128_fallback;
|
---|
3021 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpcmpgtd_u128, iemAImpl_vpcmpgtd_u128_fallback;
|
---|
3022 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpcmpgtq_u128, iemAImpl_vpcmpgtq_u128_fallback;
|
---|
3023 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpaddb_u128, iemAImpl_vpaddb_u128_fallback;
|
---|
3024 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpaddw_u128, iemAImpl_vpaddw_u128_fallback;
|
---|
3025 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpaddd_u128, iemAImpl_vpaddd_u128_fallback;
|
---|
3026 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpaddq_u128, iemAImpl_vpaddq_u128_fallback;
|
---|
3027 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpsubb_u128, iemAImpl_vpsubb_u128_fallback;
|
---|
3028 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpsubw_u128, iemAImpl_vpsubw_u128_fallback;
|
---|
3029 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpsubd_u128, iemAImpl_vpsubd_u128_fallback;
|
---|
3030 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpsubq_u128, iemAImpl_vpsubq_u128_fallback;
|
---|
3031 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpminub_u128, iemAImpl_vpminub_u128_fallback;
|
---|
3032 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpminuw_u128, iemAImpl_vpminuw_u128_fallback;
|
---|
3033 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpminud_u128, iemAImpl_vpminud_u128_fallback;
|
---|
3034 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpminsb_u128, iemAImpl_vpminsb_u128_fallback;
|
---|
3035 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpminsw_u128, iemAImpl_vpminsw_u128_fallback;
|
---|
3036 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpminsd_u128, iemAImpl_vpminsd_u128_fallback;
|
---|
3037 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpmaxub_u128, iemAImpl_vpmaxub_u128_fallback;
|
---|
3038 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpmaxuw_u128, iemAImpl_vpmaxuw_u128_fallback;
|
---|
3039 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpmaxud_u128, iemAImpl_vpmaxud_u128_fallback;
|
---|
3040 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpmaxsb_u128, iemAImpl_vpmaxsb_u128_fallback;
|
---|
3041 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpmaxsw_u128, iemAImpl_vpmaxsw_u128_fallback;
|
---|
3042 | FNIEMAIMPLMEDIAF3U128 iemAImpl_vpmaxsd_u128, iemAImpl_vpmaxsd_u128_fallback;
|
---|
3043 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpacksswb_u128, iemAImpl_vpacksswb_u128_fallback;
|
---|
3044 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpackssdw_u128, iemAImpl_vpackssdw_u128_fallback;
|
---|
3045 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpackuswb_u128, iemAImpl_vpackuswb_u128_fallback;
|
---|
3046 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpackusdw_u128, iemAImpl_vpackusdw_u128_fallback;
|
---|
3047 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpmullw_u128, iemAImpl_vpmullw_u128_fallback;
|
---|
3048 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpmulld_u128, iemAImpl_vpmulld_u128_fallback;
|
---|
3049 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpmulhw_u128, iemAImpl_vpmulhw_u128_fallback;
|
---|
3050 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpmulhuw_u128, iemAImpl_vpmulhuw_u128_fallback;
|
---|
3051 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpavgb_u128, iemAImpl_vpavgb_u128_fallback;
|
---|
3052 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpavgw_u128, iemAImpl_vpavgw_u128_fallback;
|
---|
3053 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsignb_u128, iemAImpl_vpsignb_u128_fallback;
|
---|
3054 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsignw_u128, iemAImpl_vpsignw_u128_fallback;
|
---|
3055 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsignd_u128, iemAImpl_vpsignd_u128_fallback;
|
---|
3056 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphaddw_u128, iemAImpl_vphaddw_u128_fallback;
|
---|
3057 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphaddd_u128, iemAImpl_vphaddd_u128_fallback;
|
---|
3058 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphsubw_u128, iemAImpl_vphsubw_u128_fallback;
|
---|
3059 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphsubd_u128, iemAImpl_vphsubd_u128_fallback;
|
---|
3060 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphaddsw_u128, iemAImpl_vphaddsw_u128_fallback;
|
---|
3061 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vphsubsw_u128, iemAImpl_vphsubsw_u128_fallback;
|
---|
3062 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpmaddubsw_u128, iemAImpl_vpmaddubsw_u128_fallback;
|
---|
3063 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpmulhrsw_u128, iemAImpl_vpmulhrsw_u128_fallback;
|
---|
3064 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsadbw_u128, iemAImpl_vpsadbw_u128_fallback;
|
---|
3065 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpmuldq_u128, iemAImpl_vpmuldq_u128_fallback;
|
---|
3066 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpmuludq_u128, iemAImpl_vpmuludq_u128_fallback;
|
---|
3067 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsubsb_u128, iemAImpl_vpsubsb_u128_fallback;
|
---|
3068 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsubsw_u128, iemAImpl_vpsubsw_u128_fallback;
|
---|
3069 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsubusb_u128, iemAImpl_vpsubusb_u128_fallback;
|
---|
3070 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpsubusw_u128, iemAImpl_vpsubusw_u128_fallback;
|
---|
3071 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpaddusb_u128, iemAImpl_vpaddusb_u128_fallback;
|
---|
3072 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpaddusw_u128, iemAImpl_vpaddusw_u128_fallback;
|
---|
3073 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpaddsb_u128, iemAImpl_vpaddsb_u128_fallback;
|
---|
3074 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpaddsw_u128, iemAImpl_vpaddsw_u128_fallback;
|
---|
3075 |
|
---|
3076 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vpabsb_u128, iemAImpl_vpabsb_u128_fallback;
|
---|
3077 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vpabsw_u128, iemAImpl_vpabsd_u128_fallback;
|
---|
3078 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vpabsd_u128, iemAImpl_vpabsw_u128_fallback;
|
---|
3079 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vphminposuw_u128, iemAImpl_vphminposuw_u128_fallback;
|
---|
3080 |
|
---|
3081 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpshufb_u256, iemAImpl_vpshufb_u256_fallback;
|
---|
3082 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpand_u256, iemAImpl_vpand_u256_fallback;
|
---|
3083 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpandn_u256, iemAImpl_vpandn_u256_fallback;
|
---|
3084 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpor_u256, iemAImpl_vpor_u256_fallback;
|
---|
3085 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpxor_u256, iemAImpl_vpxor_u256_fallback;
|
---|
3086 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpcmpeqb_u256, iemAImpl_vpcmpeqb_u256_fallback;
|
---|
3087 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpcmpeqw_u256, iemAImpl_vpcmpeqw_u256_fallback;
|
---|
3088 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpcmpeqd_u256, iemAImpl_vpcmpeqd_u256_fallback;
|
---|
3089 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpcmpeqq_u256, iemAImpl_vpcmpeqq_u256_fallback;
|
---|
3090 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpcmpgtb_u256, iemAImpl_vpcmpgtb_u256_fallback;
|
---|
3091 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpcmpgtw_u256, iemAImpl_vpcmpgtw_u256_fallback;
|
---|
3092 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpcmpgtd_u256, iemAImpl_vpcmpgtd_u256_fallback;
|
---|
3093 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpcmpgtq_u256, iemAImpl_vpcmpgtq_u256_fallback;
|
---|
3094 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpaddb_u256, iemAImpl_vpaddb_u256_fallback;
|
---|
3095 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpaddw_u256, iemAImpl_vpaddw_u256_fallback;
|
---|
3096 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpaddd_u256, iemAImpl_vpaddd_u256_fallback;
|
---|
3097 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpaddq_u256, iemAImpl_vpaddq_u256_fallback;
|
---|
3098 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpsubb_u256, iemAImpl_vpsubb_u256_fallback;
|
---|
3099 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpsubw_u256, iemAImpl_vpsubw_u256_fallback;
|
---|
3100 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpsubd_u256, iemAImpl_vpsubd_u256_fallback;
|
---|
3101 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpsubq_u256, iemAImpl_vpsubq_u256_fallback;
|
---|
3102 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpminub_u256, iemAImpl_vpminub_u256_fallback;
|
---|
3103 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpminuw_u256, iemAImpl_vpminuw_u256_fallback;
|
---|
3104 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpminud_u256, iemAImpl_vpminud_u256_fallback;
|
---|
3105 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpminsb_u256, iemAImpl_vpminsb_u256_fallback;
|
---|
3106 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpminsw_u256, iemAImpl_vpminsw_u256_fallback;
|
---|
3107 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpminsd_u256, iemAImpl_vpminsd_u256_fallback;
|
---|
3108 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpmaxub_u256, iemAImpl_vpmaxub_u256_fallback;
|
---|
3109 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpmaxuw_u256, iemAImpl_vpmaxuw_u256_fallback;
|
---|
3110 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpmaxud_u256, iemAImpl_vpmaxud_u256_fallback;
|
---|
3111 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpmaxsb_u256, iemAImpl_vpmaxsb_u256_fallback;
|
---|
3112 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpmaxsw_u256, iemAImpl_vpmaxsw_u256_fallback;
|
---|
3113 | FNIEMAIMPLMEDIAF3U256 iemAImpl_vpmaxsd_u256, iemAImpl_vpmaxsd_u256_fallback;
|
---|
3114 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpacksswb_u256, iemAImpl_vpacksswb_u256_fallback;
|
---|
3115 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpackssdw_u256, iemAImpl_vpackssdw_u256_fallback;
|
---|
3116 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpackuswb_u256, iemAImpl_vpackuswb_u256_fallback;
|
---|
3117 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpackusdw_u256, iemAImpl_vpackusdw_u256_fallback;
|
---|
3118 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmullw_u256, iemAImpl_vpmullw_u256_fallback;
|
---|
3119 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmulld_u256, iemAImpl_vpmulld_u256_fallback;
|
---|
3120 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmulhw_u256, iemAImpl_vpmulhw_u256_fallback;
|
---|
3121 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmulhuw_u256, iemAImpl_vpmulhuw_u256_fallback;
|
---|
3122 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpavgb_u256, iemAImpl_vpavgb_u256_fallback;
|
---|
3123 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpavgw_u256, iemAImpl_vpavgw_u256_fallback;
|
---|
3124 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsignb_u256, iemAImpl_vpsignb_u256_fallback;
|
---|
3125 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsignw_u256, iemAImpl_vpsignw_u256_fallback;
|
---|
3126 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsignd_u256, iemAImpl_vpsignd_u256_fallback;
|
---|
3127 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphaddw_u256, iemAImpl_vphaddw_u256_fallback;
|
---|
3128 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphaddd_u256, iemAImpl_vphaddd_u256_fallback;
|
---|
3129 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphsubw_u256, iemAImpl_vphsubw_u256_fallback;
|
---|
3130 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphsubd_u256, iemAImpl_vphsubd_u256_fallback;
|
---|
3131 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphaddsw_u256, iemAImpl_vphaddsw_u256_fallback;
|
---|
3132 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vphsubsw_u256, iemAImpl_vphsubsw_u256_fallback;
|
---|
3133 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmaddubsw_u256, iemAImpl_vpmaddubsw_u256_fallback;
|
---|
3134 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmulhrsw_u256, iemAImpl_vpmulhrsw_u256_fallback;
|
---|
3135 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsadbw_u256, iemAImpl_vpsadbw_u256_fallback;
|
---|
3136 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmuldq_u256, iemAImpl_vpmuldq_u256_fallback;
|
---|
3137 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpmuludq_u256, iemAImpl_vpmuludq_u256_fallback;
|
---|
3138 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsubsb_u256, iemAImpl_vpsubsb_u256_fallback;
|
---|
3139 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsubsw_u256, iemAImpl_vpsubsw_u256_fallback;
|
---|
3140 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsubusb_u256, iemAImpl_vpsubusb_u256_fallback;
|
---|
3141 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpsubusw_u256, iemAImpl_vpsubusw_u256_fallback;
|
---|
3142 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpaddusb_u256, iemAImpl_vpaddusb_u256_fallback;
|
---|
3143 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpaddusw_u256, iemAImpl_vpaddusw_u256_fallback;
|
---|
3144 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpaddsb_u256, iemAImpl_vpaddsb_u256_fallback;
|
---|
3145 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpaddsw_u256, iemAImpl_vpaddsw_u256_fallback;
|
---|
3146 |
|
---|
3147 | FNIEMAIMPLMEDIAOPTF2U256 iemAImpl_vpabsb_u256, iemAImpl_vpabsb_u256_fallback;
|
---|
3148 | FNIEMAIMPLMEDIAOPTF2U256 iemAImpl_vpabsw_u256, iemAImpl_vpabsw_u256_fallback;
|
---|
3149 | FNIEMAIMPLMEDIAOPTF2U256 iemAImpl_vpabsd_u256, iemAImpl_vpabsd_u256_fallback;
|
---|
3150 | /** @} */
|
---|
3151 |
|
---|
3152 | /** @name Media (SSE/MMX/AVX) operations: lowhalf1 + lowhalf1 -> full1.
|
---|
3153 | * @{ */
|
---|
3154 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_punpcklbw_u64, iemAImpl_punpcklwd_u64, iemAImpl_punpckldq_u64;
|
---|
3155 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_punpcklbw_u128, iemAImpl_punpcklwd_u128, iemAImpl_punpckldq_u128, iemAImpl_punpcklqdq_u128;
|
---|
3156 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpunpcklbw_u128, iemAImpl_vpunpcklbw_u128_fallback,
|
---|
3157 | iemAImpl_vpunpcklwd_u128, iemAImpl_vpunpcklwd_u128_fallback,
|
---|
3158 | iemAImpl_vpunpckldq_u128, iemAImpl_vpunpckldq_u128_fallback,
|
---|
3159 | iemAImpl_vpunpcklqdq_u128, iemAImpl_vpunpcklqdq_u128_fallback,
|
---|
3160 | iemAImpl_vunpcklps_u128, iemAImpl_vunpcklps_u128_fallback,
|
---|
3161 | iemAImpl_vunpcklpd_u128, iemAImpl_vunpcklpd_u128_fallback,
|
---|
3162 | iemAImpl_vunpckhps_u128, iemAImpl_vunpckhps_u128_fallback,
|
---|
3163 | iemAImpl_vunpckhpd_u128, iemAImpl_vunpckhpd_u128_fallback;
|
---|
3164 |
|
---|
3165 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpunpcklbw_u256, iemAImpl_vpunpcklbw_u256_fallback,
|
---|
3166 | iemAImpl_vpunpcklwd_u256, iemAImpl_vpunpcklwd_u256_fallback,
|
---|
3167 | iemAImpl_vpunpckldq_u256, iemAImpl_vpunpckldq_u256_fallback,
|
---|
3168 | iemAImpl_vpunpcklqdq_u256, iemAImpl_vpunpcklqdq_u256_fallback,
|
---|
3169 | iemAImpl_vunpcklps_u256, iemAImpl_vunpcklps_u256_fallback,
|
---|
3170 | iemAImpl_vunpcklpd_u256, iemAImpl_vunpcklpd_u256_fallback,
|
---|
3171 | iemAImpl_vunpckhps_u256, iemAImpl_vunpckhps_u256_fallback,
|
---|
3172 | iemAImpl_vunpckhpd_u256, iemAImpl_vunpckhpd_u256_fallback;
|
---|
3173 | /** @} */
|
---|
3174 |
|
---|
3175 | /** @name Media (SSE/MMX/AVX) operations: hihalf1 + hihalf2 -> full1.
|
---|
3176 | * @{ */
|
---|
3177 | FNIEMAIMPLMEDIAOPTF2U64 iemAImpl_punpckhbw_u64, iemAImpl_punpckhwd_u64, iemAImpl_punpckhdq_u64;
|
---|
3178 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_punpckhbw_u128, iemAImpl_punpckhwd_u128, iemAImpl_punpckhdq_u128, iemAImpl_punpckhqdq_u128;
|
---|
3179 | FNIEMAIMPLMEDIAOPTF3U128 iemAImpl_vpunpckhbw_u128, iemAImpl_vpunpckhbw_u128_fallback,
|
---|
3180 | iemAImpl_vpunpckhwd_u128, iemAImpl_vpunpckhwd_u128_fallback,
|
---|
3181 | iemAImpl_vpunpckhdq_u128, iemAImpl_vpunpckhdq_u128_fallback,
|
---|
3182 | iemAImpl_vpunpckhqdq_u128, iemAImpl_vpunpckhqdq_u128_fallback;
|
---|
3183 | FNIEMAIMPLMEDIAOPTF3U256 iemAImpl_vpunpckhbw_u256, iemAImpl_vpunpckhbw_u256_fallback,
|
---|
3184 | iemAImpl_vpunpckhwd_u256, iemAImpl_vpunpckhwd_u256_fallback,
|
---|
3185 | iemAImpl_vpunpckhdq_u256, iemAImpl_vpunpckhdq_u256_fallback,
|
---|
3186 | iemAImpl_vpunpckhqdq_u256, iemAImpl_vpunpckhqdq_u256_fallback;
|
---|
3187 | /** @} */
|
---|
3188 |
|
---|
3189 | /** @name Media (SSE/MMX/AVX) operation: Packed Shuffle Stuff (evil)
|
---|
3190 | * @{ */
|
---|
3191 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAPSHUFU128,(PRTUINT128U puDst, PCRTUINT128U puSrc, uint8_t bEvil));
|
---|
3192 | typedef FNIEMAIMPLMEDIAPSHUFU128 *PFNIEMAIMPLMEDIAPSHUFU128;
|
---|
3193 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAPSHUFU256,(PRTUINT256U puDst, PCRTUINT256U puSrc, uint8_t bEvil));
|
---|
3194 | typedef FNIEMAIMPLMEDIAPSHUFU256 *PFNIEMAIMPLMEDIAPSHUFU256;
|
---|
3195 | IEM_DECL_IMPL_DEF(void, iemAImpl_pshufw_u64,(uint64_t *puDst, uint64_t const *puSrc, uint8_t bEvil));
|
---|
3196 | FNIEMAIMPLMEDIAPSHUFU128 iemAImpl_pshufhw_u128, iemAImpl_pshuflw_u128, iemAImpl_pshufd_u128;
|
---|
3197 | #ifndef IEM_WITHOUT_ASSEMBLY
|
---|
3198 | FNIEMAIMPLMEDIAPSHUFU256 iemAImpl_vpshufhw_u256, iemAImpl_vpshuflw_u256, iemAImpl_vpshufd_u256;
|
---|
3199 | #endif
|
---|
3200 | FNIEMAIMPLMEDIAPSHUFU256 iemAImpl_vpshufhw_u256_fallback, iemAImpl_vpshuflw_u256_fallback, iemAImpl_vpshufd_u256_fallback;
|
---|
3201 | /** @} */
|
---|
3202 |
|
---|
3203 | /** @name Media (SSE/MMX/AVX) operation: Shift Immediate Stuff (evil)
|
---|
3204 | * @{ */
|
---|
3205 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAPSHIFTU64,(uint64_t *puDst, uint8_t bShift));
|
---|
3206 | typedef FNIEMAIMPLMEDIAPSHIFTU64 *PFNIEMAIMPLMEDIAPSHIFTU64;
|
---|
3207 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAPSHIFTU128,(PRTUINT128U puDst, uint8_t bShift));
|
---|
3208 | typedef FNIEMAIMPLMEDIAPSHIFTU128 *PFNIEMAIMPLMEDIAPSHIFTU128;
|
---|
3209 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAPSHIFTU256,(PRTUINT256U puDst, uint8_t bShift));
|
---|
3210 | typedef FNIEMAIMPLMEDIAPSHIFTU256 *PFNIEMAIMPLMEDIAPSHIFTU256;
|
---|
3211 | FNIEMAIMPLMEDIAPSHIFTU64 iemAImpl_psllw_imm_u64, iemAImpl_pslld_imm_u64, iemAImpl_psllq_imm_u64;
|
---|
3212 | FNIEMAIMPLMEDIAPSHIFTU64 iemAImpl_psrlw_imm_u64, iemAImpl_psrld_imm_u64, iemAImpl_psrlq_imm_u64;
|
---|
3213 | FNIEMAIMPLMEDIAPSHIFTU64 iemAImpl_psraw_imm_u64, iemAImpl_psrad_imm_u64;
|
---|
3214 | FNIEMAIMPLMEDIAPSHIFTU128 iemAImpl_psllw_imm_u128, iemAImpl_pslld_imm_u128, iemAImpl_psllq_imm_u128;
|
---|
3215 | FNIEMAIMPLMEDIAPSHIFTU128 iemAImpl_psrlw_imm_u128, iemAImpl_psrld_imm_u128, iemAImpl_psrlq_imm_u128;
|
---|
3216 | FNIEMAIMPLMEDIAPSHIFTU128 iemAImpl_psraw_imm_u128, iemAImpl_psrad_imm_u128;
|
---|
3217 | FNIEMAIMPLMEDIAPSHIFTU128 iemAImpl_pslldq_imm_u128, iemAImpl_psrldq_imm_u128;
|
---|
3218 | /** @} */
|
---|
3219 |
|
---|
3220 | /** @name Media (SSE/MMX/AVX) operation: Move Byte Mask
|
---|
3221 | * @{ */
|
---|
3222 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovmskb_u64,(uint64_t *pu64Dst, uint64_t const *puSrc));
|
---|
3223 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovmskb_u128,(uint64_t *pu64Dst, PCRTUINT128U puSrc));
|
---|
3224 | #ifndef IEM_WITHOUT_ASSEMBLY
|
---|
3225 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovmskb_u256,(uint64_t *pu64Dst, PCRTUINT256U puSrc));
|
---|
3226 | #endif
|
---|
3227 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovmskb_u256_fallback,(uint64_t *pu64Dst, PCRTUINT256U puSrc));
|
---|
3228 | /** @} */
|
---|
3229 |
|
---|
3230 | /** @name Media (SSE/MMX/AVX) operations: Variable Blend Packed Bytes/R32/R64.
|
---|
3231 | * @{ */
|
---|
3232 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBLENDU128,(PRTUINT128U puDst, PCRTUINT128U puSrc, PCRTUINT128U puMask));
|
---|
3233 | typedef FNIEMAIMPLBLENDU128 *PFNIEMAIMPLBLENDU128;
|
---|
3234 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLAVXBLENDU128,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2, PCRTUINT128U puMask));
|
---|
3235 | typedef FNIEMAIMPLAVXBLENDU128 *PFNIEMAIMPLAVXBLENDU128;
|
---|
3236 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLAVXBLENDU256,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2, PCRTUINT256U puMask));
|
---|
3237 | typedef FNIEMAIMPLAVXBLENDU256 *PFNIEMAIMPLAVXBLENDU256;
|
---|
3238 |
|
---|
3239 | FNIEMAIMPLBLENDU128 iemAImpl_pblendvb_u128;
|
---|
3240 | FNIEMAIMPLBLENDU128 iemAImpl_pblendvb_u128_fallback;
|
---|
3241 | FNIEMAIMPLAVXBLENDU128 iemAImpl_vpblendvb_u128;
|
---|
3242 | FNIEMAIMPLAVXBLENDU128 iemAImpl_vpblendvb_u128_fallback;
|
---|
3243 | FNIEMAIMPLAVXBLENDU256 iemAImpl_vpblendvb_u256;
|
---|
3244 | FNIEMAIMPLAVXBLENDU256 iemAImpl_vpblendvb_u256_fallback;
|
---|
3245 |
|
---|
3246 | FNIEMAIMPLBLENDU128 iemAImpl_blendvps_u128;
|
---|
3247 | FNIEMAIMPLBLENDU128 iemAImpl_blendvps_u128_fallback;
|
---|
3248 | FNIEMAIMPLAVXBLENDU128 iemAImpl_vblendvps_u128;
|
---|
3249 | FNIEMAIMPLAVXBLENDU128 iemAImpl_vblendvps_u128_fallback;
|
---|
3250 | FNIEMAIMPLAVXBLENDU256 iemAImpl_vblendvps_u256;
|
---|
3251 | FNIEMAIMPLAVXBLENDU256 iemAImpl_vblendvps_u256_fallback;
|
---|
3252 |
|
---|
3253 | FNIEMAIMPLBLENDU128 iemAImpl_blendvpd_u128;
|
---|
3254 | FNIEMAIMPLBLENDU128 iemAImpl_blendvpd_u128_fallback;
|
---|
3255 | FNIEMAIMPLAVXBLENDU128 iemAImpl_vblendvpd_u128;
|
---|
3256 | FNIEMAIMPLAVXBLENDU128 iemAImpl_vblendvpd_u128_fallback;
|
---|
3257 | FNIEMAIMPLAVXBLENDU256 iemAImpl_vblendvpd_u256;
|
---|
3258 | FNIEMAIMPLAVXBLENDU256 iemAImpl_vblendvpd_u256_fallback;
|
---|
3259 | /** @} */
|
---|
3260 |
|
---|
3261 |
|
---|
3262 | /** @name Media (SSE/MMX/AVX) operation: Sort this later
|
---|
3263 | * @{ */
|
---|
3264 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovsldup_256_rr,(PX86XSAVEAREA pXState, uint8_t iYRegDst, uint8_t iYRegSrc));
|
---|
3265 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovsldup_256_rm,(PX86XSAVEAREA pXState, uint8_t iYRegDst, PCRTUINT256U pSrc));
|
---|
3266 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovshdup_256_rr,(PX86XSAVEAREA pXState, uint8_t iYRegDst, uint8_t iYRegSrc));
|
---|
3267 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovshdup_256_rm,(PX86XSAVEAREA pXState, uint8_t iYRegDst, PCRTUINT256U pSrc));
|
---|
3268 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovddup_256_rr,(PX86XSAVEAREA pXState, uint8_t iYRegDst, uint8_t iYRegSrc));
|
---|
3269 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovddup_256_rm,(PX86XSAVEAREA pXState, uint8_t iYRegDst, PCRTUINT256U pSrc));
|
---|
3270 |
|
---|
3271 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovsxbw_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3272 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbw_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3273 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbw_u128_fallback,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3274 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbw_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3275 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbw_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3276 |
|
---|
3277 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovsxbd_u128,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3278 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbd_u128,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3279 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbd_u128_fallback,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3280 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbd_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3281 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbd_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3282 |
|
---|
3283 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovsxbq_u128,(PRTUINT128U puDst, uint16_t uSrc));
|
---|
3284 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbq_u128,(PRTUINT128U puDst, uint16_t uSrc));
|
---|
3285 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbq_u128_fallback,(PRTUINT128U puDst, uint16_t uSrc));
|
---|
3286 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbq_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3287 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxbq_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3288 |
|
---|
3289 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovsxwd_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3290 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxwd_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3291 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxwd_u128_fallback,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3292 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxwd_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3293 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxwd_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3294 |
|
---|
3295 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovsxwq_u128,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3296 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxwq_u128,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3297 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxwq_u128_fallback,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3298 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxwq_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3299 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxwq_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3300 |
|
---|
3301 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovsxdq_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3302 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxdq_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3303 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxdq_u128_fallback,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3304 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxdq_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3305 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovsxdq_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3306 |
|
---|
3307 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovzxbw_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3308 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbw_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3309 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbw_u128_fallback,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3310 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbw_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3311 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbw_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3312 |
|
---|
3313 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovzxbd_u128,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3314 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbd_u128,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3315 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbd_u128_fallback,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3316 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbd_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3317 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbd_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3318 |
|
---|
3319 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovzxbq_u128,(PRTUINT128U puDst, uint16_t uSrc));
|
---|
3320 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbq_u128,(PRTUINT128U puDst, uint16_t uSrc));
|
---|
3321 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbq_u128_fallback,(PRTUINT128U puDst, uint16_t uSrc));
|
---|
3322 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbq_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3323 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxbq_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3324 |
|
---|
3325 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovzxwd_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3326 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxwd_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3327 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxwd_u128_fallback,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3328 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxwd_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3329 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxwd_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3330 |
|
---|
3331 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovzxwq_u128,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3332 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxwq_u128,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3333 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxwq_u128_fallback,(PRTUINT128U puDst, uint32_t uSrc));
|
---|
3334 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxwq_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3335 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxwq_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3336 |
|
---|
3337 | IEM_DECL_IMPL_DEF(void, iemAImpl_pmovzxdq_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3338 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxdq_u128,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3339 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxdq_u128_fallback,(PRTUINT128U puDst, uint64_t uSrc));
|
---|
3340 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxdq_u256,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3341 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpmovzxdq_u256_fallback,(PRTUINT256U puDst, PCRTUINT128U puSrc));
|
---|
3342 |
|
---|
3343 | IEM_DECL_IMPL_DEF(void, iemAImpl_shufpd_u128,(PRTUINT128U puDst, PCRTUINT128U puSrc, uint8_t bEvil));
|
---|
3344 | IEM_DECL_IMPL_DEF(void, iemAImpl_vshufpd_u128,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2, uint8_t bEvil));
|
---|
3345 | IEM_DECL_IMPL_DEF(void, iemAImpl_vshufpd_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2, uint8_t bEvil));
|
---|
3346 | IEM_DECL_IMPL_DEF(void, iemAImpl_vshufpd_u256,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2, uint8_t bEvil));
|
---|
3347 | IEM_DECL_IMPL_DEF(void, iemAImpl_vshufpd_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2, uint8_t bEvil));
|
---|
3348 |
|
---|
3349 | IEM_DECL_IMPL_DEF(void, iemAImpl_shufps_u128,(PRTUINT128U puDst, PCRTUINT128U puSrc, uint8_t bEvil));
|
---|
3350 | IEM_DECL_IMPL_DEF(void, iemAImpl_vshufps_u128,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2, uint8_t bEvil));
|
---|
3351 | IEM_DECL_IMPL_DEF(void, iemAImpl_vshufps_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2, uint8_t bEvil));
|
---|
3352 | IEM_DECL_IMPL_DEF(void, iemAImpl_vshufps_u256,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2, uint8_t bEvil));
|
---|
3353 | IEM_DECL_IMPL_DEF(void, iemAImpl_vshufps_u256_fallback,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2, uint8_t bEvil));
|
---|
3354 |
|
---|
3355 | IEM_DECL_IMPL_DEF(void, iemAImpl_palignr_u64,(uint64_t *pu64Dst, uint64_t u64Src, uint8_t bEvil));
|
---|
3356 | IEM_DECL_IMPL_DEF(void, iemAImpl_palignr_u64_fallback,(uint64_t *pu64Dst, uint64_t u64Src, uint8_t bEvil));
|
---|
3357 |
|
---|
3358 | IEM_DECL_IMPL_DEF(void, iemAImpl_pinsrw_u64,(uint64_t *pu64Dst, uint16_t u16Src, uint8_t bEvil));
|
---|
3359 | IEM_DECL_IMPL_DEF(void, iemAImpl_pinsrw_u128,(PRTUINT128U puDst, uint16_t u16Src, uint8_t bEvil));
|
---|
3360 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpinsrw_u128,(PRTUINT128U puDst, PCRTUINT128U puSrc, uint16_t u16Src, uint8_t bEvil));
|
---|
3361 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpinsrw_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc, uint16_t u16Src, uint8_t bEvil));
|
---|
3362 |
|
---|
3363 | IEM_DECL_IMPL_DEF(void, iemAImpl_pextrw_u64,(uint16_t *pu16Dst, uint64_t u64Src, uint8_t bEvil));
|
---|
3364 | IEM_DECL_IMPL_DEF(void, iemAImpl_pextrw_u128,(uint16_t *pu16Dst, PCRTUINT128U puSrc, uint8_t bEvil));
|
---|
3365 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpextrw_u128,(uint16_t *pu16Dst, PCRTUINT128U puSrc, uint8_t bEvil));
|
---|
3366 | IEM_DECL_IMPL_DEF(void, iemAImpl_vpextrw_u128_fallback,(uint16_t *pu16Dst, PCRTUINT128U puSrc, uint8_t bEvil));
|
---|
3367 |
|
---|
3368 | IEM_DECL_IMPL_DEF(void, iemAImpl_movmskps_u128,(uint8_t *pu8Dst, PCRTUINT128U puSrc));
|
---|
3369 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovmskps_u128,(uint8_t *pu8Dst, PCRTUINT128U puSrc));
|
---|
3370 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovmskps_u128_fallback,(uint8_t *pu8Dst, PCRTUINT128U puSrc));
|
---|
3371 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovmskps_u256,(uint8_t *pu8Dst, PCRTUINT256U puSrc));
|
---|
3372 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovmskps_u256_fallback,(uint8_t *pu8Dst, PCRTUINT256U puSrc));
|
---|
3373 |
|
---|
3374 | IEM_DECL_IMPL_DEF(void, iemAImpl_movmskpd_u128,(uint8_t *pu8Dst, PCRTUINT128U puSrc));
|
---|
3375 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovmskpd_u128,(uint8_t *pu8Dst, PCRTUINT128U puSrc));
|
---|
3376 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovmskpd_u128_fallback,(uint8_t *pu8Dst, PCRTUINT128U puSrc));
|
---|
3377 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovmskpd_u256,(uint8_t *pu8Dst, PCRTUINT256U puSrc));
|
---|
3378 | IEM_DECL_IMPL_DEF(void, iemAImpl_vmovmskpd_u256_fallback,(uint8_t *pu8Dst, PCRTUINT256U puSrc));
|
---|
3379 |
|
---|
3380 |
|
---|
3381 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAOPTF2U128IMM8,(PRTUINT128U puDst, PCRTUINT128U puSrc, uint8_t bEvil));
|
---|
3382 | typedef FNIEMAIMPLMEDIAOPTF2U128IMM8 *PFNIEMAIMPLMEDIAOPTF2U128IMM8;
|
---|
3383 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAOPTF3U128IMM8,(PRTUINT128U puDst, PCRTUINT128U puSrc1, PCRTUINT128U puSrc2, uint8_t bEvil));
|
---|
3384 | typedef FNIEMAIMPLMEDIAOPTF3U128IMM8 *PFNIEMAIMPLMEDIAOPTF3U128IMM8;
|
---|
3385 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMEDIAOPTF3U256IMM8,(PRTUINT256U puDst, PCRTUINT256U puSrc1, PCRTUINT256U puSrc2, uint8_t bEvil));
|
---|
3386 | typedef FNIEMAIMPLMEDIAOPTF3U256IMM8 *PFNIEMAIMPLMEDIAOPTF3U256IMM8;
|
---|
3387 |
|
---|
3388 | FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_palignr_u128, iemAImpl_palignr_u128_fallback;
|
---|
3389 | FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_pblendw_u128, iemAImpl_pblendw_u128_fallback;
|
---|
3390 | FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_blendps_u128, iemAImpl_blendps_u128_fallback;
|
---|
3391 | FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_blendpd_u128, iemAImpl_blendpd_u128_fallback;
|
---|
3392 |
|
---|
3393 | FNIEMAIMPLMEDIAOPTF3U128IMM8 iemAImpl_vpalignr_u128, iemAImpl_vpalignr_u128_fallback;
|
---|
3394 | FNIEMAIMPLMEDIAOPTF3U128IMM8 iemAImpl_vpblendw_u128, iemAImpl_vpblendw_u128_fallback;
|
---|
3395 | FNIEMAIMPLMEDIAOPTF3U128IMM8 iemAImpl_vblendps_u128, iemAImpl_vblendps_u128_fallback;
|
---|
3396 | FNIEMAIMPLMEDIAOPTF3U128IMM8 iemAImpl_vblendpd_u128, iemAImpl_vblendpd_u128_fallback;
|
---|
3397 |
|
---|
3398 | FNIEMAIMPLMEDIAOPTF3U256IMM8 iemAImpl_vpalignr_u256, iemAImpl_vpalignr_u256_fallback;
|
---|
3399 | FNIEMAIMPLMEDIAOPTF3U256IMM8 iemAImpl_vpblendw_u256, iemAImpl_vpblendw_u256_fallback;
|
---|
3400 | FNIEMAIMPLMEDIAOPTF3U256IMM8 iemAImpl_vblendps_u256, iemAImpl_vblendps_u256_fallback;
|
---|
3401 | FNIEMAIMPLMEDIAOPTF3U256IMM8 iemAImpl_vblendpd_u256, iemAImpl_vblendpd_u256_fallback;
|
---|
3402 | FNIEMAIMPLMEDIAOPTF3U256IMM8 iemAImpl_vperm2i128_u256, iemAImpl_vperm2i128_u256_fallback;
|
---|
3403 | FNIEMAIMPLMEDIAOPTF3U256IMM8 iemAImpl_vperm2f128_u256, iemAImpl_vperm2f128_u256_fallback;
|
---|
3404 |
|
---|
3405 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_aesimc_u128, iemAImpl_aesimc_u128_fallback;
|
---|
3406 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_aesenc_u128, iemAImpl_aesenc_u128_fallback;
|
---|
3407 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_aesenclast_u128, iemAImpl_aesenclast_u128_fallback;
|
---|
3408 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_aesdec_u128, iemAImpl_aesdec_u128_fallback;
|
---|
3409 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_aesdeclast_u128, iemAImpl_aesdeclast_u128_fallback;
|
---|
3410 |
|
---|
3411 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vaesimc_u128, iemAImpl_vaesimc_u128_fallback;
|
---|
3412 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vaesenc_u128, iemAImpl_vaesenc_u128_fallback;
|
---|
3413 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vaesenclast_u128, iemAImpl_vaesenclast_u128_fallback;
|
---|
3414 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vaesdec_u128, iemAImpl_vaesdec_u128_fallback;
|
---|
3415 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_vaesdeclast_u128, iemAImpl_vaesdeclast_u128_fallback;
|
---|
3416 |
|
---|
3417 | FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_aeskeygenassist_u128, iemAImpl_aeskeygenassist_u128_fallback;
|
---|
3418 |
|
---|
3419 | FNIEMAIMPLMEDIAOPTF3U128IMM8 iemAImpl_vaeskeygenassist_u128, iemAImpl_vaeskeygenassist_u128_fallback;
|
---|
3420 |
|
---|
3421 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_sha1nexte_u128, iemAImpl_sha1nexte_u128_fallback;
|
---|
3422 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_sha1msg1_u128, iemAImpl_sha1msg1_u128_fallback;
|
---|
3423 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_sha1msg2_u128, iemAImpl_sha1msg2_u128_fallback;
|
---|
3424 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_sha256msg1_u128, iemAImpl_sha256msg1_u128_fallback;
|
---|
3425 | FNIEMAIMPLMEDIAOPTF2U128 iemAImpl_sha256msg2_u128, iemAImpl_sha256msg2_u128_fallback;
|
---|
3426 | FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_sha1rnds4_u128, iemAImpl_sha1rnds4_u128_fallback;
|
---|
3427 | IEM_DECL_IMPL_DEF(void, iemAImpl_sha256rnds2_u128,(PRTUINT128U puDst, PCRTUINT128U puSrc, PCRTUINT128U puXmm0Constants));
|
---|
3428 | IEM_DECL_IMPL_DEF(void, iemAImpl_sha256rnds2_u128_fallback,(PRTUINT128U puDst, PCRTUINT128U puSrc, PCRTUINT128U puXmm0Constants));
|
---|
3429 |
|
---|
3430 | typedef struct IEMPCMPISTRXSRC
|
---|
3431 | {
|
---|
3432 | RTUINT128U uSrc1;
|
---|
3433 | RTUINT128U uSrc2;
|
---|
3434 | } IEMPCMPISTRXSRC;
|
---|
3435 | typedef IEMPCMPISTRXSRC *PIEMPCMPISTRXSRC;
|
---|
3436 | typedef const IEMPCMPISTRXSRC *PCIEMPCMPISTRXSRC;
|
---|
3437 |
|
---|
3438 | typedef struct IEMPCMPESTRXSRC
|
---|
3439 | {
|
---|
3440 | RTUINT128U uSrc1;
|
---|
3441 | RTUINT128U uSrc2;
|
---|
3442 | uint64_t u64Rax;
|
---|
3443 | uint64_t u64Rdx;
|
---|
3444 | } IEMPCMPESTRXSRC;
|
---|
3445 | typedef IEMPCMPESTRXSRC *PIEMPCMPESTRXSRC;
|
---|
3446 | typedef const IEMPCMPESTRXSRC *PCIEMPCMPESTRXSRC;
|
---|
3447 |
|
---|
3448 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLPCMPISTRIU128IMM8,(uint32_t *pu32Ecx, uint32_t *pEFlags, PCIEMPCMPISTRXSRC pSrc, uint8_t bEvil));
|
---|
3449 | typedef FNIEMAIMPLPCMPISTRIU128IMM8 *PFNIEMAIMPLPCMPISTRIU128IMM8;
|
---|
3450 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLPCMPESTRIU128IMM8,(uint32_t *pu32Ecx, uint32_t *pEFlags, PCIEMPCMPESTRXSRC pSrc, uint8_t bEvil));
|
---|
3451 | typedef FNIEMAIMPLPCMPESTRIU128IMM8 *PFNIEMAIMPLPCMPESTRIU128IMM8;
|
---|
3452 |
|
---|
3453 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLPCMPISTRMU128IMM8,(PRTUINT128U puDst, uint32_t *pEFlags, PCIEMPCMPISTRXSRC pSrc, uint8_t bEvil));
|
---|
3454 | typedef FNIEMAIMPLPCMPISTRMU128IMM8 *PFNIEMAIMPLPCMPISTRMU128IMM8;
|
---|
3455 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLPCMPESTRMU128IMM8,(PRTUINT128U puDst, uint32_t *pEFlags, PCIEMPCMPESTRXSRC pSrc, uint8_t bEvil));
|
---|
3456 | typedef FNIEMAIMPLPCMPESTRMU128IMM8 *PFNIEMAIMPLPCMPESTRMU128IMM8;
|
---|
3457 |
|
---|
3458 | FNIEMAIMPLPCMPISTRIU128IMM8 iemAImpl_pcmpistri_u128, iemAImpl_pcmpistri_u128_fallback;
|
---|
3459 | FNIEMAIMPLPCMPESTRIU128IMM8 iemAImpl_pcmpestri_u128, iemAImpl_pcmpestri_u128_fallback;
|
---|
3460 | FNIEMAIMPLPCMPISTRMU128IMM8 iemAImpl_pcmpistrm_u128, iemAImpl_pcmpistrm_u128_fallback;
|
---|
3461 | FNIEMAIMPLPCMPESTRMU128IMM8 iemAImpl_pcmpestrm_u128, iemAImpl_pcmpestrm_u128_fallback;
|
---|
3462 |
|
---|
3463 | FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_pclmulqdq_u128, iemAImpl_pclmulqdq_u128_fallback;
|
---|
3464 | FNIEMAIMPLMEDIAOPTF3U128IMM8 iemAImpl_vpclmulqdq_u128, iemAImpl_vpclmulqdq_u128_fallback;
|
---|
3465 |
|
---|
3466 | FNIEMAIMPLMEDIAOPTF2U128IMM8 iemAImpl_mpsadbw_u128, iemAImpl_mpsadbw_u128_fallback;
|
---|
3467 | FNIEMAIMPLMEDIAOPTF3U128IMM8 iemAImpl_vmpsadbw_u128, iemAImpl_vmpsadbw_u128_fallback;
|
---|
3468 | FNIEMAIMPLMEDIAOPTF3U256IMM8 iemAImpl_vmpsadbw_u256, iemAImpl_vmpsadbw_u256_fallback;
|
---|
3469 | /** @} */
|
---|
3470 |
|
---|
3471 | /** @name Media Odds and Ends
|
---|
3472 | * @{ */
|
---|
3473 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLCR32U8,(uint32_t *puDst, uint8_t uSrc));
|
---|
3474 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLCR32U16,(uint32_t *puDst, uint16_t uSrc));
|
---|
3475 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLCR32U32,(uint32_t *puDst, uint32_t uSrc));
|
---|
3476 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLCR32U64,(uint32_t *puDst, uint64_t uSrc));
|
---|
3477 | FNIEMAIMPLCR32U8 iemAImpl_crc32_u8, iemAImpl_crc32_u8_fallback;
|
---|
3478 | FNIEMAIMPLCR32U16 iemAImpl_crc32_u16, iemAImpl_crc32_u16_fallback;
|
---|
3479 | FNIEMAIMPLCR32U32 iemAImpl_crc32_u32, iemAImpl_crc32_u32_fallback;
|
---|
3480 | FNIEMAIMPLCR32U64 iemAImpl_crc32_u64, iemAImpl_crc32_u64_fallback;
|
---|
3481 |
|
---|
3482 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLF2EFL128,(PCRTUINT128U puSrc1, PCRTUINT128U puSrc2, uint32_t *pEFlags));
|
---|
3483 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLF2EFL256,(PCRTUINT256U puSrc1, PCRTUINT256U puSrc2, uint32_t *pEFlags));
|
---|
3484 | FNIEMAIMPLF2EFL128 iemAImpl_ptest_u128;
|
---|
3485 | FNIEMAIMPLF2EFL256 iemAImpl_vptest_u256, iemAImpl_vptest_u256_fallback;
|
---|
3486 |
|
---|
3487 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2I32U64,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, int32_t *pi32Dst, const uint64_t *pu64Src)); /* pu64Src is a double precision floating point. */
|
---|
3488 | typedef FNIEMAIMPLSSEF2I32U64 *PFNIEMAIMPLSSEF2I32U64;
|
---|
3489 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2I64U64,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, int64_t *pi64Dst, const uint64_t *pu64Src)); /* pu64Src is a double precision floating point. */
|
---|
3490 | typedef FNIEMAIMPLSSEF2I64U64 *PFNIEMAIMPLSSEF2I64U64;
|
---|
3491 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2I32U32,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, int32_t *pi32Dst, const uint32_t *pu32Src)); /* pu32Src is a single precision floating point. */
|
---|
3492 | typedef FNIEMAIMPLSSEF2I32U32 *PFNIEMAIMPLSSEF2I32U32;
|
---|
3493 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2I64U32,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, int64_t *pi64Dst, const uint32_t *pu32Src)); /* pu32Src is a single precision floating point. */
|
---|
3494 | typedef FNIEMAIMPLSSEF2I64U32 *PFNIEMAIMPLSSEF2I64U32;
|
---|
3495 |
|
---|
3496 | FNIEMAIMPLSSEF2I32U64 iemAImpl_cvttsd2si_i32_r64;
|
---|
3497 | FNIEMAIMPLSSEF2I32U64 iemAImpl_cvtsd2si_i32_r64;
|
---|
3498 |
|
---|
3499 | FNIEMAIMPLSSEF2I64U64 iemAImpl_cvttsd2si_i64_r64;
|
---|
3500 | FNIEMAIMPLSSEF2I64U64 iemAImpl_cvtsd2si_i64_r64;
|
---|
3501 |
|
---|
3502 | FNIEMAIMPLSSEF2I32U32 iemAImpl_cvttss2si_i32_r32;
|
---|
3503 | FNIEMAIMPLSSEF2I32U32 iemAImpl_cvtss2si_i32_r32;
|
---|
3504 |
|
---|
3505 | FNIEMAIMPLSSEF2I64U32 iemAImpl_cvttss2si_i64_r32;
|
---|
3506 | FNIEMAIMPLSSEF2I64U32 iemAImpl_cvtss2si_i64_r32;
|
---|
3507 |
|
---|
3508 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2R32I32,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT32U pr32Dst, const int32_t *pi32Src));
|
---|
3509 | typedef FNIEMAIMPLSSEF2R32I32 *PFNIEMAIMPLSSEF2R32I32;
|
---|
3510 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2R32I64,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT32U pr32Dst, const int64_t *pi64Src));
|
---|
3511 | typedef FNIEMAIMPLSSEF2R32I64 *PFNIEMAIMPLSSEF2R32I64;
|
---|
3512 |
|
---|
3513 | FNIEMAIMPLSSEF2R32I32 iemAImpl_cvtsi2ss_r32_i32;
|
---|
3514 | FNIEMAIMPLSSEF2R32I64 iemAImpl_cvtsi2ss_r32_i64;
|
---|
3515 |
|
---|
3516 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2R64I32,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT64U pr64Dst, const int32_t *pi32Src));
|
---|
3517 | typedef FNIEMAIMPLSSEF2R64I32 *PFNIEMAIMPLSSEF2R64I32;
|
---|
3518 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLSSEF2R64I64,(PCX86FXSTATE pFpuState, uint32_t *pfMxcsr, PRTFLOAT64U pr64Dst, const int64_t *pi64Src));
|
---|
3519 | typedef FNIEMAIMPLSSEF2R64I64 *PFNIEMAIMPLSSEF2R64I64;
|
---|
3520 |
|
---|
3521 | FNIEMAIMPLSSEF2R64I32 iemAImpl_cvtsi2sd_r64_i32;
|
---|
3522 | FNIEMAIMPLSSEF2R64I64 iemAImpl_cvtsi2sd_r64_i64;
|
---|
3523 |
|
---|
3524 |
|
---|
3525 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLF2EFLMXCSR128,(uint32_t *pfMxcsr, uint32_t *pfEFlags, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2));
|
---|
3526 | typedef FNIEMAIMPLF2EFLMXCSR128 *PFNIEMAIMPLF2EFLMXCSR128;
|
---|
3527 |
|
---|
3528 | FNIEMAIMPLF2EFLMXCSR128 iemAImpl_ucomiss_u128;
|
---|
3529 | FNIEMAIMPLF2EFLMXCSR128 iemAImpl_vucomiss_u128, iemAImpl_vucomiss_u128_fallback;
|
---|
3530 |
|
---|
3531 | FNIEMAIMPLF2EFLMXCSR128 iemAImpl_ucomisd_u128;
|
---|
3532 | FNIEMAIMPLF2EFLMXCSR128 iemAImpl_vucomisd_u128, iemAImpl_vucomisd_u128_fallback;
|
---|
3533 |
|
---|
3534 | FNIEMAIMPLF2EFLMXCSR128 iemAImpl_comiss_u128;
|
---|
3535 | FNIEMAIMPLF2EFLMXCSR128 iemAImpl_vcomiss_u128, iemAImpl_vcomiss_u128_fallback;
|
---|
3536 |
|
---|
3537 | FNIEMAIMPLF2EFLMXCSR128 iemAImpl_comisd_u128;
|
---|
3538 | FNIEMAIMPLF2EFLMXCSR128 iemAImpl_vcomisd_u128, iemAImpl_vcomisd_u128_fallback;
|
---|
3539 |
|
---|
3540 |
|
---|
3541 | typedef struct IEMMEDIAF2XMMSRC
|
---|
3542 | {
|
---|
3543 | X86XMMREG uSrc1;
|
---|
3544 | X86XMMREG uSrc2;
|
---|
3545 | } IEMMEDIAF2XMMSRC;
|
---|
3546 | typedef IEMMEDIAF2XMMSRC *PIEMMEDIAF2XMMSRC;
|
---|
3547 | typedef const IEMMEDIAF2XMMSRC *PCIEMMEDIAF2XMMSRC;
|
---|
3548 |
|
---|
3549 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMXCSRF2XMMIMM8,(uint32_t *pfMxcsr, PX86XMMREG puDst, PCIEMMEDIAF2XMMSRC puSrc, uint8_t bEvil));
|
---|
3550 | typedef FNIEMAIMPLMXCSRF2XMMIMM8 *PFNIEMAIMPLMXCSRF2XMMIMM8;
|
---|
3551 |
|
---|
3552 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_cmpps_u128;
|
---|
3553 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_cmppd_u128;
|
---|
3554 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_cmpss_u128;
|
---|
3555 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_cmpsd_u128;
|
---|
3556 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_roundss_u128;
|
---|
3557 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_roundsd_u128;
|
---|
3558 |
|
---|
3559 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_roundps_u128, iemAImpl_roundps_u128_fallback;
|
---|
3560 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_roundpd_u128, iemAImpl_roundpd_u128_fallback;
|
---|
3561 |
|
---|
3562 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_dpps_u128, iemAImpl_dpps_u128_fallback;
|
---|
3563 | FNIEMAIMPLMXCSRF2XMMIMM8 iemAImpl_dppd_u128, iemAImpl_dppd_u128_fallback;
|
---|
3564 |
|
---|
3565 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMXCSRU64U128,(uint32_t *pfMxcsr, uint64_t *pu64Dst, PCX86XMMREG pSrc));
|
---|
3566 | typedef FNIEMAIMPLMXCSRU64U128 *PFNIEMAIMPLMXCSRU64U128;
|
---|
3567 |
|
---|
3568 | FNIEMAIMPLMXCSRU64U128 iemAImpl_cvtpd2pi_u128;
|
---|
3569 | FNIEMAIMPLMXCSRU64U128 iemAImpl_cvttpd2pi_u128;
|
---|
3570 |
|
---|
3571 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMXCSRU128U64,(uint32_t *pfMxcsr, PX86XMMREG pDst, uint64_t u64Src));
|
---|
3572 | typedef FNIEMAIMPLMXCSRU128U64 *PFNIEMAIMPLMXCSRU128U64;
|
---|
3573 |
|
---|
3574 | FNIEMAIMPLMXCSRU128U64 iemAImpl_cvtpi2ps_u128;
|
---|
3575 | FNIEMAIMPLMXCSRU128U64 iemAImpl_cvtpi2pd_u128;
|
---|
3576 |
|
---|
3577 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLMXCSRU64U64,(uint32_t *pfMxcsr, uint64_t *pu64Dst, uint64_t u64Src));
|
---|
3578 | typedef FNIEMAIMPLMXCSRU64U64 *PFNIEMAIMPLMXCSRU64U64;
|
---|
3579 |
|
---|
3580 | FNIEMAIMPLMXCSRU64U64 iemAImpl_cvtps2pi_u128;
|
---|
3581 | FNIEMAIMPLMXCSRU64U64 iemAImpl_cvttps2pi_u128;
|
---|
3582 |
|
---|
3583 | /** @} */
|
---|
3584 |
|
---|
3585 |
|
---|
3586 | /** @name Function tables.
|
---|
3587 | * @{
|
---|
3588 | */
|
---|
3589 |
|
---|
3590 | /**
|
---|
3591 | * Function table for a binary operator providing implementation based on
|
---|
3592 | * operand size.
|
---|
3593 | */
|
---|
3594 | typedef struct IEMOPBINSIZES
|
---|
3595 | {
|
---|
3596 | PFNIEMAIMPLBINU8 pfnNormalU8, pfnLockedU8;
|
---|
3597 | PFNIEMAIMPLBINU16 pfnNormalU16, pfnLockedU16;
|
---|
3598 | PFNIEMAIMPLBINU32 pfnNormalU32, pfnLockedU32;
|
---|
3599 | PFNIEMAIMPLBINU64 pfnNormalU64, pfnLockedU64;
|
---|
3600 | } IEMOPBINSIZES;
|
---|
3601 | /** Pointer to a binary operator function table. */
|
---|
3602 | typedef IEMOPBINSIZES const *PCIEMOPBINSIZES;
|
---|
3603 |
|
---|
3604 |
|
---|
3605 | /**
|
---|
3606 | * Function table for a unary operator providing implementation based on
|
---|
3607 | * operand size.
|
---|
3608 | */
|
---|
3609 | typedef struct IEMOPUNARYSIZES
|
---|
3610 | {
|
---|
3611 | PFNIEMAIMPLUNARYU8 pfnNormalU8, pfnLockedU8;
|
---|
3612 | PFNIEMAIMPLUNARYU16 pfnNormalU16, pfnLockedU16;
|
---|
3613 | PFNIEMAIMPLUNARYU32 pfnNormalU32, pfnLockedU32;
|
---|
3614 | PFNIEMAIMPLUNARYU64 pfnNormalU64, pfnLockedU64;
|
---|
3615 | } IEMOPUNARYSIZES;
|
---|
3616 | /** Pointer to a unary operator function table. */
|
---|
3617 | typedef IEMOPUNARYSIZES const *PCIEMOPUNARYSIZES;
|
---|
3618 |
|
---|
3619 |
|
---|
3620 | /**
|
---|
3621 | * Function table for a shift operator providing implementation based on
|
---|
3622 | * operand size.
|
---|
3623 | */
|
---|
3624 | typedef struct IEMOPSHIFTSIZES
|
---|
3625 | {
|
---|
3626 | PFNIEMAIMPLSHIFTU8 pfnNormalU8;
|
---|
3627 | PFNIEMAIMPLSHIFTU16 pfnNormalU16;
|
---|
3628 | PFNIEMAIMPLSHIFTU32 pfnNormalU32;
|
---|
3629 | PFNIEMAIMPLSHIFTU64 pfnNormalU64;
|
---|
3630 | } IEMOPSHIFTSIZES;
|
---|
3631 | /** Pointer to a shift operator function table. */
|
---|
3632 | typedef IEMOPSHIFTSIZES const *PCIEMOPSHIFTSIZES;
|
---|
3633 |
|
---|
3634 |
|
---|
3635 | /**
|
---|
3636 | * Function table for a multiplication or division operation.
|
---|
3637 | */
|
---|
3638 | typedef struct IEMOPMULDIVSIZES
|
---|
3639 | {
|
---|
3640 | PFNIEMAIMPLMULDIVU8 pfnU8;
|
---|
3641 | PFNIEMAIMPLMULDIVU16 pfnU16;
|
---|
3642 | PFNIEMAIMPLMULDIVU32 pfnU32;
|
---|
3643 | PFNIEMAIMPLMULDIVU64 pfnU64;
|
---|
3644 | } IEMOPMULDIVSIZES;
|
---|
3645 | /** Pointer to a multiplication or division operation function table. */
|
---|
3646 | typedef IEMOPMULDIVSIZES const *PCIEMOPMULDIVSIZES;
|
---|
3647 |
|
---|
3648 |
|
---|
3649 | /**
|
---|
3650 | * Function table for a double precision shift operator providing implementation
|
---|
3651 | * based on operand size.
|
---|
3652 | */
|
---|
3653 | typedef struct IEMOPSHIFTDBLSIZES
|
---|
3654 | {
|
---|
3655 | PFNIEMAIMPLSHIFTDBLU16 pfnNormalU16;
|
---|
3656 | PFNIEMAIMPLSHIFTDBLU32 pfnNormalU32;
|
---|
3657 | PFNIEMAIMPLSHIFTDBLU64 pfnNormalU64;
|
---|
3658 | } IEMOPSHIFTDBLSIZES;
|
---|
3659 | /** Pointer to a double precision shift function table. */
|
---|
3660 | typedef IEMOPSHIFTDBLSIZES const *PCIEMOPSHIFTDBLSIZES;
|
---|
3661 |
|
---|
3662 |
|
---|
3663 | /**
|
---|
3664 | * Function table for media instruction taking two full sized media source
|
---|
3665 | * registers and one full sized destination register (AVX).
|
---|
3666 | */
|
---|
3667 | typedef struct IEMOPMEDIAF3
|
---|
3668 | {
|
---|
3669 | PFNIEMAIMPLMEDIAF3U128 pfnU128;
|
---|
3670 | PFNIEMAIMPLMEDIAF3U256 pfnU256;
|
---|
3671 | } IEMOPMEDIAF3;
|
---|
3672 | /** Pointer to a media operation function table for 3 full sized ops (AVX). */
|
---|
3673 | typedef IEMOPMEDIAF3 const *PCIEMOPMEDIAF3;
|
---|
3674 |
|
---|
3675 | /** @def IEMOPMEDIAF3_INIT_VARS_EX
|
---|
3676 | * Declares a s_Host (x86 & amd64 only) and a s_Fallback variable with the
|
---|
3677 | * given functions as initializers. For use in AVX functions where a pair of
|
---|
3678 | * functions are only used once and the function table need not be public. */
|
---|
3679 | #ifndef TST_IEM_CHECK_MC
|
---|
3680 | # if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && !defined(IEM_WITHOUT_ASSEMBLY)
|
---|
3681 | # define IEMOPMEDIAF3_INIT_VARS_EX(a_pfnHostU128, a_pfnHostU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3682 | static IEMOPMEDIAF3 const s_Host = { a_pfnHostU128, a_pfnHostU256 }; \
|
---|
3683 | static IEMOPMEDIAF3 const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3684 | # else
|
---|
3685 | # define IEMOPMEDIAF3_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3686 | static IEMOPMEDIAF3 const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3687 | # endif
|
---|
3688 | #else
|
---|
3689 | # define IEMOPMEDIAF3_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) (void)0
|
---|
3690 | #endif
|
---|
3691 | /** @def IEMOPMEDIAF3_INIT_VARS
|
---|
3692 | * Generate AVX function tables for the @a a_InstrNm instruction.
|
---|
3693 | * @sa IEMOPMEDIAF3_INIT_VARS_EX */
|
---|
3694 | #define IEMOPMEDIAF3_INIT_VARS(a_InstrNm) \
|
---|
3695 | IEMOPMEDIAF3_INIT_VARS_EX(RT_CONCAT3(iemAImpl_,a_InstrNm,_u128), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256),\
|
---|
3696 | RT_CONCAT3(iemAImpl_,a_InstrNm,_u128_fallback), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256_fallback))
|
---|
3697 |
|
---|
3698 | /**
|
---|
3699 | * Function table for media instruction taking two full sized media source
|
---|
3700 | * registers and one full sized destination register, but no additional state
|
---|
3701 | * (AVX).
|
---|
3702 | */
|
---|
3703 | typedef struct IEMOPMEDIAOPTF3
|
---|
3704 | {
|
---|
3705 | PFNIEMAIMPLMEDIAOPTF3U128 pfnU128;
|
---|
3706 | PFNIEMAIMPLMEDIAOPTF3U256 pfnU256;
|
---|
3707 | } IEMOPMEDIAOPTF3;
|
---|
3708 | /** Pointer to a media operation function table for 3 full sized ops (AVX). */
|
---|
3709 | typedef IEMOPMEDIAOPTF3 const *PCIEMOPMEDIAOPTF3;
|
---|
3710 |
|
---|
3711 | /** @def IEMOPMEDIAOPTF3_INIT_VARS_EX
|
---|
3712 | * Declares a s_Host (x86 & amd64 only) and a s_Fallback variable with the
|
---|
3713 | * given functions as initializers. For use in AVX functions where a pair of
|
---|
3714 | * functions are only used once and the function table need not be public. */
|
---|
3715 | #ifndef TST_IEM_CHECK_MC
|
---|
3716 | # if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && !defined(IEM_WITHOUT_ASSEMBLY)
|
---|
3717 | # define IEMOPMEDIAOPTF3_INIT_VARS_EX(a_pfnHostU128, a_pfnHostU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3718 | static IEMOPMEDIAOPTF3 const s_Host = { a_pfnHostU128, a_pfnHostU256 }; \
|
---|
3719 | static IEMOPMEDIAOPTF3 const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3720 | # else
|
---|
3721 | # define IEMOPMEDIAOPTF3_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3722 | static IEMOPMEDIAOPTF3 const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3723 | # endif
|
---|
3724 | #else
|
---|
3725 | # define IEMOPMEDIAOPTF3_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) (void)0
|
---|
3726 | #endif
|
---|
3727 | /** @def IEMOPMEDIAOPTF3_INIT_VARS
|
---|
3728 | * Generate AVX function tables for the @a a_InstrNm instruction.
|
---|
3729 | * @sa IEMOPMEDIAOPTF3_INIT_VARS_EX */
|
---|
3730 | #define IEMOPMEDIAOPTF3_INIT_VARS(a_InstrNm) \
|
---|
3731 | IEMOPMEDIAOPTF3_INIT_VARS_EX(RT_CONCAT3(iemAImpl_,a_InstrNm,_u128), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256),\
|
---|
3732 | RT_CONCAT3(iemAImpl_,a_InstrNm,_u128_fallback), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256_fallback))
|
---|
3733 |
|
---|
3734 | /**
|
---|
3735 | * Function table for media instruction taking one full sized media source
|
---|
3736 | * registers and one full sized destination register, but no additional state
|
---|
3737 | * (AVX).
|
---|
3738 | */
|
---|
3739 | typedef struct IEMOPMEDIAOPTF2
|
---|
3740 | {
|
---|
3741 | PFNIEMAIMPLMEDIAOPTF2U128 pfnU128;
|
---|
3742 | PFNIEMAIMPLMEDIAOPTF2U256 pfnU256;
|
---|
3743 | } IEMOPMEDIAOPTF2;
|
---|
3744 | /** Pointer to a media operation function table for 2 full sized ops (AVX). */
|
---|
3745 | typedef IEMOPMEDIAOPTF2 const *PCIEMOPMEDIAOPTF2;
|
---|
3746 |
|
---|
3747 | /** @def IEMOPMEDIAOPTF2_INIT_VARS_EX
|
---|
3748 | * Declares a s_Host (x86 & amd64 only) and a s_Fallback variable with the
|
---|
3749 | * given functions as initializers. For use in AVX functions where a pair of
|
---|
3750 | * functions are only used once and the function table need not be public. */
|
---|
3751 | #ifndef TST_IEM_CHECK_MC
|
---|
3752 | # if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && !defined(IEM_WITHOUT_ASSEMBLY)
|
---|
3753 | # define IEMOPMEDIAOPTF2_INIT_VARS_EX(a_pfnHostU128, a_pfnHostU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3754 | static IEMOPMEDIAOPTF2 const s_Host = { a_pfnHostU128, a_pfnHostU256 }; \
|
---|
3755 | static IEMOPMEDIAOPTF2 const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3756 | # else
|
---|
3757 | # define IEMOPMEDIAOPTF2_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3758 | static IEMOPMEDIAOPTF2 const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3759 | # endif
|
---|
3760 | #else
|
---|
3761 | # define IEMOPMEDIAOPTF2_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) (void)0
|
---|
3762 | #endif
|
---|
3763 | /** @def IEMOPMEDIAOPTF2_INIT_VARS
|
---|
3764 | * Generate AVX function tables for the @a a_InstrNm instruction.
|
---|
3765 | * @sa IEMOPMEDIAOPTF2_INIT_VARS_EX */
|
---|
3766 | #define IEMOPMEDIAOPTF2_INIT_VARS(a_InstrNm) \
|
---|
3767 | IEMOPMEDIAOPTF2_INIT_VARS_EX(RT_CONCAT3(iemAImpl_,a_InstrNm,_u128), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256),\
|
---|
3768 | RT_CONCAT3(iemAImpl_,a_InstrNm,_u128_fallback), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256_fallback))
|
---|
3769 |
|
---|
3770 | /**
|
---|
3771 | * Function table for media instruction taking two full sized media source
|
---|
3772 | * registers and one full sized destination register and an 8-bit immediate, but no additional state
|
---|
3773 | * (AVX).
|
---|
3774 | */
|
---|
3775 | typedef struct IEMOPMEDIAOPTF3IMM8
|
---|
3776 | {
|
---|
3777 | PFNIEMAIMPLMEDIAOPTF3U128IMM8 pfnU128;
|
---|
3778 | PFNIEMAIMPLMEDIAOPTF3U256IMM8 pfnU256;
|
---|
3779 | } IEMOPMEDIAOPTF3IMM8;
|
---|
3780 | /** Pointer to a media operation function table for 3 full sized ops (AVX). */
|
---|
3781 | typedef IEMOPMEDIAOPTF3IMM8 const *PCIEMOPMEDIAOPTF3IMM8;
|
---|
3782 |
|
---|
3783 | /** @def IEMOPMEDIAOPTF3IMM8_INIT_VARS_EX
|
---|
3784 | * Declares a s_Host (x86 & amd64 only) and a s_Fallback variable with the
|
---|
3785 | * given functions as initializers. For use in AVX functions where a pair of
|
---|
3786 | * functions are only used once and the function table need not be public. */
|
---|
3787 | #ifndef TST_IEM_CHECK_MC
|
---|
3788 | # if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && !defined(IEM_WITHOUT_ASSEMBLY)
|
---|
3789 | # define IEMOPMEDIAOPTF3IMM8_INIT_VARS_EX(a_pfnHostU128, a_pfnHostU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3790 | static IEMOPMEDIAOPTF3IMM8 const s_Host = { a_pfnHostU128, a_pfnHostU256 }; \
|
---|
3791 | static IEMOPMEDIAOPTF3IMM8 const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3792 | # else
|
---|
3793 | # define IEMOPMEDIAOPTF3IMM8_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3794 | static IEMOPMEDIAOPTF3IMM8 const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3795 | # endif
|
---|
3796 | #else
|
---|
3797 | # define IEMOPMEDIAOPTF3IMM8_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) (void)0
|
---|
3798 | #endif
|
---|
3799 | /** @def IEMOPMEDIAOPTF3IMM8_INIT_VARS
|
---|
3800 | * Generate AVX function tables for the @a a_InstrNm instruction.
|
---|
3801 | * @sa IEMOPMEDIAOPTF3IMM8_INIT_VARS_EX */
|
---|
3802 | #define IEMOPMEDIAOPTF3IMM8_INIT_VARS(a_InstrNm) \
|
---|
3803 | IEMOPMEDIAOPTF3IMM8_INIT_VARS_EX(RT_CONCAT3(iemAImpl_,a_InstrNm,_u128), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256),\
|
---|
3804 | RT_CONCAT3(iemAImpl_,a_InstrNm,_u128_fallback), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256_fallback))
|
---|
3805 | /** @} */
|
---|
3806 |
|
---|
3807 |
|
---|
3808 | /**
|
---|
3809 | * Function table for blend type instruction taking three full sized media source
|
---|
3810 | * registers and one full sized destination register, but no additional state
|
---|
3811 | * (AVX).
|
---|
3812 | */
|
---|
3813 | typedef struct IEMOPBLENDOP
|
---|
3814 | {
|
---|
3815 | PFNIEMAIMPLAVXBLENDU128 pfnU128;
|
---|
3816 | PFNIEMAIMPLAVXBLENDU256 pfnU256;
|
---|
3817 | } IEMOPBLENDOP;
|
---|
3818 | /** Pointer to a media operation function table for 4 full sized ops (AVX). */
|
---|
3819 | typedef IEMOPBLENDOP const *PCIEMOPBLENDOP;
|
---|
3820 |
|
---|
3821 | /** @def IEMOPBLENDOP_INIT_VARS_EX
|
---|
3822 | * Declares a s_Host (x86 & amd64 only) and a s_Fallback variable with the
|
---|
3823 | * given functions as initializers. For use in AVX functions where a pair of
|
---|
3824 | * functions are only used once and the function table need not be public. */
|
---|
3825 | #ifndef TST_IEM_CHECK_MC
|
---|
3826 | # if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && !defined(IEM_WITHOUT_ASSEMBLY)
|
---|
3827 | # define IEMOPBLENDOP_INIT_VARS_EX(a_pfnHostU128, a_pfnHostU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3828 | static IEMOPBLENDOP const s_Host = { a_pfnHostU128, a_pfnHostU256 }; \
|
---|
3829 | static IEMOPBLENDOP const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3830 | # else
|
---|
3831 | # define IEMOPBLENDOP_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) \
|
---|
3832 | static IEMOPBLENDOP const s_Fallback = { a_pfnFallbackU128, a_pfnFallbackU256 }
|
---|
3833 | # endif
|
---|
3834 | #else
|
---|
3835 | # define IEMOPBLENDOP_INIT_VARS_EX(a_pfnU128, a_pfnU256, a_pfnFallbackU128, a_pfnFallbackU256) (void)0
|
---|
3836 | #endif
|
---|
3837 | /** @def IEMOPBLENDOP_INIT_VARS
|
---|
3838 | * Generate AVX function tables for the @a a_InstrNm instruction.
|
---|
3839 | * @sa IEMOPBLENDOP_INIT_VARS_EX */
|
---|
3840 | #define IEMOPBLENDOP_INIT_VARS(a_InstrNm) \
|
---|
3841 | IEMOPBLENDOP_INIT_VARS_EX(RT_CONCAT3(iemAImpl_,a_InstrNm,_u128), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256),\
|
---|
3842 | RT_CONCAT3(iemAImpl_,a_InstrNm,_u128_fallback), RT_CONCAT3(iemAImpl_,a_InstrNm,_u256_fallback))
|
---|
3843 |
|
---|
3844 |
|
---|
3845 | /** @name SSE/AVX single/double precision floating point operations.
|
---|
3846 | * @{ */
|
---|
3847 | /**
|
---|
3848 | * A SSE result.
|
---|
3849 | */
|
---|
3850 | typedef struct IEMSSERESULT
|
---|
3851 | {
|
---|
3852 | /** The output value. */
|
---|
3853 | X86XMMREG uResult;
|
---|
3854 | /** The output status. */
|
---|
3855 | uint32_t MXCSR;
|
---|
3856 | } IEMSSERESULT;
|
---|
3857 | AssertCompileMemberOffset(IEMSSERESULT, MXCSR, 128 / 8);
|
---|
3858 | /** Pointer to a SSE result. */
|
---|
3859 | typedef IEMSSERESULT *PIEMSSERESULT;
|
---|
3860 | /** Pointer to a const SSE result. */
|
---|
3861 | typedef IEMSSERESULT const *PCIEMSSERESULT;
|
---|
3862 |
|
---|
3863 |
|
---|
3864 | /**
|
---|
3865 | * A AVX128 result.
|
---|
3866 | */
|
---|
3867 | typedef struct IEMAVX128RESULT
|
---|
3868 | {
|
---|
3869 | /** The output value. */
|
---|
3870 | X86XMMREG uResult;
|
---|
3871 | /** The output status. */
|
---|
3872 | uint32_t MXCSR;
|
---|
3873 | } IEMAVX128RESULT;
|
---|
3874 | AssertCompileMemberOffset(IEMAVX128RESULT, MXCSR, 128 / 8);
|
---|
3875 | /** Pointer to a AVX128 result. */
|
---|
3876 | typedef IEMAVX128RESULT *PIEMAVX128RESULT;
|
---|
3877 | /** Pointer to a const AVX128 result. */
|
---|
3878 | typedef IEMAVX128RESULT const *PCIEMAVX128RESULT;
|
---|
3879 |
|
---|
3880 |
|
---|
3881 | /**
|
---|
3882 | * A AVX256 result.
|
---|
3883 | */
|
---|
3884 | typedef struct IEMAVX256RESULT
|
---|
3885 | {
|
---|
3886 | /** The output value. */
|
---|
3887 | X86YMMREG uResult;
|
---|
3888 | /** The output status. */
|
---|
3889 | uint32_t MXCSR;
|
---|
3890 | } IEMAVX256RESULT;
|
---|
3891 | AssertCompileMemberOffset(IEMAVX256RESULT, MXCSR, 256 / 8);
|
---|
3892 | /** Pointer to a AVX256 result. */
|
---|
3893 | typedef IEMAVX256RESULT *PIEMAVX256RESULT;
|
---|
3894 | /** Pointer to a const AVX256 result. */
|
---|
3895 | typedef IEMAVX256RESULT const *PCIEMAVX256RESULT;
|
---|
3896 |
|
---|
3897 |
|
---|
3898 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPSSEF2U128,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2));
|
---|
3899 | typedef FNIEMAIMPLFPSSEF2U128 *PFNIEMAIMPLFPSSEF2U128;
|
---|
3900 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPSSEF2U128R32,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCRTFLOAT32U pr32Src2));
|
---|
3901 | typedef FNIEMAIMPLFPSSEF2U128R32 *PFNIEMAIMPLFPSSEF2U128R32;
|
---|
3902 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPSSEF2U128R64,(PX86FXSTATE pFpuState, PIEMSSERESULT pResult, PCX86XMMREG puSrc1, PCRTFLOAT64U pr64Src2));
|
---|
3903 | typedef FNIEMAIMPLFPSSEF2U128R64 *PFNIEMAIMPLFPSSEF2U128R64;
|
---|
3904 |
|
---|
3905 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPAVXF3U128,(PX86XSAVEAREA pExtState, PIEMAVX128RESULT pResult, PCX86XMMREG puSrc1, PCX86XMMREG puSrc2));
|
---|
3906 | typedef FNIEMAIMPLFPAVXF3U128 *PFNIEMAIMPLFPAVXF3U128;
|
---|
3907 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPAVXF3U128R32,(PX86XSAVEAREA pExtState, PIEMAVX128RESULT pResult, PCX86XMMREG puSrc1, PCRTFLOAT32U pr32Src2));
|
---|
3908 | typedef FNIEMAIMPLFPAVXF3U128R32 *PFNIEMAIMPLFPAVXF3U128R32;
|
---|
3909 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPAVXF3U128R64,(PX86XSAVEAREA pExtState, PIEMAVX128RESULT pResult, PCX86XMMREG puSrc1, PCRTFLOAT64U pr64Src2));
|
---|
3910 | typedef FNIEMAIMPLFPAVXF3U128R64 *PFNIEMAIMPLFPAVXF3U128R64;
|
---|
3911 |
|
---|
3912 | typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLFPAVXF3U256,(PX86XSAVEAREA pExtState, PIEMAVX256RESULT pResult, PCX86YMMREG puSrc1, PCX86YMMREG puSrc2));
|
---|
3913 | typedef FNIEMAIMPLFPAVXF3U256 *PFNIEMAIMPLFPAVXF3U256;
|
---|
3914 |
|
---|
3915 | FNIEMAIMPLFPSSEF2U128 iemAImpl_addps_u128;
|
---|
3916 | FNIEMAIMPLFPSSEF2U128 iemAImpl_addpd_u128;
|
---|
3917 | FNIEMAIMPLFPSSEF2U128 iemAImpl_mulps_u128;
|
---|
3918 | FNIEMAIMPLFPSSEF2U128 iemAImpl_mulpd_u128;
|
---|
3919 | FNIEMAIMPLFPSSEF2U128 iemAImpl_subps_u128;
|
---|
3920 | FNIEMAIMPLFPSSEF2U128 iemAImpl_subpd_u128;
|
---|
3921 | FNIEMAIMPLFPSSEF2U128 iemAImpl_minps_u128;
|
---|
3922 | FNIEMAIMPLFPSSEF2U128 iemAImpl_minpd_u128;
|
---|
3923 | FNIEMAIMPLFPSSEF2U128 iemAImpl_divps_u128;
|
---|
3924 | FNIEMAIMPLFPSSEF2U128 iemAImpl_divpd_u128;
|
---|
3925 | FNIEMAIMPLFPSSEF2U128 iemAImpl_maxps_u128;
|
---|
3926 | FNIEMAIMPLFPSSEF2U128 iemAImpl_maxpd_u128;
|
---|
3927 | FNIEMAIMPLFPSSEF2U128 iemAImpl_haddps_u128;
|
---|
3928 | FNIEMAIMPLFPSSEF2U128 iemAImpl_haddpd_u128;
|
---|
3929 | FNIEMAIMPLFPSSEF2U128 iemAImpl_hsubps_u128;
|
---|
3930 | FNIEMAIMPLFPSSEF2U128 iemAImpl_hsubpd_u128;
|
---|
3931 | FNIEMAIMPLFPSSEF2U128 iemAImpl_sqrtps_u128;
|
---|
3932 | FNIEMAIMPLFPSSEF2U128 iemAImpl_rsqrtps_u128;
|
---|
3933 | FNIEMAIMPLFPSSEF2U128 iemAImpl_sqrtpd_u128;
|
---|
3934 | FNIEMAIMPLFPSSEF2U128 iemAImpl_addsubps_u128;
|
---|
3935 | FNIEMAIMPLFPSSEF2U128 iemAImpl_addsubpd_u128;
|
---|
3936 | FNIEMAIMPLFPSSEF2U128 iemAImpl_cvtpd2ps_u128;
|
---|
3937 | FNIEMAIMPLFPSSEF2U128 iemAImpl_cvtps2pd_u128;
|
---|
3938 |
|
---|
3939 | FNIEMAIMPLFPSSEF2U128 iemAImpl_cvtdq2ps_u128;
|
---|
3940 | FNIEMAIMPLFPSSEF2U128 iemAImpl_cvtps2dq_u128;
|
---|
3941 | FNIEMAIMPLFPSSEF2U128 iemAImpl_cvttps2dq_u128;
|
---|
3942 | FNIEMAIMPLFPSSEF2U128 iemAImpl_cvttpd2dq_u128;
|
---|
3943 | FNIEMAIMPLFPSSEF2U128 iemAImpl_cvtdq2pd_u128;
|
---|
3944 | FNIEMAIMPLFPSSEF2U128 iemAImpl_cvtpd2dq_u128;
|
---|
3945 |
|
---|
3946 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_addss_u128_r32;
|
---|
3947 | FNIEMAIMPLFPSSEF2U128R64 iemAImpl_addsd_u128_r64;
|
---|
3948 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_mulss_u128_r32;
|
---|
3949 | FNIEMAIMPLFPSSEF2U128R64 iemAImpl_mulsd_u128_r64;
|
---|
3950 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_subss_u128_r32;
|
---|
3951 | FNIEMAIMPLFPSSEF2U128R64 iemAImpl_subsd_u128_r64;
|
---|
3952 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_minss_u128_r32;
|
---|
3953 | FNIEMAIMPLFPSSEF2U128R64 iemAImpl_minsd_u128_r64;
|
---|
3954 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_divss_u128_r32;
|
---|
3955 | FNIEMAIMPLFPSSEF2U128R64 iemAImpl_divsd_u128_r64;
|
---|
3956 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_maxss_u128_r32;
|
---|
3957 | FNIEMAIMPLFPSSEF2U128R64 iemAImpl_maxsd_u128_r64;
|
---|
3958 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_cvtss2sd_u128_r32;
|
---|
3959 | FNIEMAIMPLFPSSEF2U128R64 iemAImpl_cvtsd2ss_u128_r64;
|
---|
3960 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_sqrtss_u128_r32;
|
---|
3961 | FNIEMAIMPLFPSSEF2U128R64 iemAImpl_sqrtsd_u128_r64;
|
---|
3962 | FNIEMAIMPLFPSSEF2U128R32 iemAImpl_rsqrtss_u128_r32;
|
---|
3963 |
|
---|
3964 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vaddps_u128, iemAImpl_vaddps_u128_fallback;
|
---|
3965 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vaddpd_u128, iemAImpl_vaddpd_u128_fallback;
|
---|
3966 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vmulps_u128, iemAImpl_vmulps_u128_fallback;
|
---|
3967 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vmulpd_u128, iemAImpl_vmulpd_u128_fallback;
|
---|
3968 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vsubps_u128, iemAImpl_vsubps_u128_fallback;
|
---|
3969 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vsubpd_u128, iemAImpl_vsubpd_u128_fallback;
|
---|
3970 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vminps_u128, iemAImpl_vminps_u128_fallback;
|
---|
3971 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vminpd_u128, iemAImpl_vminpd_u128_fallback;
|
---|
3972 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vdivps_u128, iemAImpl_vdivps_u128_fallback;
|
---|
3973 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vdivpd_u128, iemAImpl_vdivpd_u128_fallback;
|
---|
3974 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vmaxps_u128, iemAImpl_vmaxps_u128_fallback;
|
---|
3975 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vmaxpd_u128, iemAImpl_vmaxpd_u128_fallback;
|
---|
3976 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vhaddps_u128, iemAImpl_vhaddps_u128_fallback;
|
---|
3977 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vhaddpd_u128, iemAImpl_vhaddpd_u128_fallback;
|
---|
3978 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vhsubps_u128, iemAImpl_vhsubps_u128_fallback;
|
---|
3979 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vhsubpd_u128, iemAImpl_vhsubpd_u128_fallback;
|
---|
3980 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vsqrtps_u128, iemAImpl_vsqrtps_u128_fallback;
|
---|
3981 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vsqrtpd_u128, iemAImpl_vsqrtpd_u128_fallback;
|
---|
3982 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vaddsubps_u128, iemAImpl_vaddsubps_u128_fallback;
|
---|
3983 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vaddsubpd_u128, iemAImpl_vaddsubpd_u128_fallback;
|
---|
3984 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vcvtpd2ps_u128, iemAImpl_vcvtpd2ps_u128_fallback;
|
---|
3985 | FNIEMAIMPLFPAVXF3U128 iemAImpl_vcvtps2pd_u128, iemAImpl_vcvtps2pd_u128_fallback;
|
---|
3986 |
|
---|
3987 | FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vaddss_u128_r32, iemAImpl_vaddss_u128_r32_fallback;
|
---|
3988 | FNIEMAIMPLFPAVXF3U128R64 iemAImpl_vaddsd_u128_r64, iemAImpl_vaddsd_u128_r64_fallback;
|
---|
3989 | FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vmulss_u128_r32, iemAImpl_vmulss_u128_r32_fallback;
|
---|
3990 | FNIEMAIMPLFPAVXF3U128R64 iemAImpl_vmulsd_u128_r64, iemAImpl_vmulsd_u128_r64_fallback;
|
---|
3991 | FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vsubss_u128_r32, iemAImpl_vsubss_u128_r32_fallback;
|
---|
3992 | FNIEMAIMPLFPAVXF3U128R64 iemAImpl_vsubsd_u128_r64, iemAImpl_vsubsd_u128_r64_fallback;
|
---|
3993 | FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vminss_u128_r32, iemAImpl_vminss_u128_r32_fallback;
|
---|
3994 | FNIEMAIMPLFPAVXF3U128R64 iemAImpl_vminsd_u128_r64, iemAImpl_vminsd_u128_r64_fallback;
|
---|
3995 | FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vdivss_u128_r32, iemAImpl_vdivss_u128_r32_fallback;
|
---|
3996 | FNIEMAIMPLFPAVXF3U128R64 iemAImpl_vdivsd_u128_r64, iemAImpl_vdivsd_u128_r64_fallback;
|
---|
3997 | FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vmaxss_u128_r32, iemAImpl_vmaxss_u128_r32_fallback;
|
---|
3998 | FNIEMAIMPLFPAVXF3U128R64 iemAImpl_vmaxsd_u128_r64, iemAImpl_vmaxsd_u128_r64_fallback;
|
---|
3999 | FNIEMAIMPLFPAVXF3U128R32 iemAImpl_vsqrtss_u128_r32, iemAImpl_vsqrtss_u128_r32_fallback;
|
---|
4000 | FNIEMAIMPLFPAVXF3U128R64 iemAImpl_vsqrtsd_u128_r64, iemAImpl_vsqrtsd_u128_r64_fallback;
|
---|
4001 |
|
---|
4002 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vaddps_u256, iemAImpl_vaddps_u256_fallback;
|
---|
4003 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vaddpd_u256, iemAImpl_vaddpd_u256_fallback;
|
---|
4004 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vmulps_u256, iemAImpl_vmulps_u256_fallback;
|
---|
4005 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vmulpd_u256, iemAImpl_vmulpd_u256_fallback;
|
---|
4006 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vsubps_u256, iemAImpl_vsubps_u256_fallback;
|
---|
4007 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vsubpd_u256, iemAImpl_vsubpd_u256_fallback;
|
---|
4008 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vminps_u256, iemAImpl_vminps_u256_fallback;
|
---|
4009 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vminpd_u256, iemAImpl_vminpd_u256_fallback;
|
---|
4010 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vdivps_u256, iemAImpl_vdivps_u256_fallback;
|
---|
4011 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vdivpd_u256, iemAImpl_vdivpd_u256_fallback;
|
---|
4012 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vmaxps_u256, iemAImpl_vmaxps_u256_fallback;
|
---|
4013 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vmaxpd_u256, iemAImpl_vmaxpd_u256_fallback;
|
---|
4014 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vhaddps_u256, iemAImpl_vhaddps_u256_fallback;
|
---|
4015 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vhaddpd_u256, iemAImpl_vhaddpd_u256_fallback;
|
---|
4016 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vhsubps_u256, iemAImpl_vhsubps_u256_fallback;
|
---|
4017 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vhsubpd_u256, iemAImpl_vhsubpd_u256_fallback;
|
---|
4018 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vhaddsubps_u256, iemAImpl_vhaddsubps_u256_fallback;
|
---|
4019 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vhaddsubpd_u256, iemAImpl_vhaddsubpd_u256_fallback;
|
---|
4020 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vcvtpd2ps_u256, iemAImpl_vcvtpd2ps_u256_fallback;
|
---|
4021 | FNIEMAIMPLFPAVXF3U256 iemAImpl_vcvtps2pd_u256, iemAImpl_vcvtps2pd_u256_fallback;
|
---|
4022 | /** @} */
|
---|
4023 |
|
---|
4024 | /** @name C instruction implementations for anything slightly complicated.
|
---|
4025 | * @{ */
|
---|
4026 |
|
---|
4027 | /**
|
---|
4028 | * For typedef'ing or declaring a C instruction implementation function taking
|
---|
4029 | * no extra arguments.
|
---|
4030 | *
|
---|
4031 | * @param a_Name The name of the type.
|
---|
4032 | */
|
---|
4033 | # define IEM_CIMPL_DECL_TYPE_0(a_Name) \
|
---|
4034 | IEM_DECL_IMPL_TYPE(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr))
|
---|
4035 | /**
|
---|
4036 | * For defining a C instruction implementation function taking no extra
|
---|
4037 | * arguments.
|
---|
4038 | *
|
---|
4039 | * @param a_Name The name of the function
|
---|
4040 | */
|
---|
4041 | # define IEM_CIMPL_DEF_0(a_Name) \
|
---|
4042 | IEM_DECL_IMPL_DEF(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr))
|
---|
4043 | /**
|
---|
4044 | * Prototype version of IEM_CIMPL_DEF_0.
|
---|
4045 | */
|
---|
4046 | # define IEM_CIMPL_PROTO_0(a_Name) \
|
---|
4047 | IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr))
|
---|
4048 | /**
|
---|
4049 | * For calling a C instruction implementation function taking no extra
|
---|
4050 | * arguments.
|
---|
4051 | *
|
---|
4052 | * This special call macro adds default arguments to the call and allow us to
|
---|
4053 | * change these later.
|
---|
4054 | *
|
---|
4055 | * @param a_fn The name of the function.
|
---|
4056 | */
|
---|
4057 | # define IEM_CIMPL_CALL_0(a_fn) a_fn(pVCpu, cbInstr)
|
---|
4058 |
|
---|
4059 | /** Type for a C instruction implementation function taking no extra
|
---|
4060 | * arguments. */
|
---|
4061 | typedef IEM_CIMPL_DECL_TYPE_0(FNIEMCIMPL0);
|
---|
4062 | /** Function pointer type for a C instruction implementation function taking
|
---|
4063 | * no extra arguments. */
|
---|
4064 | typedef FNIEMCIMPL0 *PFNIEMCIMPL0;
|
---|
4065 |
|
---|
4066 | /**
|
---|
4067 | * For typedef'ing or declaring a C instruction implementation function taking
|
---|
4068 | * one extra argument.
|
---|
4069 | *
|
---|
4070 | * @param a_Name The name of the type.
|
---|
4071 | * @param a_Type0 The argument type.
|
---|
4072 | * @param a_Arg0 The argument name.
|
---|
4073 | */
|
---|
4074 | # define IEM_CIMPL_DECL_TYPE_1(a_Name, a_Type0, a_Arg0) \
|
---|
4075 | IEM_DECL_IMPL_TYPE(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0))
|
---|
4076 | /**
|
---|
4077 | * For defining a C instruction implementation function taking one extra
|
---|
4078 | * argument.
|
---|
4079 | *
|
---|
4080 | * @param a_Name The name of the function
|
---|
4081 | * @param a_Type0 The argument type.
|
---|
4082 | * @param a_Arg0 The argument name.
|
---|
4083 | */
|
---|
4084 | # define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Arg0) \
|
---|
4085 | IEM_DECL_IMPL_DEF(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0))
|
---|
4086 | /**
|
---|
4087 | * Prototype version of IEM_CIMPL_DEF_1.
|
---|
4088 | */
|
---|
4089 | # define IEM_CIMPL_PROTO_1(a_Name, a_Type0, a_Arg0) \
|
---|
4090 | IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0))
|
---|
4091 | /**
|
---|
4092 | * For calling a C instruction implementation function taking one extra
|
---|
4093 | * argument.
|
---|
4094 | *
|
---|
4095 | * This special call macro adds default arguments to the call and allow us to
|
---|
4096 | * change these later.
|
---|
4097 | *
|
---|
4098 | * @param a_fn The name of the function.
|
---|
4099 | * @param a0 The name of the 1st argument.
|
---|
4100 | */
|
---|
4101 | # define IEM_CIMPL_CALL_1(a_fn, a0) a_fn(pVCpu, cbInstr, (a0))
|
---|
4102 |
|
---|
4103 | /**
|
---|
4104 | * For typedef'ing or declaring a C instruction implementation function taking
|
---|
4105 | * two extra arguments.
|
---|
4106 | *
|
---|
4107 | * @param a_Name The name of the type.
|
---|
4108 | * @param a_Type0 The type of the 1st argument
|
---|
4109 | * @param a_Arg0 The name of the 1st argument.
|
---|
4110 | * @param a_Type1 The type of the 2nd argument.
|
---|
4111 | * @param a_Arg1 The name of the 2nd argument.
|
---|
4112 | */
|
---|
4113 | # define IEM_CIMPL_DECL_TYPE_2(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1) \
|
---|
4114 | IEM_DECL_IMPL_TYPE(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1))
|
---|
4115 | /**
|
---|
4116 | * For defining a C instruction implementation function taking two extra
|
---|
4117 | * arguments.
|
---|
4118 | *
|
---|
4119 | * @param a_Name The name of the function.
|
---|
4120 | * @param a_Type0 The type of the 1st argument
|
---|
4121 | * @param a_Arg0 The name of the 1st argument.
|
---|
4122 | * @param a_Type1 The type of the 2nd argument.
|
---|
4123 | * @param a_Arg1 The name of the 2nd argument.
|
---|
4124 | */
|
---|
4125 | # define IEM_CIMPL_DEF_2(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1) \
|
---|
4126 | IEM_DECL_IMPL_DEF(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1))
|
---|
4127 | /**
|
---|
4128 | * Prototype version of IEM_CIMPL_DEF_2.
|
---|
4129 | */
|
---|
4130 | # define IEM_CIMPL_PROTO_2(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1) \
|
---|
4131 | IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1))
|
---|
4132 | /**
|
---|
4133 | * For calling a C instruction implementation function taking two extra
|
---|
4134 | * arguments.
|
---|
4135 | *
|
---|
4136 | * This special call macro adds default arguments to the call and allow us to
|
---|
4137 | * change these later.
|
---|
4138 | *
|
---|
4139 | * @param a_fn The name of the function.
|
---|
4140 | * @param a0 The name of the 1st argument.
|
---|
4141 | * @param a1 The name of the 2nd argument.
|
---|
4142 | */
|
---|
4143 | # define IEM_CIMPL_CALL_2(a_fn, a0, a1) a_fn(pVCpu, cbInstr, (a0), (a1))
|
---|
4144 |
|
---|
4145 | /**
|
---|
4146 | * For typedef'ing or declaring a C instruction implementation function taking
|
---|
4147 | * three extra arguments.
|
---|
4148 | *
|
---|
4149 | * @param a_Name The name of the type.
|
---|
4150 | * @param a_Type0 The type of the 1st argument
|
---|
4151 | * @param a_Arg0 The name of the 1st argument.
|
---|
4152 | * @param a_Type1 The type of the 2nd argument.
|
---|
4153 | * @param a_Arg1 The name of the 2nd argument.
|
---|
4154 | * @param a_Type2 The type of the 3rd argument.
|
---|
4155 | * @param a_Arg2 The name of the 3rd argument.
|
---|
4156 | */
|
---|
4157 | # define IEM_CIMPL_DECL_TYPE_3(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2) \
|
---|
4158 | IEM_DECL_IMPL_TYPE(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1, a_Type2 a_Arg2))
|
---|
4159 | /**
|
---|
4160 | * For defining a C instruction implementation function taking three extra
|
---|
4161 | * arguments.
|
---|
4162 | *
|
---|
4163 | * @param a_Name The name of the function.
|
---|
4164 | * @param a_Type0 The type of the 1st argument
|
---|
4165 | * @param a_Arg0 The name of the 1st argument.
|
---|
4166 | * @param a_Type1 The type of the 2nd argument.
|
---|
4167 | * @param a_Arg1 The name of the 2nd argument.
|
---|
4168 | * @param a_Type2 The type of the 3rd argument.
|
---|
4169 | * @param a_Arg2 The name of the 3rd argument.
|
---|
4170 | */
|
---|
4171 | # define IEM_CIMPL_DEF_3(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2) \
|
---|
4172 | IEM_DECL_IMPL_DEF(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1, a_Type2 a_Arg2))
|
---|
4173 | /**
|
---|
4174 | * Prototype version of IEM_CIMPL_DEF_3.
|
---|
4175 | */
|
---|
4176 | # define IEM_CIMPL_PROTO_3(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2) \
|
---|
4177 | IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1, a_Type2 a_Arg2))
|
---|
4178 | /**
|
---|
4179 | * For calling a C instruction implementation function taking three extra
|
---|
4180 | * arguments.
|
---|
4181 | *
|
---|
4182 | * This special call macro adds default arguments to the call and allow us to
|
---|
4183 | * change these later.
|
---|
4184 | *
|
---|
4185 | * @param a_fn The name of the function.
|
---|
4186 | * @param a0 The name of the 1st argument.
|
---|
4187 | * @param a1 The name of the 2nd argument.
|
---|
4188 | * @param a2 The name of the 3rd argument.
|
---|
4189 | */
|
---|
4190 | # define IEM_CIMPL_CALL_3(a_fn, a0, a1, a2) a_fn(pVCpu, cbInstr, (a0), (a1), (a2))
|
---|
4191 |
|
---|
4192 |
|
---|
4193 | /**
|
---|
4194 | * For typedef'ing or declaring a C instruction implementation function taking
|
---|
4195 | * four extra arguments.
|
---|
4196 | *
|
---|
4197 | * @param a_Name The name of the type.
|
---|
4198 | * @param a_Type0 The type of the 1st argument
|
---|
4199 | * @param a_Arg0 The name of the 1st argument.
|
---|
4200 | * @param a_Type1 The type of the 2nd argument.
|
---|
4201 | * @param a_Arg1 The name of the 2nd argument.
|
---|
4202 | * @param a_Type2 The type of the 3rd argument.
|
---|
4203 | * @param a_Arg2 The name of the 3rd argument.
|
---|
4204 | * @param a_Type3 The type of the 4th argument.
|
---|
4205 | * @param a_Arg3 The name of the 4th argument.
|
---|
4206 | */
|
---|
4207 | # define IEM_CIMPL_DECL_TYPE_4(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2, a_Type3, a_Arg3) \
|
---|
4208 | IEM_DECL_IMPL_TYPE(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1, a_Type2 a_Arg2, a_Type3 a_Arg3))
|
---|
4209 | /**
|
---|
4210 | * For defining a C instruction implementation function taking four extra
|
---|
4211 | * arguments.
|
---|
4212 | *
|
---|
4213 | * @param a_Name The name of the function.
|
---|
4214 | * @param a_Type0 The type of the 1st argument
|
---|
4215 | * @param a_Arg0 The name of the 1st argument.
|
---|
4216 | * @param a_Type1 The type of the 2nd argument.
|
---|
4217 | * @param a_Arg1 The name of the 2nd argument.
|
---|
4218 | * @param a_Type2 The type of the 3rd argument.
|
---|
4219 | * @param a_Arg2 The name of the 3rd argument.
|
---|
4220 | * @param a_Type3 The type of the 4th argument.
|
---|
4221 | * @param a_Arg3 The name of the 4th argument.
|
---|
4222 | */
|
---|
4223 | # define IEM_CIMPL_DEF_4(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2, a_Type3, a_Arg3) \
|
---|
4224 | IEM_DECL_IMPL_DEF(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1, \
|
---|
4225 | a_Type2 a_Arg2, a_Type3 a_Arg3))
|
---|
4226 | /**
|
---|
4227 | * Prototype version of IEM_CIMPL_DEF_4.
|
---|
4228 | */
|
---|
4229 | # define IEM_CIMPL_PROTO_4(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2, a_Type3, a_Arg3) \
|
---|
4230 | IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1, \
|
---|
4231 | a_Type2 a_Arg2, a_Type3 a_Arg3))
|
---|
4232 | /**
|
---|
4233 | * For calling a C instruction implementation function taking four extra
|
---|
4234 | * arguments.
|
---|
4235 | *
|
---|
4236 | * This special call macro adds default arguments to the call and allow us to
|
---|
4237 | * change these later.
|
---|
4238 | *
|
---|
4239 | * @param a_fn The name of the function.
|
---|
4240 | * @param a0 The name of the 1st argument.
|
---|
4241 | * @param a1 The name of the 2nd argument.
|
---|
4242 | * @param a2 The name of the 3rd argument.
|
---|
4243 | * @param a3 The name of the 4th argument.
|
---|
4244 | */
|
---|
4245 | # define IEM_CIMPL_CALL_4(a_fn, a0, a1, a2, a3) a_fn(pVCpu, cbInstr, (a0), (a1), (a2), (a3))
|
---|
4246 |
|
---|
4247 |
|
---|
4248 | /**
|
---|
4249 | * For typedef'ing or declaring a C instruction implementation function taking
|
---|
4250 | * five extra arguments.
|
---|
4251 | *
|
---|
4252 | * @param a_Name The name of the type.
|
---|
4253 | * @param a_Type0 The type of the 1st argument
|
---|
4254 | * @param a_Arg0 The name of the 1st argument.
|
---|
4255 | * @param a_Type1 The type of the 2nd argument.
|
---|
4256 | * @param a_Arg1 The name of the 2nd argument.
|
---|
4257 | * @param a_Type2 The type of the 3rd argument.
|
---|
4258 | * @param a_Arg2 The name of the 3rd argument.
|
---|
4259 | * @param a_Type3 The type of the 4th argument.
|
---|
4260 | * @param a_Arg3 The name of the 4th argument.
|
---|
4261 | * @param a_Type4 The type of the 5th argument.
|
---|
4262 | * @param a_Arg4 The name of the 5th argument.
|
---|
4263 | */
|
---|
4264 | # define IEM_CIMPL_DECL_TYPE_5(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2, a_Type3, a_Arg3, a_Type4, a_Arg4) \
|
---|
4265 | IEM_DECL_IMPL_TYPE(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, \
|
---|
4266 | a_Type0 a_Arg0, a_Type1 a_Arg1, a_Type2 a_Arg2, \
|
---|
4267 | a_Type3 a_Arg3, a_Type4 a_Arg4))
|
---|
4268 | /**
|
---|
4269 | * For defining a C instruction implementation function taking five extra
|
---|
4270 | * arguments.
|
---|
4271 | *
|
---|
4272 | * @param a_Name The name of the function.
|
---|
4273 | * @param a_Type0 The type of the 1st argument
|
---|
4274 | * @param a_Arg0 The name of the 1st argument.
|
---|
4275 | * @param a_Type1 The type of the 2nd argument.
|
---|
4276 | * @param a_Arg1 The name of the 2nd argument.
|
---|
4277 | * @param a_Type2 The type of the 3rd argument.
|
---|
4278 | * @param a_Arg2 The name of the 3rd argument.
|
---|
4279 | * @param a_Type3 The type of the 4th argument.
|
---|
4280 | * @param a_Arg3 The name of the 4th argument.
|
---|
4281 | * @param a_Type4 The type of the 5th argument.
|
---|
4282 | * @param a_Arg4 The name of the 5th argument.
|
---|
4283 | */
|
---|
4284 | # define IEM_CIMPL_DEF_5(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2, a_Type3, a_Arg3, a_Type4, a_Arg4) \
|
---|
4285 | IEM_DECL_IMPL_DEF(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1, \
|
---|
4286 | a_Type2 a_Arg2, a_Type3 a_Arg3, a_Type4 a_Arg4))
|
---|
4287 | /**
|
---|
4288 | * Prototype version of IEM_CIMPL_DEF_5.
|
---|
4289 | */
|
---|
4290 | # define IEM_CIMPL_PROTO_5(a_Name, a_Type0, a_Arg0, a_Type1, a_Arg1, a_Type2, a_Arg2, a_Type3, a_Arg3, a_Type4, a_Arg4) \
|
---|
4291 | IEM_DECL_IMPL_PROTO(VBOXSTRICTRC, a_Name, (PVMCPUCC pVCpu, uint8_t cbInstr, a_Type0 a_Arg0, a_Type1 a_Arg1, \
|
---|
4292 | a_Type2 a_Arg2, a_Type3 a_Arg3, a_Type4 a_Arg4))
|
---|
4293 | /**
|
---|
4294 | * For calling a C instruction implementation function taking five extra
|
---|
4295 | * arguments.
|
---|
4296 | *
|
---|
4297 | * This special call macro adds default arguments to the call and allow us to
|
---|
4298 | * change these later.
|
---|
4299 | *
|
---|
4300 | * @param a_fn The name of the function.
|
---|
4301 | * @param a0 The name of the 1st argument.
|
---|
4302 | * @param a1 The name of the 2nd argument.
|
---|
4303 | * @param a2 The name of the 3rd argument.
|
---|
4304 | * @param a3 The name of the 4th argument.
|
---|
4305 | * @param a4 The name of the 5th argument.
|
---|
4306 | */
|
---|
4307 | # define IEM_CIMPL_CALL_5(a_fn, a0, a1, a2, a3, a4) a_fn(pVCpu, cbInstr, (a0), (a1), (a2), (a3), (a4))
|
---|
4308 |
|
---|
4309 | /** @} */
|
---|
4310 |
|
---|
4311 |
|
---|
4312 | /** @name Opcode Decoder Function Types.
|
---|
4313 | * @{ */
|
---|
4314 |
|
---|
4315 | /** @typedef PFNIEMOP
|
---|
4316 | * Pointer to an opcode decoder function.
|
---|
4317 | */
|
---|
4318 |
|
---|
4319 | /** @def FNIEMOP_DEF
|
---|
4320 | * Define an opcode decoder function.
|
---|
4321 | *
|
---|
4322 | * We're using macors for this so that adding and removing parameters as well as
|
---|
4323 | * tweaking compiler specific attributes becomes easier. See FNIEMOP_CALL
|
---|
4324 | *
|
---|
4325 | * @param a_Name The function name.
|
---|
4326 | */
|
---|
4327 |
|
---|
4328 | /** @typedef PFNIEMOPRM
|
---|
4329 | * Pointer to an opcode decoder function with RM byte.
|
---|
4330 | */
|
---|
4331 |
|
---|
4332 | /** @def FNIEMOPRM_DEF
|
---|
4333 | * Define an opcode decoder function with RM byte.
|
---|
4334 | *
|
---|
4335 | * We're using macors for this so that adding and removing parameters as well as
|
---|
4336 | * tweaking compiler specific attributes becomes easier. See FNIEMOP_CALL_1
|
---|
4337 | *
|
---|
4338 | * @param a_Name The function name.
|
---|
4339 | */
|
---|
4340 |
|
---|
4341 | #if defined(__GNUC__) && defined(RT_ARCH_X86)
|
---|
4342 | typedef VBOXSTRICTRC (__attribute__((__fastcall__)) * PFNIEMOP)(PVMCPUCC pVCpu);
|
---|
4343 | typedef VBOXSTRICTRC (__attribute__((__fastcall__)) * PFNIEMOPRM)(PVMCPUCC pVCpu, uint8_t bRm);
|
---|
4344 | # define FNIEMOP_DEF(a_Name) \
|
---|
4345 | IEM_STATIC VBOXSTRICTRC __attribute__((__fastcall__, __nothrow__)) a_Name(PVMCPUCC pVCpu)
|
---|
4346 | # define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) \
|
---|
4347 | IEM_STATIC VBOXSTRICTRC __attribute__((__fastcall__, __nothrow__)) a_Name(PVMCPUCC pVCpu, a_Type0 a_Name0)
|
---|
4348 | # define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) \
|
---|
4349 | IEM_STATIC VBOXSTRICTRC __attribute__((__fastcall__, __nothrow__)) a_Name(PVMCPUCC pVCpu, a_Type0 a_Name0, a_Type1 a_Name1)
|
---|
4350 |
|
---|
4351 | #elif defined(_MSC_VER) && defined(RT_ARCH_X86)
|
---|
4352 | typedef VBOXSTRICTRC (__fastcall * PFNIEMOP)(PVMCPUCC pVCpu);
|
---|
4353 | typedef VBOXSTRICTRC (__fastcall * PFNIEMOPRM)(PVMCPUCC pVCpu, uint8_t bRm);
|
---|
4354 | # define FNIEMOP_DEF(a_Name) \
|
---|
4355 | IEM_STATIC /*__declspec(naked)*/ VBOXSTRICTRC __fastcall a_Name(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP
|
---|
4356 | # define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) \
|
---|
4357 | IEM_STATIC /*__declspec(naked)*/ VBOXSTRICTRC __fastcall a_Name(PVMCPUCC pVCpu, a_Type0 a_Name0) IEM_NOEXCEPT_MAY_LONGJMP
|
---|
4358 | # define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) \
|
---|
4359 | IEM_STATIC /*__declspec(naked)*/ VBOXSTRICTRC __fastcall a_Name(PVMCPUCC pVCpu, a_Type0 a_Name0, a_Type1 a_Name1) IEM_NOEXCEPT_MAY_LONGJMP
|
---|
4360 |
|
---|
4361 | #elif defined(__GNUC__) && !defined(IEM_WITH_THROW_CATCH)
|
---|
4362 | typedef VBOXSTRICTRC (* PFNIEMOP)(PVMCPUCC pVCpu);
|
---|
4363 | typedef VBOXSTRICTRC (* PFNIEMOPRM)(PVMCPUCC pVCpu, uint8_t bRm);
|
---|
4364 | # define FNIEMOP_DEF(a_Name) \
|
---|
4365 | IEM_STATIC VBOXSTRICTRC __attribute__((__nothrow__)) a_Name(PVMCPUCC pVCpu)
|
---|
4366 | # define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) \
|
---|
4367 | IEM_STATIC VBOXSTRICTRC __attribute__((__nothrow__)) a_Name(PVMCPUCC pVCpu, a_Type0 a_Name0)
|
---|
4368 | # define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) \
|
---|
4369 | IEM_STATIC VBOXSTRICTRC __attribute__((__nothrow__)) a_Name(PVMCPUCC pVCpu, a_Type0 a_Name0, a_Type1 a_Name1)
|
---|
4370 |
|
---|
4371 | #else
|
---|
4372 | typedef VBOXSTRICTRC (* PFNIEMOP)(PVMCPUCC pVCpu);
|
---|
4373 | typedef VBOXSTRICTRC (* PFNIEMOPRM)(PVMCPUCC pVCpu, uint8_t bRm);
|
---|
4374 | # define FNIEMOP_DEF(a_Name) \
|
---|
4375 | IEM_STATIC VBOXSTRICTRC a_Name(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP
|
---|
4376 | # define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) \
|
---|
4377 | IEM_STATIC VBOXSTRICTRC a_Name(PVMCPUCC pVCpu, a_Type0 a_Name0) IEM_NOEXCEPT_MAY_LONGJMP
|
---|
4378 | # define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) \
|
---|
4379 | IEM_STATIC VBOXSTRICTRC a_Name(PVMCPUCC pVCpu, a_Type0 a_Name0, a_Type1 a_Name1) IEM_NOEXCEPT_MAY_LONGJMP
|
---|
4380 |
|
---|
4381 | #endif
|
---|
4382 | #define FNIEMOPRM_DEF(a_Name) FNIEMOP_DEF_1(a_Name, uint8_t, bRm)
|
---|
4383 |
|
---|
4384 | /**
|
---|
4385 | * Call an opcode decoder function.
|
---|
4386 | *
|
---|
4387 | * We're using macors for this so that adding and removing parameters can be
|
---|
4388 | * done as we please. See FNIEMOP_DEF.
|
---|
4389 | */
|
---|
4390 | #define FNIEMOP_CALL(a_pfn) (a_pfn)(pVCpu)
|
---|
4391 |
|
---|
4392 | /**
|
---|
4393 | * Call a common opcode decoder function taking one extra argument.
|
---|
4394 | *
|
---|
4395 | * We're using macors for this so that adding and removing parameters can be
|
---|
4396 | * done as we please. See FNIEMOP_DEF_1.
|
---|
4397 | */
|
---|
4398 | #define FNIEMOP_CALL_1(a_pfn, a0) (a_pfn)(pVCpu, a0)
|
---|
4399 |
|
---|
4400 | /**
|
---|
4401 | * Call a common opcode decoder function taking one extra argument.
|
---|
4402 | *
|
---|
4403 | * We're using macors for this so that adding and removing parameters can be
|
---|
4404 | * done as we please. See FNIEMOP_DEF_1.
|
---|
4405 | */
|
---|
4406 | #define FNIEMOP_CALL_2(a_pfn, a0, a1) (a_pfn)(pVCpu, a0, a1)
|
---|
4407 | /** @} */
|
---|
4408 |
|
---|
4409 |
|
---|
4410 | /** @name Misc Helpers
|
---|
4411 | * @{ */
|
---|
4412 |
|
---|
4413 | /** Used to shut up GCC warnings about variables that 'may be used uninitialized'
|
---|
4414 | * due to GCC lacking knowledge about the value range of a switch. */
|
---|
4415 | #if RT_CPLUSPLUS_PREREQ(202000)
|
---|
4416 | # define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: [[unlikely]] AssertFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE)
|
---|
4417 | #else
|
---|
4418 | # define IEM_NOT_REACHED_DEFAULT_CASE_RET() default: AssertFailedReturn(VERR_IPE_NOT_REACHED_DEFAULT_CASE)
|
---|
4419 | #endif
|
---|
4420 |
|
---|
4421 | /** Variant of IEM_NOT_REACHED_DEFAULT_CASE_RET that returns a custom value. */
|
---|
4422 | #if RT_CPLUSPLUS_PREREQ(202000)
|
---|
4423 | # define IEM_NOT_REACHED_DEFAULT_CASE_RET2(a_RetValue) default: [[unlikely]] AssertFailedReturn(a_RetValue)
|
---|
4424 | #else
|
---|
4425 | # define IEM_NOT_REACHED_DEFAULT_CASE_RET2(a_RetValue) default: AssertFailedReturn(a_RetValue)
|
---|
4426 | #endif
|
---|
4427 |
|
---|
4428 | /**
|
---|
4429 | * Returns IEM_RETURN_ASPECT_NOT_IMPLEMENTED, and in debug builds logs the
|
---|
4430 | * occation.
|
---|
4431 | */
|
---|
4432 | #ifdef LOG_ENABLED
|
---|
4433 | # define IEM_RETURN_ASPECT_NOT_IMPLEMENTED() \
|
---|
4434 | do { \
|
---|
4435 | /*Log*/ LogAlways(("%s: returning IEM_RETURN_ASPECT_NOT_IMPLEMENTED (line %d)\n", __FUNCTION__, __LINE__)); \
|
---|
4436 | return VERR_IEM_ASPECT_NOT_IMPLEMENTED; \
|
---|
4437 | } while (0)
|
---|
4438 | #else
|
---|
4439 | # define IEM_RETURN_ASPECT_NOT_IMPLEMENTED() \
|
---|
4440 | return VERR_IEM_ASPECT_NOT_IMPLEMENTED
|
---|
4441 | #endif
|
---|
4442 |
|
---|
4443 | /**
|
---|
4444 | * Returns IEM_RETURN_ASPECT_NOT_IMPLEMENTED, and in debug builds logs the
|
---|
4445 | * occation using the supplied logger statement.
|
---|
4446 | *
|
---|
4447 | * @param a_LoggerArgs What to log on failure.
|
---|
4448 | */
|
---|
4449 | #ifdef LOG_ENABLED
|
---|
4450 | # define IEM_RETURN_ASPECT_NOT_IMPLEMENTED_LOG(a_LoggerArgs) \
|
---|
4451 | do { \
|
---|
4452 | LogAlways((LOG_FN_FMT ": ", __PRETTY_FUNCTION__)); LogAlways(a_LoggerArgs); \
|
---|
4453 | /*LogFunc(a_LoggerArgs);*/ \
|
---|
4454 | return VERR_IEM_ASPECT_NOT_IMPLEMENTED; \
|
---|
4455 | } while (0)
|
---|
4456 | #else
|
---|
4457 | # define IEM_RETURN_ASPECT_NOT_IMPLEMENTED_LOG(a_LoggerArgs) \
|
---|
4458 | return VERR_IEM_ASPECT_NOT_IMPLEMENTED
|
---|
4459 | #endif
|
---|
4460 |
|
---|
4461 | /**
|
---|
4462 | * Gets the CPU mode (from fExec) as a IEMMODE value.
|
---|
4463 | *
|
---|
4464 | * @returns IEMMODE
|
---|
4465 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4466 | */
|
---|
4467 | #define IEM_GET_CPU_MODE(a_pVCpu) ((a_pVCpu)->iem.s.fExec & IEM_F_MODE_CPUMODE_MASK)
|
---|
4468 |
|
---|
4469 | /**
|
---|
4470 | * Check if we're currently executing in real or virtual 8086 mode.
|
---|
4471 | *
|
---|
4472 | * @returns @c true if it is, @c false if not.
|
---|
4473 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4474 | */
|
---|
4475 | #define IEM_IS_REAL_OR_V86_MODE(a_pVCpu) (( ((a_pVCpu)->iem.s.fExec ^ IEM_F_MODE_X86_PROT_MASK) \
|
---|
4476 | & (IEM_F_MODE_X86_V86_MASK | IEM_F_MODE_X86_PROT_MASK)) != 0)
|
---|
4477 |
|
---|
4478 | /**
|
---|
4479 | * Check if we're currently executing in virtual 8086 mode.
|
---|
4480 | *
|
---|
4481 | * @returns @c true if it is, @c false if not.
|
---|
4482 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4483 | */
|
---|
4484 | #define IEM_IS_V86_MODE(a_pVCpu) (((a_pVCpu)->iem.s.fExec & IEM_F_MODE_X86_V86_MASK) != 0)
|
---|
4485 |
|
---|
4486 | /**
|
---|
4487 | * Check if we're currently executing in long mode.
|
---|
4488 | *
|
---|
4489 | * @returns @c true if it is, @c false if not.
|
---|
4490 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4491 | */
|
---|
4492 | #define IEM_IS_LONG_MODE(a_pVCpu) (CPUMIsGuestInLongModeEx(IEM_GET_CTX(a_pVCpu)))
|
---|
4493 |
|
---|
4494 | /**
|
---|
4495 | * Check if we're currently executing in a 16-bit code segment.
|
---|
4496 | *
|
---|
4497 | * @returns @c true if it is, @c false if not.
|
---|
4498 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4499 | */
|
---|
4500 | #define IEM_IS_16BIT_CODE(a_pVCpu) (IEM_GET_CPU_MODE(a_pVCpu) == IEMMODE_16BIT)
|
---|
4501 |
|
---|
4502 | /**
|
---|
4503 | * Check if we're currently executing in a 32-bit code segment.
|
---|
4504 | *
|
---|
4505 | * @returns @c true if it is, @c false if not.
|
---|
4506 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4507 | */
|
---|
4508 | #define IEM_IS_32BIT_CODE(a_pVCpu) (IEM_GET_CPU_MODE(a_pVCpu) == IEMMODE_32BIT)
|
---|
4509 |
|
---|
4510 | /**
|
---|
4511 | * Check if we're currently executing in a 64-bit code segment.
|
---|
4512 | *
|
---|
4513 | * @returns @c true if it is, @c false if not.
|
---|
4514 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4515 | */
|
---|
4516 | #define IEM_IS_64BIT_CODE(a_pVCpu) (IEM_GET_CPU_MODE(a_pVCpu) == IEMMODE_64BIT)
|
---|
4517 |
|
---|
4518 | /**
|
---|
4519 | * Check if we're currently executing in real mode.
|
---|
4520 | *
|
---|
4521 | * @returns @c true if it is, @c false if not.
|
---|
4522 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4523 | */
|
---|
4524 | #define IEM_IS_REAL_MODE(a_pVCpu) (!((a_pVCpu)->iem.s.fExec & IEM_F_MODE_X86_PROT_MASK))
|
---|
4525 |
|
---|
4526 | /**
|
---|
4527 | * Gets the current protection level (CPL).
|
---|
4528 | *
|
---|
4529 | * @returns 0..3
|
---|
4530 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4531 | */
|
---|
4532 | #define IEM_GET_CPL(a_pVCpu) (((a_pVCpu)->iem.s.fExec >> IEM_F_X86_CPL_SHIFT) & IEM_F_X86_CPL_SMASK)
|
---|
4533 |
|
---|
4534 | /**
|
---|
4535 | * Sets the current protection level (CPL).
|
---|
4536 | *
|
---|
4537 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4538 | */
|
---|
4539 | #define IEM_SET_CPL(a_pVCpu, a_uCpl) \
|
---|
4540 | do { (a_pVCpu)->iem.s.fExec = ((a_pVCpu)->iem.s.fExec & ~IEM_F_X86_CPL_MASK) | ((a_uCpl) << IEM_F_X86_CPL_SHIFT); } while (0)
|
---|
4541 |
|
---|
4542 | /**
|
---|
4543 | * Returns a (const) pointer to the CPUMFEATURES for the guest CPU.
|
---|
4544 | * @returns PCCPUMFEATURES
|
---|
4545 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4546 | */
|
---|
4547 | #define IEM_GET_GUEST_CPU_FEATURES(a_pVCpu) (&((a_pVCpu)->CTX_SUFF(pVM)->cpum.ro.GuestFeatures))
|
---|
4548 |
|
---|
4549 | /**
|
---|
4550 | * Returns a (const) pointer to the CPUMFEATURES for the host CPU.
|
---|
4551 | * @returns PCCPUMFEATURES
|
---|
4552 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4553 | */
|
---|
4554 | #define IEM_GET_HOST_CPU_FEATURES(a_pVCpu) (&g_CpumHostFeatures.s)
|
---|
4555 |
|
---|
4556 | /**
|
---|
4557 | * Evaluates to true if we're presenting an Intel CPU to the guest.
|
---|
4558 | */
|
---|
4559 | #define IEM_IS_GUEST_CPU_INTEL(a_pVCpu) ( (a_pVCpu)->iem.s.enmCpuVendor == CPUMCPUVENDOR_INTEL )
|
---|
4560 |
|
---|
4561 | /**
|
---|
4562 | * Evaluates to true if we're presenting an AMD CPU to the guest.
|
---|
4563 | */
|
---|
4564 | #define IEM_IS_GUEST_CPU_AMD(a_pVCpu) ( (a_pVCpu)->iem.s.enmCpuVendor == CPUMCPUVENDOR_AMD || (a_pVCpu)->iem.s.enmCpuVendor == CPUMCPUVENDOR_HYGON )
|
---|
4565 |
|
---|
4566 | /**
|
---|
4567 | * Check if the address is canonical.
|
---|
4568 | */
|
---|
4569 | #define IEM_IS_CANONICAL(a_u64Addr) X86_IS_CANONICAL(a_u64Addr)
|
---|
4570 |
|
---|
4571 | /** Checks if the ModR/M byte is in register mode or not. */
|
---|
4572 | #define IEM_IS_MODRM_REG_MODE(a_bRm) ( ((a_bRm) & X86_MODRM_MOD_MASK) == (3 << X86_MODRM_MOD_SHIFT) )
|
---|
4573 | /** Checks if the ModR/M byte is in memory mode or not. */
|
---|
4574 | #define IEM_IS_MODRM_MEM_MODE(a_bRm) ( ((a_bRm) & X86_MODRM_MOD_MASK) != (3 << X86_MODRM_MOD_SHIFT) )
|
---|
4575 |
|
---|
4576 | /**
|
---|
4577 | * Gets the register (reg) part of a ModR/M encoding, with REX.R added in.
|
---|
4578 | *
|
---|
4579 | * For use during decoding.
|
---|
4580 | */
|
---|
4581 | #define IEM_GET_MODRM_REG(a_pVCpu, a_bRm) ( (((a_bRm) >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) | (a_pVCpu)->iem.s.uRexReg )
|
---|
4582 | /**
|
---|
4583 | * Gets the r/m part of a ModR/M encoding as a register index, with REX.B added in.
|
---|
4584 | *
|
---|
4585 | * For use during decoding.
|
---|
4586 | */
|
---|
4587 | #define IEM_GET_MODRM_RM(a_pVCpu, a_bRm) ( ((a_bRm) & X86_MODRM_RM_MASK) | (a_pVCpu)->iem.s.uRexB )
|
---|
4588 |
|
---|
4589 | /**
|
---|
4590 | * Gets the register (reg) part of a ModR/M encoding, without REX.R.
|
---|
4591 | *
|
---|
4592 | * For use during decoding.
|
---|
4593 | */
|
---|
4594 | #define IEM_GET_MODRM_REG_8(a_bRm) ( (((a_bRm) >> X86_MODRM_REG_SHIFT) & X86_MODRM_REG_SMASK) )
|
---|
4595 | /**
|
---|
4596 | * Gets the r/m part of a ModR/M encoding as a register index, without REX.B.
|
---|
4597 | *
|
---|
4598 | * For use during decoding.
|
---|
4599 | */
|
---|
4600 | #define IEM_GET_MODRM_RM_8(a_bRm) ( ((a_bRm) & X86_MODRM_RM_MASK) )
|
---|
4601 |
|
---|
4602 | /**
|
---|
4603 | * Gets the register (reg) part of a ModR/M encoding as an extended 8-bit
|
---|
4604 | * register index, with REX.R added in.
|
---|
4605 | *
|
---|
4606 | * For use during decoding.
|
---|
4607 | *
|
---|
4608 | * @see iemGRegRefU8Ex, iemGRegFetchU8Ex, iemGRegStoreU8Ex
|
---|
4609 | */
|
---|
4610 | #define IEM_GET_MODRM_REG_EX8(a_pVCpu, a_bRm) \
|
---|
4611 | ( (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_REX) \
|
---|
4612 | || !((a_bRm) & (4 << X86_MODRM_REG_SHIFT)) /* IEM_GET_MODRM_REG(pVCpu, a_bRm) < 4 */ \
|
---|
4613 | ? IEM_GET_MODRM_REG(pVCpu, a_bRm) : (((a_bRm) >> X86_MODRM_REG_SHIFT) & 3) | 16)
|
---|
4614 | /**
|
---|
4615 | * Gets the r/m part of a ModR/M encoding as an extended 8-bit register index,
|
---|
4616 | * with REX.B added in.
|
---|
4617 | *
|
---|
4618 | * For use during decoding.
|
---|
4619 | *
|
---|
4620 | * @see iemGRegRefU8Ex, iemGRegFetchU8Ex, iemGRegStoreU8Ex
|
---|
4621 | */
|
---|
4622 | #define IEM_GET_MODRM_RM_EX8(a_pVCpu, a_bRm) \
|
---|
4623 | ( (pVCpu->iem.s.fPrefixes & IEM_OP_PRF_REX) \
|
---|
4624 | || !((a_bRm) & 4) /* IEM_GET_MODRM_RM(pVCpu, a_bRm) < 4 */ \
|
---|
4625 | ? IEM_GET_MODRM_RM(pVCpu, a_bRm) : ((a_bRm) & 3) | 16)
|
---|
4626 |
|
---|
4627 | /**
|
---|
4628 | * Combines the prefix REX and ModR/M byte for passing to
|
---|
4629 | * iemOpHlpCalcRmEffAddrThreadedAddr64().
|
---|
4630 | *
|
---|
4631 | * @returns The ModRM byte but with bit 3 set to REX.B and bit 4 to REX.X.
|
---|
4632 | * The two bits are part of the REG sub-field, which isn't needed in
|
---|
4633 | * iemOpHlpCalcRmEffAddrThreadedAddr64().
|
---|
4634 | *
|
---|
4635 | * For use during decoding/recompiling.
|
---|
4636 | */
|
---|
4637 | #define IEM_GET_MODRM_EX(a_pVCpu, a_bRm) \
|
---|
4638 | ( ((a_bRm) & ~X86_MODRM_REG_MASK) \
|
---|
4639 | | (uint8_t)( (pVCpu->iem.s.fPrefixes & (IEM_OP_PRF_REX_B | IEM_OP_PRF_REX_X)) >> (26 - 3) ) )
|
---|
4640 | AssertCompile(IEM_OP_PRF_REX_B == RT_BIT_32(26));
|
---|
4641 | AssertCompile(IEM_OP_PRF_REX_X == RT_BIT_32(27));
|
---|
4642 |
|
---|
4643 | /**
|
---|
4644 | * Gets the effective VEX.VVVV value.
|
---|
4645 | *
|
---|
4646 | * The 4th bit is ignored if not 64-bit code.
|
---|
4647 | * @returns effective V-register value.
|
---|
4648 | * @param a_pVCpu The cross context virtual CPU structure of the calling thread.
|
---|
4649 | */
|
---|
4650 | #define IEM_GET_EFFECTIVE_VVVV(a_pVCpu) \
|
---|
4651 | (IEM_IS_64BIT_CODE(a_pVCpu) ? (a_pVCpu)->iem.s.uVex3rdReg : (a_pVCpu)->iem.s.uVex3rdReg & 7)
|
---|
4652 |
|
---|
4653 |
|
---|
4654 | /**
|
---|
4655 | * Checks if we're executing inside an AMD-V or VT-x guest.
|
---|
4656 | */
|
---|
4657 | #if defined(VBOX_WITH_NESTED_HWVIRT_VMX) || defined(VBOX_WITH_NESTED_HWVIRT_SVM)
|
---|
4658 | # define IEM_IS_IN_GUEST(a_pVCpu) RT_BOOL((a_pVCpu)->iem.s.fExec & IEM_F_X86_CTX_IN_GUEST)
|
---|
4659 | #else
|
---|
4660 | # define IEM_IS_IN_GUEST(a_pVCpu) false
|
---|
4661 | #endif
|
---|
4662 |
|
---|
4663 |
|
---|
4664 | #ifdef VBOX_WITH_NESTED_HWVIRT_VMX
|
---|
4665 |
|
---|
4666 | /**
|
---|
4667 | * Check if the guest has entered VMX root operation.
|
---|
4668 | */
|
---|
4669 | # define IEM_VMX_IS_ROOT_MODE(a_pVCpu) (CPUMIsGuestInVmxRootMode(IEM_GET_CTX(a_pVCpu)))
|
---|
4670 |
|
---|
4671 | /**
|
---|
4672 | * Check if the guest has entered VMX non-root operation.
|
---|
4673 | */
|
---|
4674 | # define IEM_VMX_IS_NON_ROOT_MODE(a_pVCpu) ( ((a_pVCpu)->iem.s.fExec & (IEM_F_X86_CTX_VMX | IEM_F_X86_CTX_IN_GUEST)) \
|
---|
4675 | == (IEM_F_X86_CTX_VMX | IEM_F_X86_CTX_IN_GUEST) )
|
---|
4676 |
|
---|
4677 | /**
|
---|
4678 | * Check if the nested-guest has the given Pin-based VM-execution control set.
|
---|
4679 | */
|
---|
4680 | # define IEM_VMX_IS_PINCTLS_SET(a_pVCpu, a_PinCtl) (CPUMIsGuestVmxPinCtlsSet(IEM_GET_CTX(a_pVCpu), (a_PinCtl)))
|
---|
4681 |
|
---|
4682 | /**
|
---|
4683 | * Check if the nested-guest has the given Processor-based VM-execution control set.
|
---|
4684 | */
|
---|
4685 | # define IEM_VMX_IS_PROCCTLS_SET(a_pVCpu, a_ProcCtl) (CPUMIsGuestVmxProcCtlsSet(IEM_GET_CTX(a_pVCpu), (a_ProcCtl)))
|
---|
4686 |
|
---|
4687 | /**
|
---|
4688 | * Check if the nested-guest has the given Secondary Processor-based VM-execution
|
---|
4689 | * control set.
|
---|
4690 | */
|
---|
4691 | # define IEM_VMX_IS_PROCCTLS2_SET(a_pVCpu, a_ProcCtl2) (CPUMIsGuestVmxProcCtls2Set(IEM_GET_CTX(a_pVCpu), (a_ProcCtl2)))
|
---|
4692 |
|
---|
4693 | /** Gets the guest-physical address of the shadows VMCS for the given VCPU. */
|
---|
4694 | # define IEM_VMX_GET_SHADOW_VMCS(a_pVCpu) ((a_pVCpu)->cpum.GstCtx.hwvirt.vmx.GCPhysShadowVmcs)
|
---|
4695 |
|
---|
4696 | /** Whether a shadow VMCS is present for the given VCPU. */
|
---|
4697 | # define IEM_VMX_HAS_SHADOW_VMCS(a_pVCpu) RT_BOOL(IEM_VMX_GET_SHADOW_VMCS(a_pVCpu) != NIL_RTGCPHYS)
|
---|
4698 |
|
---|
4699 | /** Gets the VMXON region pointer. */
|
---|
4700 | # define IEM_VMX_GET_VMXON_PTR(a_pVCpu) ((a_pVCpu)->cpum.GstCtx.hwvirt.vmx.GCPhysVmxon)
|
---|
4701 |
|
---|
4702 | /** Gets the guest-physical address of the current VMCS for the given VCPU. */
|
---|
4703 | # define IEM_VMX_GET_CURRENT_VMCS(a_pVCpu) ((a_pVCpu)->cpum.GstCtx.hwvirt.vmx.GCPhysVmcs)
|
---|
4704 |
|
---|
4705 | /** Whether a current VMCS is present for the given VCPU. */
|
---|
4706 | # define IEM_VMX_HAS_CURRENT_VMCS(a_pVCpu) RT_BOOL(IEM_VMX_GET_CURRENT_VMCS(a_pVCpu) != NIL_RTGCPHYS)
|
---|
4707 |
|
---|
4708 | /** Assigns the guest-physical address of the current VMCS for the given VCPU. */
|
---|
4709 | # define IEM_VMX_SET_CURRENT_VMCS(a_pVCpu, a_GCPhysVmcs) \
|
---|
4710 | do \
|
---|
4711 | { \
|
---|
4712 | Assert((a_GCPhysVmcs) != NIL_RTGCPHYS); \
|
---|
4713 | (a_pVCpu)->cpum.GstCtx.hwvirt.vmx.GCPhysVmcs = (a_GCPhysVmcs); \
|
---|
4714 | } while (0)
|
---|
4715 |
|
---|
4716 | /** Clears any current VMCS for the given VCPU. */
|
---|
4717 | # define IEM_VMX_CLEAR_CURRENT_VMCS(a_pVCpu) \
|
---|
4718 | do \
|
---|
4719 | { \
|
---|
4720 | (a_pVCpu)->cpum.GstCtx.hwvirt.vmx.GCPhysVmcs = NIL_RTGCPHYS; \
|
---|
4721 | } while (0)
|
---|
4722 |
|
---|
4723 | /**
|
---|
4724 | * Invokes the VMX VM-exit handler for an instruction intercept.
|
---|
4725 | */
|
---|
4726 | # define IEM_VMX_VMEXIT_INSTR_RET(a_pVCpu, a_uExitReason, a_cbInstr) \
|
---|
4727 | do { return iemVmxVmexitInstr((a_pVCpu), (a_uExitReason), (a_cbInstr)); } while (0)
|
---|
4728 |
|
---|
4729 | /**
|
---|
4730 | * Invokes the VMX VM-exit handler for an instruction intercept where the
|
---|
4731 | * instruction provides additional VM-exit information.
|
---|
4732 | */
|
---|
4733 | # define IEM_VMX_VMEXIT_INSTR_NEEDS_INFO_RET(a_pVCpu, a_uExitReason, a_uInstrId, a_cbInstr) \
|
---|
4734 | do { return iemVmxVmexitInstrNeedsInfo((a_pVCpu), (a_uExitReason), (a_uInstrId), (a_cbInstr)); } while (0)
|
---|
4735 |
|
---|
4736 | /**
|
---|
4737 | * Invokes the VMX VM-exit handler for a task switch.
|
---|
4738 | */
|
---|
4739 | # define IEM_VMX_VMEXIT_TASK_SWITCH_RET(a_pVCpu, a_enmTaskSwitch, a_SelNewTss, a_cbInstr) \
|
---|
4740 | do { return iemVmxVmexitTaskSwitch((a_pVCpu), (a_enmTaskSwitch), (a_SelNewTss), (a_cbInstr)); } while (0)
|
---|
4741 |
|
---|
4742 | /**
|
---|
4743 | * Invokes the VMX VM-exit handler for MWAIT.
|
---|
4744 | */
|
---|
4745 | # define IEM_VMX_VMEXIT_MWAIT_RET(a_pVCpu, a_fMonitorArmed, a_cbInstr) \
|
---|
4746 | do { return iemVmxVmexitInstrMwait((a_pVCpu), (a_fMonitorArmed), (a_cbInstr)); } while (0)
|
---|
4747 |
|
---|
4748 | /**
|
---|
4749 | * Invokes the VMX VM-exit handler for EPT faults.
|
---|
4750 | */
|
---|
4751 | # define IEM_VMX_VMEXIT_EPT_RET(a_pVCpu, a_pPtWalk, a_fAccess, a_fSlatFail, a_cbInstr) \
|
---|
4752 | do { return iemVmxVmexitEpt(a_pVCpu, a_pPtWalk, a_fAccess, a_fSlatFail, a_cbInstr); } while (0)
|
---|
4753 |
|
---|
4754 | /**
|
---|
4755 | * Invokes the VMX VM-exit handler.
|
---|
4756 | */
|
---|
4757 | # define IEM_VMX_VMEXIT_TRIPLE_FAULT_RET(a_pVCpu, a_uExitReason, a_uExitQual) \
|
---|
4758 | do { return iemVmxVmexit((a_pVCpu), (a_uExitReason), (a_uExitQual)); } while (0)
|
---|
4759 |
|
---|
4760 | #else
|
---|
4761 | # define IEM_VMX_IS_ROOT_MODE(a_pVCpu) (false)
|
---|
4762 | # define IEM_VMX_IS_NON_ROOT_MODE(a_pVCpu) (false)
|
---|
4763 | # define IEM_VMX_IS_PINCTLS_SET(a_pVCpu, a_cbInstr) (false)
|
---|
4764 | # define IEM_VMX_IS_PROCCTLS_SET(a_pVCpu, a_cbInstr) (false)
|
---|
4765 | # define IEM_VMX_IS_PROCCTLS2_SET(a_pVCpu, a_cbInstr) (false)
|
---|
4766 | # define IEM_VMX_VMEXIT_INSTR_RET(a_pVCpu, a_uExitReason, a_cbInstr) do { return VERR_VMX_IPE_1; } while (0)
|
---|
4767 | # define IEM_VMX_VMEXIT_INSTR_NEEDS_INFO_RET(a_pVCpu, a_uExitReason, a_uInstrId, a_cbInstr) do { return VERR_VMX_IPE_1; } while (0)
|
---|
4768 | # define IEM_VMX_VMEXIT_TASK_SWITCH_RET(a_pVCpu, a_enmTaskSwitch, a_SelNewTss, a_cbInstr) do { return VERR_VMX_IPE_1; } while (0)
|
---|
4769 | # define IEM_VMX_VMEXIT_MWAIT_RET(a_pVCpu, a_fMonitorArmed, a_cbInstr) do { return VERR_VMX_IPE_1; } while (0)
|
---|
4770 | # define IEM_VMX_VMEXIT_EPT_RET(a_pVCpu, a_pPtWalk, a_fAccess, a_fSlatFail, a_cbInstr) do { return VERR_VMX_IPE_1; } while (0)
|
---|
4771 | # define IEM_VMX_VMEXIT_TRIPLE_FAULT_RET(a_pVCpu, a_uExitReason, a_uExitQual) do { return VERR_VMX_IPE_1; } while (0)
|
---|
4772 |
|
---|
4773 | #endif
|
---|
4774 |
|
---|
4775 | #ifdef VBOX_WITH_NESTED_HWVIRT_SVM
|
---|
4776 | /**
|
---|
4777 | * Checks if we're executing a guest using AMD-V.
|
---|
4778 | */
|
---|
4779 | # define IEM_SVM_IS_IN_GUEST(a_pVCpu) ( (a_pVCpu->iem.s.fExec & (IEM_F_X86_CTX_SVM | IEM_F_X86_CTX_IN_GUEST)) \
|
---|
4780 | == (IEM_F_X86_CTX_SVM | IEM_F_X86_CTX_IN_GUEST))
|
---|
4781 | /**
|
---|
4782 | * Check if an SVM control/instruction intercept is set.
|
---|
4783 | */
|
---|
4784 | # define IEM_SVM_IS_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept) \
|
---|
4785 | (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmCtrlInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_Intercept)))
|
---|
4786 |
|
---|
4787 | /**
|
---|
4788 | * Check if an SVM read CRx intercept is set.
|
---|
4789 | */
|
---|
4790 | # define IEM_SVM_IS_READ_CR_INTERCEPT_SET(a_pVCpu, a_uCr) \
|
---|
4791 | (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmReadCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr)))
|
---|
4792 |
|
---|
4793 | /**
|
---|
4794 | * Check if an SVM write CRx intercept is set.
|
---|
4795 | */
|
---|
4796 | # define IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(a_pVCpu, a_uCr) \
|
---|
4797 | (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmWriteCRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uCr)))
|
---|
4798 |
|
---|
4799 | /**
|
---|
4800 | * Check if an SVM read DRx intercept is set.
|
---|
4801 | */
|
---|
4802 | # define IEM_SVM_IS_READ_DR_INTERCEPT_SET(a_pVCpu, a_uDr) \
|
---|
4803 | (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmReadDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr)))
|
---|
4804 |
|
---|
4805 | /**
|
---|
4806 | * Check if an SVM write DRx intercept is set.
|
---|
4807 | */
|
---|
4808 | # define IEM_SVM_IS_WRITE_DR_INTERCEPT_SET(a_pVCpu, a_uDr) \
|
---|
4809 | (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmWriteDRxInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uDr)))
|
---|
4810 |
|
---|
4811 | /**
|
---|
4812 | * Check if an SVM exception intercept is set.
|
---|
4813 | */
|
---|
4814 | # define IEM_SVM_IS_XCPT_INTERCEPT_SET(a_pVCpu, a_uVector) \
|
---|
4815 | (IEM_SVM_IS_IN_GUEST(a_pVCpu) && CPUMIsGuestSvmXcptInterceptSet(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_uVector)))
|
---|
4816 |
|
---|
4817 | /**
|
---|
4818 | * Invokes the SVM \#VMEXIT handler for the nested-guest.
|
---|
4819 | */
|
---|
4820 | # define IEM_SVM_VMEXIT_RET(a_pVCpu, a_uExitCode, a_uExitInfo1, a_uExitInfo2) \
|
---|
4821 | do { return iemSvmVmexit((a_pVCpu), (a_uExitCode), (a_uExitInfo1), (a_uExitInfo2)); } while (0)
|
---|
4822 |
|
---|
4823 | /**
|
---|
4824 | * Invokes the 'MOV CRx' SVM \#VMEXIT handler after constructing the
|
---|
4825 | * corresponding decode assist information.
|
---|
4826 | */
|
---|
4827 | # define IEM_SVM_CRX_VMEXIT_RET(a_pVCpu, a_uExitCode, a_enmAccessCrX, a_iGReg) \
|
---|
4828 | do \
|
---|
4829 | { \
|
---|
4830 | uint64_t uExitInfo1; \
|
---|
4831 | if ( IEM_GET_GUEST_CPU_FEATURES(a_pVCpu)->fSvmDecodeAssists \
|
---|
4832 | && (a_enmAccessCrX) == IEMACCESSCRX_MOV_CRX) \
|
---|
4833 | uExitInfo1 = SVM_EXIT1_MOV_CRX_MASK | ((a_iGReg) & 7); \
|
---|
4834 | else \
|
---|
4835 | uExitInfo1 = 0; \
|
---|
4836 | IEM_SVM_VMEXIT_RET(a_pVCpu, a_uExitCode, uExitInfo1, 0); \
|
---|
4837 | } while (0)
|
---|
4838 |
|
---|
4839 | /** Check and handles SVM nested-guest instruction intercept and updates
|
---|
4840 | * NRIP if needed.
|
---|
4841 | */
|
---|
4842 | # define IEM_SVM_CHECK_INSTR_INTERCEPT(a_pVCpu, a_Intercept, a_uExitCode, a_uExitInfo1, a_uExitInfo2, a_cbInstr) \
|
---|
4843 | do \
|
---|
4844 | { \
|
---|
4845 | if (IEM_SVM_IS_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept)) \
|
---|
4846 | { \
|
---|
4847 | IEM_SVM_UPDATE_NRIP(a_pVCpu, a_cbInstr); \
|
---|
4848 | IEM_SVM_VMEXIT_RET(a_pVCpu, a_uExitCode, a_uExitInfo1, a_uExitInfo2); \
|
---|
4849 | } \
|
---|
4850 | } while (0)
|
---|
4851 |
|
---|
4852 | /** Checks and handles SVM nested-guest CR0 read intercept. */
|
---|
4853 | # define IEM_SVM_CHECK_READ_CR0_INTERCEPT(a_pVCpu, a_uExitInfo1, a_uExitInfo2, a_cbInstr) \
|
---|
4854 | do \
|
---|
4855 | { \
|
---|
4856 | if (!IEM_SVM_IS_READ_CR_INTERCEPT_SET(a_pVCpu, 0)) \
|
---|
4857 | { /* probably likely */ } \
|
---|
4858 | else \
|
---|
4859 | { \
|
---|
4860 | IEM_SVM_UPDATE_NRIP(a_pVCpu, a_cbInstr); \
|
---|
4861 | IEM_SVM_VMEXIT_RET(a_pVCpu, SVM_EXIT_READ_CR0, a_uExitInfo1, a_uExitInfo2); \
|
---|
4862 | } \
|
---|
4863 | } while (0)
|
---|
4864 |
|
---|
4865 | /**
|
---|
4866 | * Updates the NextRIP (NRI) field in the nested-guest VMCB.
|
---|
4867 | */
|
---|
4868 | # define IEM_SVM_UPDATE_NRIP(a_pVCpu, a_cbInstr) \
|
---|
4869 | do { \
|
---|
4870 | if (IEM_GET_GUEST_CPU_FEATURES(a_pVCpu)->fSvmNextRipSave) \
|
---|
4871 | CPUMGuestSvmUpdateNRip(a_pVCpu, IEM_GET_CTX(a_pVCpu), (a_cbInstr)); \
|
---|
4872 | } while (0)
|
---|
4873 |
|
---|
4874 | #else
|
---|
4875 | # define IEM_SVM_IS_CTRL_INTERCEPT_SET(a_pVCpu, a_Intercept) (false)
|
---|
4876 | # define IEM_SVM_IS_READ_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (false)
|
---|
4877 | # define IEM_SVM_IS_WRITE_CR_INTERCEPT_SET(a_pVCpu, a_uCr) (false)
|
---|
4878 | # define IEM_SVM_IS_READ_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (false)
|
---|
4879 | # define IEM_SVM_IS_WRITE_DR_INTERCEPT_SET(a_pVCpu, a_uDr) (false)
|
---|
4880 | # define IEM_SVM_IS_XCPT_INTERCEPT_SET(a_pVCpu, a_uVector) (false)
|
---|
4881 | # define IEM_SVM_VMEXIT_RET(a_pVCpu, a_uExitCode, a_uExitInfo1, a_uExitInfo2) do { return VERR_SVM_IPE_1; } while (0)
|
---|
4882 | # define IEM_SVM_CRX_VMEXIT_RET(a_pVCpu, a_uExitCode, a_enmAccessCrX, a_iGReg) do { return VERR_SVM_IPE_1; } while (0)
|
---|
4883 | # define IEM_SVM_CHECK_INSTR_INTERCEPT(a_pVCpu, a_Intercept, a_uExitCode, \
|
---|
4884 | a_uExitInfo1, a_uExitInfo2, a_cbInstr) do { } while (0)
|
---|
4885 | # define IEM_SVM_CHECK_READ_CR0_INTERCEPT(a_pVCpu, a_uExitInfo1, a_uExitInfo2, a_cbInstr) do { } while (0)
|
---|
4886 | # define IEM_SVM_UPDATE_NRIP(a_pVCpu, a_cbInstr) do { } while (0)
|
---|
4887 |
|
---|
4888 | #endif
|
---|
4889 |
|
---|
4890 | /** @} */
|
---|
4891 |
|
---|
4892 | uint32_t iemCalcExecDbgFlagsSlow(PVMCPUCC pVCpu);
|
---|
4893 | VBOXSTRICTRC iemExecInjectPendingTrap(PVMCPUCC pVCpu);
|
---|
4894 |
|
---|
4895 |
|
---|
4896 | /**
|
---|
4897 | * Selector descriptor table entry as fetched by iemMemFetchSelDesc.
|
---|
4898 | */
|
---|
4899 | typedef union IEMSELDESC
|
---|
4900 | {
|
---|
4901 | /** The legacy view. */
|
---|
4902 | X86DESC Legacy;
|
---|
4903 | /** The long mode view. */
|
---|
4904 | X86DESC64 Long;
|
---|
4905 | } IEMSELDESC;
|
---|
4906 | /** Pointer to a selector descriptor table entry. */
|
---|
4907 | typedef IEMSELDESC *PIEMSELDESC;
|
---|
4908 |
|
---|
4909 | /** @name Raising Exceptions.
|
---|
4910 | * @{ */
|
---|
4911 | VBOXSTRICTRC iemTaskSwitch(PVMCPUCC pVCpu, IEMTASKSWITCH enmTaskSwitch, uint32_t uNextEip, uint32_t fFlags,
|
---|
4912 | uint16_t uErr, uint64_t uCr2, RTSEL SelTSS, PIEMSELDESC pNewDescTSS) RT_NOEXCEPT;
|
---|
4913 |
|
---|
4914 | VBOXSTRICTRC iemRaiseXcptOrInt(PVMCPUCC pVCpu, uint8_t cbInstr, uint8_t u8Vector, uint32_t fFlags,
|
---|
4915 | uint16_t uErr, uint64_t uCr2) RT_NOEXCEPT;
|
---|
4916 | #ifdef IEM_WITH_SETJMP
|
---|
4917 | DECL_NO_RETURN(void) iemRaiseXcptOrIntJmp(PVMCPUCC pVCpu, uint8_t cbInstr, uint8_t u8Vector,
|
---|
4918 | uint32_t fFlags, uint16_t uErr, uint64_t uCr2) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
4919 | #endif
|
---|
4920 | VBOXSTRICTRC iemRaiseDivideError(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4921 | VBOXSTRICTRC iemRaiseDebugException(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4922 | VBOXSTRICTRC iemRaiseBoundRangeExceeded(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4923 | VBOXSTRICTRC iemRaiseUndefinedOpcode(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4924 | VBOXSTRICTRC iemRaiseDeviceNotAvailable(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4925 | VBOXSTRICTRC iemRaiseTaskSwitchFaultWithErr(PVMCPUCC pVCpu, uint16_t uErr) RT_NOEXCEPT;
|
---|
4926 | VBOXSTRICTRC iemRaiseTaskSwitchFaultCurrentTSS(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4927 | VBOXSTRICTRC iemRaiseTaskSwitchFault0(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4928 | VBOXSTRICTRC iemRaiseTaskSwitchFaultBySelector(PVMCPUCC pVCpu, uint16_t uSel) RT_NOEXCEPT;
|
---|
4929 | /*VBOXSTRICTRC iemRaiseSelectorNotPresent(PVMCPUCC pVCpu, uint32_t iSegReg, uint32_t fAccess) RT_NOEXCEPT;*/
|
---|
4930 | VBOXSTRICTRC iemRaiseSelectorNotPresentWithErr(PVMCPUCC pVCpu, uint16_t uErr) RT_NOEXCEPT;
|
---|
4931 | VBOXSTRICTRC iemRaiseSelectorNotPresentBySelector(PVMCPUCC pVCpu, uint16_t uSel) RT_NOEXCEPT;
|
---|
4932 | VBOXSTRICTRC iemRaiseStackSelectorNotPresentBySelector(PVMCPUCC pVCpu, uint16_t uSel) RT_NOEXCEPT;
|
---|
4933 | VBOXSTRICTRC iemRaiseStackSelectorNotPresentWithErr(PVMCPUCC pVCpu, uint16_t uErr) RT_NOEXCEPT;
|
---|
4934 | VBOXSTRICTRC iemRaiseGeneralProtectionFault(PVMCPUCC pVCpu, uint16_t uErr) RT_NOEXCEPT;
|
---|
4935 | VBOXSTRICTRC iemRaiseGeneralProtectionFault0(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4936 | #ifdef IEM_WITH_SETJMP
|
---|
4937 | DECL_NO_RETURN(void) iemRaiseGeneralProtectionFault0Jmp(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
4938 | #endif
|
---|
4939 | VBOXSTRICTRC iemRaiseGeneralProtectionFaultBySelector(PVMCPUCC pVCpu, RTSEL Sel) RT_NOEXCEPT;
|
---|
4940 | VBOXSTRICTRC iemRaiseNotCanonical(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4941 | VBOXSTRICTRC iemRaiseSelectorBounds(PVMCPUCC pVCpu, uint32_t iSegReg, uint32_t fAccess) RT_NOEXCEPT;
|
---|
4942 | #ifdef IEM_WITH_SETJMP
|
---|
4943 | DECL_NO_RETURN(void) iemRaiseSelectorBoundsJmp(PVMCPUCC pVCpu, uint32_t iSegReg, uint32_t fAccess) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
4944 | #endif
|
---|
4945 | VBOXSTRICTRC iemRaiseSelectorBoundsBySelector(PVMCPUCC pVCpu, RTSEL Sel) RT_NOEXCEPT;
|
---|
4946 | #ifdef IEM_WITH_SETJMP
|
---|
4947 | DECL_NO_RETURN(void) iemRaiseSelectorBoundsBySelectorJmp(PVMCPUCC pVCpu, RTSEL Sel) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
4948 | #endif
|
---|
4949 | VBOXSTRICTRC iemRaiseSelectorInvalidAccess(PVMCPUCC pVCpu, uint32_t iSegReg, uint32_t fAccess) RT_NOEXCEPT;
|
---|
4950 | #ifdef IEM_WITH_SETJMP
|
---|
4951 | DECL_NO_RETURN(void) iemRaiseSelectorInvalidAccessJmp(PVMCPUCC pVCpu, uint32_t iSegReg, uint32_t fAccess) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
4952 | #endif
|
---|
4953 | VBOXSTRICTRC iemRaisePageFault(PVMCPUCC pVCpu, RTGCPTR GCPtrWhere, uint32_t cbAccess, uint32_t fAccess, int rc) RT_NOEXCEPT;
|
---|
4954 | #ifdef IEM_WITH_SETJMP
|
---|
4955 | DECL_NO_RETURN(void) iemRaisePageFaultJmp(PVMCPUCC pVCpu, RTGCPTR GCPtrWhere, uint32_t cbAccess, uint32_t fAccess, int rc) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
4956 | #endif
|
---|
4957 | VBOXSTRICTRC iemRaiseMathFault(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4958 | VBOXSTRICTRC iemRaiseAlignmentCheckException(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4959 | #ifdef IEM_WITH_SETJMP
|
---|
4960 | DECL_NO_RETURN(void) iemRaiseAlignmentCheckExceptionJmp(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
4961 | #endif
|
---|
4962 | VBOXSTRICTRC iemRaiseSimdFpException(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
4963 |
|
---|
4964 | void iemLogSyscallProtModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr);
|
---|
4965 |
|
---|
4966 | IEM_CIMPL_DEF_0(iemCImplRaiseDivideError);
|
---|
4967 | IEM_CIMPL_DEF_0(iemCImplRaiseInvalidLockPrefix);
|
---|
4968 | IEM_CIMPL_DEF_0(iemCImplRaiseInvalidOpcode);
|
---|
4969 |
|
---|
4970 | /**
|
---|
4971 | * Macro for calling iemCImplRaiseDivideError().
|
---|
4972 | *
|
---|
4973 | * This is for things that will _always_ decode to an \#DE, taking the
|
---|
4974 | * recompiler into consideration and everything.
|
---|
4975 | *
|
---|
4976 | * @return Strict VBox status code.
|
---|
4977 | */
|
---|
4978 | #define IEMOP_RAISE_DIVIDE_ERROR_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, 0, iemCImplRaiseDivideError)
|
---|
4979 |
|
---|
4980 | /**
|
---|
4981 | * Macro for calling iemCImplRaiseInvalidLockPrefix().
|
---|
4982 | *
|
---|
4983 | * This is for things that will _always_ decode to an \#UD, taking the
|
---|
4984 | * recompiler into consideration and everything.
|
---|
4985 | *
|
---|
4986 | * @return Strict VBox status code.
|
---|
4987 | */
|
---|
4988 | #define IEMOP_RAISE_INVALID_LOCK_PREFIX_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, 0, iemCImplRaiseInvalidLockPrefix)
|
---|
4989 |
|
---|
4990 | /**
|
---|
4991 | * Macro for calling iemCImplRaiseInvalidOpcode() for decode/static \#UDs.
|
---|
4992 | *
|
---|
4993 | * This is for things that will _always_ decode to an \#UD, taking the
|
---|
4994 | * recompiler into consideration and everything.
|
---|
4995 | *
|
---|
4996 | * @return Strict VBox status code.
|
---|
4997 | */
|
---|
4998 | #define IEMOP_RAISE_INVALID_OPCODE_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, 0, iemCImplRaiseInvalidOpcode)
|
---|
4999 |
|
---|
5000 | /**
|
---|
5001 | * Macro for calling iemCImplRaiseInvalidOpcode() for runtime-style \#UDs.
|
---|
5002 | *
|
---|
5003 | * Using this macro means you've got _buggy_ _code_ and are doing things that
|
---|
5004 | * belongs exclusively in IEMAllCImpl.cpp during decoding.
|
---|
5005 | *
|
---|
5006 | * @return Strict VBox status code.
|
---|
5007 | * @see IEMOP_RAISE_INVALID_OPCODE_RET
|
---|
5008 | */
|
---|
5009 | #define IEMOP_RAISE_INVALID_OPCODE_RUNTIME_RET() IEM_MC_DEFER_TO_CIMPL_0_RET(IEM_CIMPL_F_XCPT, 0, iemCImplRaiseInvalidOpcode)
|
---|
5010 |
|
---|
5011 | /** @} */
|
---|
5012 |
|
---|
5013 | /** @name Register Access.
|
---|
5014 | * @{ */
|
---|
5015 | VBOXSTRICTRC iemRegRipRelativeJumpS8AndFinishClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr, int8_t offNextInstr,
|
---|
5016 | IEMMODE enmEffOpSize) RT_NOEXCEPT;
|
---|
5017 | VBOXSTRICTRC iemRegRipRelativeJumpS16AndFinishClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr, int16_t offNextInstr) RT_NOEXCEPT;
|
---|
5018 | VBOXSTRICTRC iemRegRipRelativeJumpS32AndFinishClearingRF(PVMCPUCC pVCpu, uint8_t cbInstr, int32_t offNextInstr,
|
---|
5019 | IEMMODE enmEffOpSize) RT_NOEXCEPT;
|
---|
5020 | /** @} */
|
---|
5021 |
|
---|
5022 | /** @name FPU access and helpers.
|
---|
5023 | * @{ */
|
---|
5024 | void iemFpuPushResult(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5025 | void iemFpuPushResultWithMemOp(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint8_t iEffSeg, RTGCPTR GCPtrEff, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5026 | void iemFpuPushResultTwo(PVMCPUCC pVCpu, PIEMFPURESULTTWO pResult, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5027 | void iemFpuStoreResult(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint8_t iStReg, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5028 | void iemFpuStoreResultThenPop(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint8_t iStReg, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5029 | void iemFpuStoreResultWithMemOp(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint8_t iStReg,
|
---|
5030 | uint8_t iEffSeg, RTGCPTR GCPtrEff, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5031 | void iemFpuStoreResultWithMemOpThenPop(PVMCPUCC pVCpu, PIEMFPURESULT pResult, uint8_t iStReg,
|
---|
5032 | uint8_t iEffSeg, RTGCPTR GCPtrEff, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5033 | void iemFpuUpdateOpcodeAndIp(PVMCPUCC pVCpu, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5034 | void iemFpuUpdateFSW(PVMCPUCC pVCpu, uint16_t u16FSW, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5035 | void iemFpuUpdateFSWThenPop(PVMCPUCC pVCpu, uint16_t u16FSW, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5036 | void iemFpuUpdateFSWWithMemOp(PVMCPUCC pVCpu, uint16_t u16FSW, uint8_t iEffSeg, RTGCPTR GCPtrEff, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5037 | void iemFpuUpdateFSWThenPopPop(PVMCPUCC pVCpu, uint16_t u16FSW, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5038 | void iemFpuUpdateFSWWithMemOpThenPop(PVMCPUCC pVCpu, uint16_t u16FSW, uint8_t iEffSeg, RTGCPTR GCPtrEff, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5039 | void iemFpuStackUnderflow(PVMCPUCC pVCpu, uint8_t iStReg, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5040 | void iemFpuStackUnderflowWithMemOp(PVMCPUCC pVCpu, uint8_t iStReg, uint8_t iEffSeg, RTGCPTR GCPtrEff, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5041 | void iemFpuStackUnderflowThenPop(PVMCPUCC pVCpu, uint8_t iStReg, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5042 | void iemFpuStackUnderflowWithMemOpThenPop(PVMCPUCC pVCpu, uint8_t iStReg, uint8_t iEffSeg, RTGCPTR GCPtrEff, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5043 | void iemFpuStackUnderflowThenPopPop(PVMCPUCC pVCpu, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5044 | void iemFpuStackPushUnderflow(PVMCPUCC pVCpu, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5045 | void iemFpuStackPushUnderflowTwo(PVMCPUCC pVCpu, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5046 | void iemFpuStackPushOverflow(PVMCPUCC pVCpu, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5047 | void iemFpuStackPushOverflowWithMemOp(PVMCPUCC pVCpu, uint8_t iEffSeg, RTGCPTR GCPtrEff, uint16_t uFpuOpcode) RT_NOEXCEPT;
|
---|
5048 | /** @} */
|
---|
5049 |
|
---|
5050 | /** @name SSE+AVX SIMD access and helpers.
|
---|
5051 | * @{ */
|
---|
5052 | void iemSseStoreResult(PVMCPUCC pVCpu, PCIEMSSERESULT pResult, uint8_t iXmmReg) RT_NOEXCEPT;
|
---|
5053 | void iemSseUpdateMxcsr(PVMCPUCC pVCpu, uint32_t fMxcsr) RT_NOEXCEPT;
|
---|
5054 | /** @} */
|
---|
5055 |
|
---|
5056 | /** @name Memory access.
|
---|
5057 | * @{ */
|
---|
5058 |
|
---|
5059 | /** Report a \#GP instead of \#AC and do not restrict to ring-3 */
|
---|
5060 | #define IEM_MEMMAP_F_ALIGN_GP RT_BIT_32(16)
|
---|
5061 | /** SSE access that should report a \#GP instead of \#AC, unless MXCSR.MM=1
|
---|
5062 | * when it works like normal \#AC. Always used with IEM_MEMMAP_F_ALIGN_GP. */
|
---|
5063 | #define IEM_MEMMAP_F_ALIGN_SSE RT_BIT_32(17)
|
---|
5064 | /** If \#AC is applicable, raise it. Always used with IEM_MEMMAP_F_ALIGN_GP.
|
---|
5065 | * Users include FXSAVE & FXRSTOR. */
|
---|
5066 | #define IEM_MEMMAP_F_ALIGN_GP_OR_AC RT_BIT_32(18)
|
---|
5067 |
|
---|
5068 | VBOXSTRICTRC iemMemMap(PVMCPUCC pVCpu, void **ppvMem, uint8_t *pbUnmapInfo, size_t cbMem, uint8_t iSegReg, RTGCPTR GCPtrMem,
|
---|
5069 | uint32_t fAccess, uint32_t uAlignCtl) RT_NOEXCEPT;
|
---|
5070 | VBOXSTRICTRC iemMemCommitAndUnmap(PVMCPUCC pVCpu, uint8_t bUnmapInfo) RT_NOEXCEPT;
|
---|
5071 | #ifndef IN_RING3
|
---|
5072 | VBOXSTRICTRC iemMemCommitAndUnmapPostponeTroubleToR3(PVMCPUCC pVCpu, uint8_t bUnmapInfo) RT_NOEXCEPT;
|
---|
5073 | #endif
|
---|
5074 | void iemMemRollbackAndUnmap(PVMCPUCC pVCpu, uint8_t bUnmapInfo) RT_NOEXCEPT;
|
---|
5075 | void iemMemRollback(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
5076 | VBOXSTRICTRC iemMemApplySegment(PVMCPUCC pVCpu, uint32_t fAccess, uint8_t iSegReg, size_t cbMem, PRTGCPTR pGCPtrMem) RT_NOEXCEPT;
|
---|
5077 | VBOXSTRICTRC iemMemMarkSelDescAccessed(PVMCPUCC pVCpu, uint16_t uSel) RT_NOEXCEPT;
|
---|
5078 | VBOXSTRICTRC iemMemPageTranslateAndCheckAccess(PVMCPUCC pVCpu, RTGCPTR GCPtrMem, uint32_t cbAccess, uint32_t fAccess, PRTGCPHYS pGCPhysMem) RT_NOEXCEPT;
|
---|
5079 |
|
---|
5080 | void iemOpcodeFlushLight(PVMCPUCC pVCpu, uint8_t cbInstr);
|
---|
5081 | void iemOpcodeFlushHeavy(PVMCPUCC pVCpu, uint8_t cbInstr);
|
---|
5082 | #ifdef IEM_WITH_CODE_TLB
|
---|
5083 | void iemOpcodeFetchBytesJmp(PVMCPUCC pVCpu, size_t cbDst, void *pvDst) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5084 | #else
|
---|
5085 | VBOXSTRICTRC iemOpcodeFetchMoreBytes(PVMCPUCC pVCpu, size_t cbMin) RT_NOEXCEPT;
|
---|
5086 | #endif
|
---|
5087 | #ifdef IEM_WITH_SETJMP
|
---|
5088 | uint8_t iemOpcodeGetNextU8SlowJmp(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5089 | uint16_t iemOpcodeGetNextU16SlowJmp(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5090 | uint32_t iemOpcodeGetNextU32SlowJmp(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5091 | uint64_t iemOpcodeGetNextU64SlowJmp(PVMCPUCC pVCpu) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5092 | #else
|
---|
5093 | VBOXSTRICTRC iemOpcodeGetNextU8Slow(PVMCPUCC pVCpu, uint8_t *pb) RT_NOEXCEPT;
|
---|
5094 | VBOXSTRICTRC iemOpcodeGetNextS8SxU16Slow(PVMCPUCC pVCpu, uint16_t *pu16) RT_NOEXCEPT;
|
---|
5095 | VBOXSTRICTRC iemOpcodeGetNextS8SxU32Slow(PVMCPUCC pVCpu, uint32_t *pu32) RT_NOEXCEPT;
|
---|
5096 | VBOXSTRICTRC iemOpcodeGetNextS8SxU64Slow(PVMCPUCC pVCpu, uint64_t *pu64) RT_NOEXCEPT;
|
---|
5097 | VBOXSTRICTRC iemOpcodeGetNextU16Slow(PVMCPUCC pVCpu, uint16_t *pu16) RT_NOEXCEPT;
|
---|
5098 | VBOXSTRICTRC iemOpcodeGetNextU16ZxU32Slow(PVMCPUCC pVCpu, uint32_t *pu32) RT_NOEXCEPT;
|
---|
5099 | VBOXSTRICTRC iemOpcodeGetNextU16ZxU64Slow(PVMCPUCC pVCpu, uint64_t *pu64) RT_NOEXCEPT;
|
---|
5100 | VBOXSTRICTRC iemOpcodeGetNextU32Slow(PVMCPUCC pVCpu, uint32_t *pu32) RT_NOEXCEPT;
|
---|
5101 | VBOXSTRICTRC iemOpcodeGetNextU32ZxU64Slow(PVMCPUCC pVCpu, uint64_t *pu64) RT_NOEXCEPT;
|
---|
5102 | VBOXSTRICTRC iemOpcodeGetNextS32SxU64Slow(PVMCPUCC pVCpu, uint64_t *pu64) RT_NOEXCEPT;
|
---|
5103 | VBOXSTRICTRC iemOpcodeGetNextU64Slow(PVMCPUCC pVCpu, uint64_t *pu64) RT_NOEXCEPT;
|
---|
5104 | #endif
|
---|
5105 |
|
---|
5106 | VBOXSTRICTRC iemMemFetchDataU8(PVMCPUCC pVCpu, uint8_t *pu8Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5107 | VBOXSTRICTRC iemMemFetchDataU16(PVMCPUCC pVCpu, uint16_t *pu16Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5108 | VBOXSTRICTRC iemMemFetchDataU32(PVMCPUCC pVCpu, uint32_t *pu32Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5109 | VBOXSTRICTRC iemMemFetchDataU32_ZX_U64(PVMCPUCC pVCpu, uint64_t *pu64Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5110 | VBOXSTRICTRC iemMemFetchDataU64(PVMCPUCC pVCpu, uint64_t *pu64Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5111 | VBOXSTRICTRC iemMemFetchDataU64AlignedU128(PVMCPUCC pVCpu, uint64_t *pu64Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5112 | VBOXSTRICTRC iemMemFetchDataR80(PVMCPUCC pVCpu, PRTFLOAT80U pr80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5113 | VBOXSTRICTRC iemMemFetchDataD80(PVMCPUCC pVCpu, PRTPBCD80U pd80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5114 | VBOXSTRICTRC iemMemFetchDataU128(PVMCPUCC pVCpu, PRTUINT128U pu128Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5115 | VBOXSTRICTRC iemMemFetchDataU128AlignedSse(PVMCPUCC pVCpu, PRTUINT128U pu128Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5116 | VBOXSTRICTRC iemMemFetchDataU256(PVMCPUCC pVCpu, PRTUINT256U pu256Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5117 | VBOXSTRICTRC iemMemFetchDataU256AlignedSse(PVMCPUCC pVCpu, PRTUINT256U pu256Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5118 | VBOXSTRICTRC iemMemFetchDataXdtr(PVMCPUCC pVCpu, uint16_t *pcbLimit, PRTGCPTR pGCPtrBase, uint8_t iSegReg,
|
---|
5119 | RTGCPTR GCPtrMem, IEMMODE enmOpSize) RT_NOEXCEPT;
|
---|
5120 | #ifdef IEM_WITH_SETJMP
|
---|
5121 | uint8_t iemMemFetchDataU8SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5122 | uint16_t iemMemFetchDataU16SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5123 | uint32_t iemMemFetchDataU32SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5124 | uint32_t iemMemFlatFetchDataU32SafeJmp(PVMCPUCC pVCpu, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5125 | uint64_t iemMemFetchDataU64SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5126 | uint64_t iemMemFetchDataU64AlignedU128SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5127 | void iemMemFetchDataR80SafeJmp(PVMCPUCC pVCpu, PRTFLOAT80U pr80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5128 | void iemMemFetchDataD80SafeJmp(PVMCPUCC pVCpu, PRTPBCD80U pd80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5129 | void iemMemFetchDataU128SafeJmp(PVMCPUCC pVCpu, PRTUINT128U pu128Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5130 | void iemMemFetchDataU128AlignedSseSafeJmp(PVMCPUCC pVCpu, PRTUINT128U pu128Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5131 | void iemMemFetchDataU256SafeJmp(PVMCPUCC pVCpu, PRTUINT256U pu256Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5132 | void iemMemFetchDataU256AlignedSseSafeJmp(PVMCPUCC pVCpu, PRTUINT256U pu256Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5133 | # if 0 /* these are inlined now */
|
---|
5134 | uint8_t iemMemFetchDataU8Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5135 | uint16_t iemMemFetchDataU16Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5136 | uint32_t iemMemFetchDataU32Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5137 | uint32_t iemMemFlatFetchDataU32Jmp(PVMCPUCC pVCpu, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5138 | uint64_t iemMemFetchDataU64Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5139 | uint64_t iemMemFetchDataU64AlignedU128Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5140 | void iemMemFetchDataR80Jmp(PVMCPUCC pVCpu, PRTFLOAT80U pr80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5141 | void iemMemFetchDataD80Jmp(PVMCPUCC pVCpu, PRTPBCD80U pd80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5142 | void iemMemFetchDataU128Jmp(PVMCPUCC pVCpu, PRTUINT128U pu128Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5143 | # endif
|
---|
5144 | void iemMemFetchDataU128AlignedSseJmp(PVMCPUCC pVCpu, PRTUINT128U pu128Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5145 | void iemMemFetchDataU256Jmp(PVMCPUCC pVCpu, PRTUINT256U pu256Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5146 | void iemMemFetchDataU256AlignedSseJmp(PVMCPUCC pVCpu, PRTUINT256U pu256Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5147 | #endif
|
---|
5148 |
|
---|
5149 | VBOXSTRICTRC iemMemFetchSysU8(PVMCPUCC pVCpu, uint8_t *pu8Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5150 | VBOXSTRICTRC iemMemFetchSysU16(PVMCPUCC pVCpu, uint16_t *pu16Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5151 | VBOXSTRICTRC iemMemFetchSysU32(PVMCPUCC pVCpu, uint32_t *pu32Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5152 | VBOXSTRICTRC iemMemFetchSysU64(PVMCPUCC pVCpu, uint64_t *pu64Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5153 | VBOXSTRICTRC iemMemFetchSelDesc(PVMCPUCC pVCpu, PIEMSELDESC pDesc, uint16_t uSel, uint8_t uXcpt) RT_NOEXCEPT;
|
---|
5154 |
|
---|
5155 | VBOXSTRICTRC iemMemStoreDataU8(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint8_t u8Value) RT_NOEXCEPT;
|
---|
5156 | VBOXSTRICTRC iemMemStoreDataU16(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint16_t u16Value) RT_NOEXCEPT;
|
---|
5157 | VBOXSTRICTRC iemMemStoreDataU32(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint32_t u32Value) RT_NOEXCEPT;
|
---|
5158 | VBOXSTRICTRC iemMemStoreDataU64(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint64_t u64Value) RT_NOEXCEPT;
|
---|
5159 | VBOXSTRICTRC iemMemStoreDataU128(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, RTUINT128U u128Value) RT_NOEXCEPT;
|
---|
5160 | VBOXSTRICTRC iemMemStoreDataU128AlignedSse(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, RTUINT128U u128Value) RT_NOEXCEPT;
|
---|
5161 | VBOXSTRICTRC iemMemStoreDataU256(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) RT_NOEXCEPT;
|
---|
5162 | VBOXSTRICTRC iemMemStoreDataU256AlignedAvx(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) RT_NOEXCEPT;
|
---|
5163 | VBOXSTRICTRC iemMemStoreDataXdtr(PVMCPUCC pVCpu, uint16_t cbLimit, RTGCPTR GCPtrBase, uint8_t iSegReg, RTGCPTR GCPtrMem) RT_NOEXCEPT;
|
---|
5164 | #ifdef IEM_WITH_SETJMP
|
---|
5165 | void iemMemStoreDataU8SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint8_t u8Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5166 | void iemMemStoreDataU16SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint16_t u16Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5167 | void iemMemStoreDataU32SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint32_t u32Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5168 | void iemMemStoreDataU64SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint64_t u64Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5169 | void iemMemStoreDataU128SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT128U u128Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5170 | void iemMemStoreDataU128AlignedSseSafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, RTUINT128U u128Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5171 | void iemMemStoreDataU256SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5172 | void iemMemStoreDataU256AlignedAvxSafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5173 | void iemMemStoreDataR80SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTFLOAT80U pr80Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5174 | void iemMemStoreDataD80SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTPBCD80U pd80Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5175 | #if 0
|
---|
5176 | void iemMemStoreDataU8Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint8_t u8Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5177 | void iemMemStoreDataU16Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint16_t u16Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5178 | void iemMemStoreDataU32Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint32_t u32Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5179 | void iemMemStoreDataU64Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint64_t u64Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5180 | void iemMemStoreDataU128Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, RTUINT128U u128Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5181 | #endif
|
---|
5182 | void iemMemStoreDataU128AlignedSseJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, RTUINT128U u128Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5183 | void iemMemStoreDataU256Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5184 | void iemMemStoreDataU256AlignedAvxJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5185 | #endif
|
---|
5186 |
|
---|
5187 | #ifdef IEM_WITH_SETJMP
|
---|
5188 | uint8_t *iemMemMapDataU8RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5189 | uint8_t *iemMemMapDataU8WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5190 | uint8_t const *iemMemMapDataU8RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5191 | uint16_t *iemMemMapDataU16RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5192 | uint16_t *iemMemMapDataU16WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5193 | uint16_t const *iemMemMapDataU16RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5194 | uint32_t *iemMemMapDataU32RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5195 | uint32_t *iemMemMapDataU32WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5196 | uint32_t const *iemMemMapDataU32RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5197 | uint64_t *iemMemMapDataU64RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5198 | uint64_t *iemMemMapDataU64WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5199 | uint64_t const *iemMemMapDataU64RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5200 | PRTFLOAT80U iemMemMapDataR80RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5201 | PRTFLOAT80U iemMemMapDataR80WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5202 | PCRTFLOAT80U iemMemMapDataR80RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5203 | PRTPBCD80U iemMemMapDataD80RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5204 | PRTPBCD80U iemMemMapDataD80WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5205 | PCRTPBCD80U iemMemMapDataD80RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5206 | PRTUINT128U iemMemMapDataU128RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5207 | PRTUINT128U iemMemMapDataU128WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5208 | PCRTUINT128U iemMemMapDataU128RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5209 |
|
---|
5210 | void iemMemCommitAndUnmapJmp(PVMCPUCC pVCpu, uint8_t bUnmapInfo) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5211 | void iemMemCommitAndUnmapRwSafeJmp(PVMCPUCC pVCpu, uint8_t bUnmapInfo) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5212 | void iemMemCommitAndUnmapWoSafeJmp(PVMCPUCC pVCpu, uint8_t bUnmapInfo) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5213 | void iemMemCommitAndUnmapRoSafeJmp(PVMCPUCC pVCpu, uint8_t bUnmapInfo) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5214 | void iemMemRollbackAndUnmapWoSafe(PVMCPUCC pVCpu, uint8_t bUnmapInfo) RT_NOEXCEPT;
|
---|
5215 | #endif
|
---|
5216 |
|
---|
5217 | VBOXSTRICTRC iemMemStackPushBeginSpecial(PVMCPUCC pVCpu, size_t cbMem, uint32_t cbAlign,
|
---|
5218 | void **ppvMem, uint8_t *pbUnmapInfo, uint64_t *puNewRsp) RT_NOEXCEPT;
|
---|
5219 | VBOXSTRICTRC iemMemStackPushCommitSpecial(PVMCPUCC pVCpu, uint8_t bUnmapInfo, uint64_t uNewRsp) RT_NOEXCEPT;
|
---|
5220 | VBOXSTRICTRC iemMemStackPushU16(PVMCPUCC pVCpu, uint16_t u16Value) RT_NOEXCEPT;
|
---|
5221 | VBOXSTRICTRC iemMemStackPushU32(PVMCPUCC pVCpu, uint32_t u32Value) RT_NOEXCEPT;
|
---|
5222 | VBOXSTRICTRC iemMemStackPushU64(PVMCPUCC pVCpu, uint64_t u64Value) RT_NOEXCEPT;
|
---|
5223 | VBOXSTRICTRC iemMemStackPushU16Ex(PVMCPUCC pVCpu, uint16_t u16Value, PRTUINT64U pTmpRsp) RT_NOEXCEPT;
|
---|
5224 | VBOXSTRICTRC iemMemStackPushU32Ex(PVMCPUCC pVCpu, uint32_t u32Value, PRTUINT64U pTmpRsp) RT_NOEXCEPT;
|
---|
5225 | VBOXSTRICTRC iemMemStackPushU64Ex(PVMCPUCC pVCpu, uint64_t u64Value, PRTUINT64U pTmpRsp) RT_NOEXCEPT;
|
---|
5226 | VBOXSTRICTRC iemMemStackPushU32SReg(PVMCPUCC pVCpu, uint32_t u32Value) RT_NOEXCEPT;
|
---|
5227 | VBOXSTRICTRC iemMemStackPopBeginSpecial(PVMCPUCC pVCpu, size_t cbMem, uint32_t cbAlign,
|
---|
5228 | void const **ppvMem, uint8_t *pbUnmapInfo, uint64_t *puNewRsp) RT_NOEXCEPT;
|
---|
5229 | VBOXSTRICTRC iemMemStackPopContinueSpecial(PVMCPUCC pVCpu, size_t off, size_t cbMem,
|
---|
5230 | void const **ppvMem, uint8_t *pbUnmapInfo, uint64_t uCurNewRsp) RT_NOEXCEPT;
|
---|
5231 | VBOXSTRICTRC iemMemStackPopDoneSpecial(PVMCPUCC pVCpu, uint8_t bUnmapInfo) RT_NOEXCEPT;
|
---|
5232 | VBOXSTRICTRC iemMemStackPopU16(PVMCPUCC pVCpu, uint16_t *pu16Value) RT_NOEXCEPT;
|
---|
5233 | VBOXSTRICTRC iemMemStackPopU32(PVMCPUCC pVCpu, uint32_t *pu32Value) RT_NOEXCEPT;
|
---|
5234 | VBOXSTRICTRC iemMemStackPopU64(PVMCPUCC pVCpu, uint64_t *pu64Value) RT_NOEXCEPT;
|
---|
5235 | VBOXSTRICTRC iemMemStackPopU16Ex(PVMCPUCC pVCpu, uint16_t *pu16Value, PRTUINT64U pTmpRsp) RT_NOEXCEPT;
|
---|
5236 | VBOXSTRICTRC iemMemStackPopU32Ex(PVMCPUCC pVCpu, uint32_t *pu32Value, PRTUINT64U pTmpRsp) RT_NOEXCEPT;
|
---|
5237 | VBOXSTRICTRC iemMemStackPopU64Ex(PVMCPUCC pVCpu, uint64_t *pu64Value, PRTUINT64U pTmpRsp) RT_NOEXCEPT;
|
---|
5238 |
|
---|
5239 | #ifdef IEM_WITH_SETJMP
|
---|
5240 | void iemMemStackPushU16SafeJmp(PVMCPUCC pVCpu, uint16_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5241 | void iemMemStackPushU32SafeJmp(PVMCPUCC pVCpu, uint32_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5242 | void iemMemStackPushU32SRegSafeJmp(PVMCPUCC pVCpu, uint32_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5243 | void iemMemStackPushU64SafeJmp(PVMCPUCC pVCpu, uint64_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5244 | void iemMemStackPopGRegU16SafeJmp(PVMCPUCC pVCpu, uint8_t iGReg) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5245 | void iemMemStackPopGRegU32SafeJmp(PVMCPUCC pVCpu, uint8_t iGReg) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5246 | void iemMemStackPopGRegU64SafeJmp(PVMCPUCC pVCpu, uint8_t iGReg) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5247 |
|
---|
5248 | void iemMemFlat32StackPushU16SafeJmp(PVMCPUCC pVCpu, uint16_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5249 | void iemMemFlat32StackPushU32SafeJmp(PVMCPUCC pVCpu, uint32_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5250 | void iemMemFlat32StackPushU32SRegSafeJmp(PVMCPUCC pVCpu, uint32_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5251 | void iemMemFlat32StackPopGRegU16SafeJmp(PVMCPUCC pVCpu, uint8_t iGReg) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5252 | void iemMemFlat32StackPopGRegU32SafeJmp(PVMCPUCC pVCpu, uint8_t iGReg) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5253 |
|
---|
5254 | void iemMemFlat64StackPushU16SafeJmp(PVMCPUCC pVCpu, uint16_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5255 | void iemMemFlat64StackPushU64SafeJmp(PVMCPUCC pVCpu, uint64_t uValue) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5256 | void iemMemFlat64StackPopGRegU16SafeJmp(PVMCPUCC pVCpu, uint8_t iGReg) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5257 | void iemMemFlat64StackPopGRegU64SafeJmp(PVMCPUCC pVCpu, uint8_t iGReg) IEM_NOEXCEPT_MAY_LONGJMP;
|
---|
5258 | #endif
|
---|
5259 |
|
---|
5260 | /** @} */
|
---|
5261 |
|
---|
5262 | /** @name IEMAllCImpl.cpp
|
---|
5263 | * @note sed -e '/IEM_CIMPL_DEF_/!d' -e 's/IEM_CIMPL_DEF_/IEM_CIMPL_PROTO_/' -e 's/$/;/'
|
---|
5264 | * @{ */
|
---|
5265 | IEM_CIMPL_PROTO_2(iemCImpl_pop_mem16, uint16_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5266 | IEM_CIMPL_PROTO_2(iemCImpl_pop_mem32, uint16_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5267 | IEM_CIMPL_PROTO_2(iemCImpl_pop_mem64, uint16_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5268 | IEM_CIMPL_PROTO_0(iemCImpl_popa_16);
|
---|
5269 | IEM_CIMPL_PROTO_0(iemCImpl_popa_32);
|
---|
5270 | IEM_CIMPL_PROTO_0(iemCImpl_pusha_16);
|
---|
5271 | IEM_CIMPL_PROTO_0(iemCImpl_pusha_32);
|
---|
5272 | IEM_CIMPL_PROTO_1(iemCImpl_pushf, IEMMODE, enmEffOpSize);
|
---|
5273 | IEM_CIMPL_PROTO_1(iemCImpl_popf, IEMMODE, enmEffOpSize);
|
---|
5274 | IEM_CIMPL_PROTO_1(iemCImpl_call_16, uint16_t, uNewPC);
|
---|
5275 | IEM_CIMPL_PROTO_1(iemCImpl_call_rel_16, int16_t, offDisp);
|
---|
5276 | IEM_CIMPL_PROTO_1(iemCImpl_call_32, uint32_t, uNewPC);
|
---|
5277 | IEM_CIMPL_PROTO_1(iemCImpl_call_rel_32, int32_t, offDisp);
|
---|
5278 | IEM_CIMPL_PROTO_1(iemCImpl_call_64, uint64_t, uNewPC);
|
---|
5279 | IEM_CIMPL_PROTO_1(iemCImpl_call_rel_64, int64_t, offDisp);
|
---|
5280 | IEM_CIMPL_PROTO_3(iemCImpl_FarJmp, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmEffOpSize);
|
---|
5281 | IEM_CIMPL_PROTO_3(iemCImpl_callf, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmEffOpSize);
|
---|
5282 | typedef IEM_CIMPL_DECL_TYPE_3(FNIEMCIMPLFARBRANCH, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmEffOpSize);
|
---|
5283 | typedef FNIEMCIMPLFARBRANCH *PFNIEMCIMPLFARBRANCH;
|
---|
5284 | IEM_CIMPL_PROTO_2(iemCImpl_retf, IEMMODE, enmEffOpSize, uint16_t, cbPop);
|
---|
5285 | IEM_CIMPL_PROTO_0(iemCImpl_retn_16);
|
---|
5286 | IEM_CIMPL_PROTO_0(iemCImpl_retn_32);
|
---|
5287 | IEM_CIMPL_PROTO_0(iemCImpl_retn_64);
|
---|
5288 | IEM_CIMPL_PROTO_1(iemCImpl_retn_iw_16, uint16_t, cbPop);
|
---|
5289 | IEM_CIMPL_PROTO_1(iemCImpl_retn_iw_32, uint16_t, cbPop);
|
---|
5290 | IEM_CIMPL_PROTO_1(iemCImpl_retn_iw_64, uint16_t, cbPop);
|
---|
5291 | IEM_CIMPL_PROTO_3(iemCImpl_enter, IEMMODE, enmEffOpSize, uint16_t, cbFrame, uint8_t, cParameters);
|
---|
5292 | IEM_CIMPL_PROTO_1(iemCImpl_leave, IEMMODE, enmEffOpSize);
|
---|
5293 | IEM_CIMPL_PROTO_2(iemCImpl_int, uint8_t, u8Int, IEMINT, enmInt);
|
---|
5294 | IEM_CIMPL_PROTO_1(iemCImpl_iret_real_v8086, IEMMODE, enmEffOpSize);
|
---|
5295 | IEM_CIMPL_PROTO_4(iemCImpl_iret_prot_v8086, uint32_t, uNewEip, uint16_t, uNewCs, uint32_t, uNewFlags, uint64_t, uNewRsp);
|
---|
5296 | IEM_CIMPL_PROTO_1(iemCImpl_iret_prot_NestedTask, IEMMODE, enmEffOpSize);
|
---|
5297 | IEM_CIMPL_PROTO_1(iemCImpl_iret_prot, IEMMODE, enmEffOpSize);
|
---|
5298 | IEM_CIMPL_PROTO_1(iemCImpl_iret_64bit, IEMMODE, enmEffOpSize);
|
---|
5299 | IEM_CIMPL_PROTO_1(iemCImpl_iret, IEMMODE, enmEffOpSize);
|
---|
5300 | IEM_CIMPL_PROTO_0(iemCImpl_loadall286);
|
---|
5301 | IEM_CIMPL_PROTO_0(iemCImpl_syscall);
|
---|
5302 | IEM_CIMPL_PROTO_1(iemCImpl_sysret, IEMMODE, enmEffOpSize);
|
---|
5303 | IEM_CIMPL_PROTO_0(iemCImpl_sysenter);
|
---|
5304 | IEM_CIMPL_PROTO_1(iemCImpl_sysexit, IEMMODE, enmEffOpSize);
|
---|
5305 | IEM_CIMPL_PROTO_2(iemCImpl_LoadSReg, uint8_t, iSegReg, uint16_t, uSel);
|
---|
5306 | IEM_CIMPL_PROTO_2(iemCImpl_load_SReg, uint8_t, iSegReg, uint16_t, uSel);
|
---|
5307 | IEM_CIMPL_PROTO_2(iemCImpl_pop_Sreg, uint8_t, iSegReg, IEMMODE, enmEffOpSize);
|
---|
5308 | IEM_CIMPL_PROTO_5(iemCImpl_load_SReg_Greg, uint16_t, uSel, uint64_t, offSeg, uint8_t, iSegReg, uint8_t, iGReg, IEMMODE, enmEffOpSize);
|
---|
5309 | IEM_CIMPL_PROTO_2(iemCImpl_VerX, uint16_t, uSel, bool, fWrite);
|
---|
5310 | IEM_CIMPL_PROTO_3(iemCImpl_LarLsl_u64, uint64_t *, pu64Dst, uint16_t, uSel, bool, fIsLar);
|
---|
5311 | IEM_CIMPL_PROTO_3(iemCImpl_LarLsl_u16, uint16_t *, pu16Dst, uint16_t, uSel, bool, fIsLar);
|
---|
5312 | IEM_CIMPL_PROTO_3(iemCImpl_lgdt, uint8_t, iEffSeg, RTGCPTR, GCPtrEffSrc, IEMMODE, enmEffOpSize);
|
---|
5313 | IEM_CIMPL_PROTO_2(iemCImpl_sgdt, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5314 | IEM_CIMPL_PROTO_3(iemCImpl_lidt, uint8_t, iEffSeg, RTGCPTR, GCPtrEffSrc, IEMMODE, enmEffOpSize);
|
---|
5315 | IEM_CIMPL_PROTO_2(iemCImpl_sidt, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5316 | IEM_CIMPL_PROTO_1(iemCImpl_lldt, uint16_t, uNewLdt);
|
---|
5317 | IEM_CIMPL_PROTO_2(iemCImpl_sldt_reg, uint8_t, iGReg, uint8_t, enmEffOpSize);
|
---|
5318 | IEM_CIMPL_PROTO_2(iemCImpl_sldt_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5319 | IEM_CIMPL_PROTO_1(iemCImpl_ltr, uint16_t, uNewTr);
|
---|
5320 | IEM_CIMPL_PROTO_2(iemCImpl_str_reg, uint8_t, iGReg, uint8_t, enmEffOpSize);
|
---|
5321 | IEM_CIMPL_PROTO_2(iemCImpl_str_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5322 | IEM_CIMPL_PROTO_2(iemCImpl_mov_Rd_Cd, uint8_t, iGReg, uint8_t, iCrReg);
|
---|
5323 | IEM_CIMPL_PROTO_2(iemCImpl_smsw_reg, uint8_t, iGReg, uint8_t, enmEffOpSize);
|
---|
5324 | IEM_CIMPL_PROTO_2(iemCImpl_smsw_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5325 | IEM_CIMPL_PROTO_4(iemCImpl_load_CrX, uint8_t, iCrReg, uint64_t, uNewCrX, IEMACCESSCRX, enmAccessCrX, uint8_t, iGReg);
|
---|
5326 | IEM_CIMPL_PROTO_2(iemCImpl_mov_Cd_Rd, uint8_t, iCrReg, uint8_t, iGReg);
|
---|
5327 | IEM_CIMPL_PROTO_2(iemCImpl_lmsw, uint16_t, u16NewMsw, RTGCPTR, GCPtrEffDst);
|
---|
5328 | IEM_CIMPL_PROTO_0(iemCImpl_clts);
|
---|
5329 | IEM_CIMPL_PROTO_2(iemCImpl_mov_Rd_Dd, uint8_t, iGReg, uint8_t, iDrReg);
|
---|
5330 | IEM_CIMPL_PROTO_2(iemCImpl_mov_Dd_Rd, uint8_t, iDrReg, uint8_t, iGReg);
|
---|
5331 | IEM_CIMPL_PROTO_2(iemCImpl_mov_Rd_Td, uint8_t, iGReg, uint8_t, iTrReg);
|
---|
5332 | IEM_CIMPL_PROTO_2(iemCImpl_mov_Td_Rd, uint8_t, iTrReg, uint8_t, iGReg);
|
---|
5333 | IEM_CIMPL_PROTO_1(iemCImpl_invlpg, RTGCPTR, GCPtrPage);
|
---|
5334 | IEM_CIMPL_PROTO_3(iemCImpl_invpcid, uint8_t, iEffSeg, RTGCPTR, GCPtrInvpcidDesc, uint64_t, uInvpcidType);
|
---|
5335 | IEM_CIMPL_PROTO_0(iemCImpl_invd);
|
---|
5336 | IEM_CIMPL_PROTO_0(iemCImpl_wbinvd);
|
---|
5337 | IEM_CIMPL_PROTO_0(iemCImpl_rsm);
|
---|
5338 | IEM_CIMPL_PROTO_0(iemCImpl_rdtsc);
|
---|
5339 | IEM_CIMPL_PROTO_0(iemCImpl_rdtscp);
|
---|
5340 | IEM_CIMPL_PROTO_0(iemCImpl_rdpmc);
|
---|
5341 | IEM_CIMPL_PROTO_0(iemCImpl_rdmsr);
|
---|
5342 | IEM_CIMPL_PROTO_0(iemCImpl_wrmsr);
|
---|
5343 | IEM_CIMPL_PROTO_3(iemCImpl_in, uint16_t, u16Port, uint8_t, cbReg, uint8_t, bImmAndEffAddrMode);
|
---|
5344 | IEM_CIMPL_PROTO_2(iemCImpl_in_eAX_DX, uint8_t, cbReg, IEMMODE, enmEffAddrMode);
|
---|
5345 | IEM_CIMPL_PROTO_3(iemCImpl_out, uint16_t, u16Port, uint8_t, cbReg, uint8_t, bImmAndEffAddrMode);
|
---|
5346 | IEM_CIMPL_PROTO_2(iemCImpl_out_DX_eAX, uint8_t, cbReg, IEMMODE, enmEffAddrMode);
|
---|
5347 | IEM_CIMPL_PROTO_0(iemCImpl_cli);
|
---|
5348 | IEM_CIMPL_PROTO_0(iemCImpl_sti);
|
---|
5349 | IEM_CIMPL_PROTO_0(iemCImpl_hlt);
|
---|
5350 | IEM_CIMPL_PROTO_1(iemCImpl_monitor, uint8_t, iEffSeg);
|
---|
5351 | IEM_CIMPL_PROTO_0(iemCImpl_mwait);
|
---|
5352 | IEM_CIMPL_PROTO_0(iemCImpl_swapgs);
|
---|
5353 | IEM_CIMPL_PROTO_0(iemCImpl_cpuid);
|
---|
5354 | IEM_CIMPL_PROTO_1(iemCImpl_aad, uint8_t, bImm);
|
---|
5355 | IEM_CIMPL_PROTO_1(iemCImpl_aam, uint8_t, bImm);
|
---|
5356 | IEM_CIMPL_PROTO_0(iemCImpl_daa);
|
---|
5357 | IEM_CIMPL_PROTO_0(iemCImpl_das);
|
---|
5358 | IEM_CIMPL_PROTO_0(iemCImpl_aaa);
|
---|
5359 | IEM_CIMPL_PROTO_0(iemCImpl_aas);
|
---|
5360 | IEM_CIMPL_PROTO_3(iemCImpl_bound_16, int16_t, idxArray, int16_t, idxLowerBound, int16_t, idxUpperBound);
|
---|
5361 | IEM_CIMPL_PROTO_3(iemCImpl_bound_32, int32_t, idxArray, int32_t, idxLowerBound, int32_t, idxUpperBound);
|
---|
5362 | IEM_CIMPL_PROTO_0(iemCImpl_xgetbv);
|
---|
5363 | IEM_CIMPL_PROTO_0(iemCImpl_xsetbv);
|
---|
5364 | IEM_CIMPL_PROTO_5(iemCImpl_cmpxchg16b_fallback_rendezvous, PRTUINT128U, pu128Dst, PRTUINT128U, pu128RaxRdx,
|
---|
5365 | PRTUINT128U, pu128RbxRcx, uint32_t *, pEFlags, uint8_t, bUnmapInfo);
|
---|
5366 | IEM_CIMPL_PROTO_2(iemCImpl_clflush_clflushopt, uint8_t, iEffSeg, RTGCPTR, GCPtrEff);
|
---|
5367 | IEM_CIMPL_PROTO_1(iemCImpl_finit, bool, fCheckXcpts);
|
---|
5368 | IEM_CIMPL_PROTO_3(iemCImpl_fxsave, uint8_t, iEffSeg, RTGCPTR, GCPtrEff, IEMMODE, enmEffOpSize);
|
---|
5369 | IEM_CIMPL_PROTO_3(iemCImpl_fxrstor, uint8_t, iEffSeg, RTGCPTR, GCPtrEff, IEMMODE, enmEffOpSize);
|
---|
5370 | IEM_CIMPL_PROTO_3(iemCImpl_xsave, uint8_t, iEffSeg, RTGCPTR, GCPtrEff, IEMMODE, enmEffOpSize);
|
---|
5371 | IEM_CIMPL_PROTO_3(iemCImpl_xrstor, uint8_t, iEffSeg, RTGCPTR, GCPtrEff, IEMMODE, enmEffOpSize);
|
---|
5372 | IEM_CIMPL_PROTO_2(iemCImpl_stmxcsr, uint8_t, iEffSeg, RTGCPTR, GCPtrEff);
|
---|
5373 | IEM_CIMPL_PROTO_2(iemCImpl_vstmxcsr, uint8_t, iEffSeg, RTGCPTR, GCPtrEff);
|
---|
5374 | IEM_CIMPL_PROTO_2(iemCImpl_ldmxcsr, uint8_t, iEffSeg, RTGCPTR, GCPtrEff);
|
---|
5375 | IEM_CIMPL_PROTO_3(iemCImpl_fnstenv, IEMMODE, enmEffOpSize, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5376 | IEM_CIMPL_PROTO_3(iemCImpl_fnsave, IEMMODE, enmEffOpSize, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst);
|
---|
5377 | IEM_CIMPL_PROTO_3(iemCImpl_fldenv, IEMMODE, enmEffOpSize, uint8_t, iEffSeg, RTGCPTR, GCPtrEffSrc);
|
---|
5378 | IEM_CIMPL_PROTO_3(iemCImpl_frstor, IEMMODE, enmEffOpSize, uint8_t, iEffSeg, RTGCPTR, GCPtrEffSrc);
|
---|
5379 | IEM_CIMPL_PROTO_1(iemCImpl_fldcw, uint16_t, u16Fcw);
|
---|
5380 | IEM_CIMPL_PROTO_2(iemCImpl_fxch_underflow, uint8_t, iStReg, uint16_t, uFpuOpcode);
|
---|
5381 | IEM_CIMPL_PROTO_3(iemCImpl_fcomi_fucomi, uint8_t, iStReg, bool, fUCmp, uint32_t, uPopAndFpuOpcode);
|
---|
5382 | IEM_CIMPL_PROTO_2(iemCImpl_rdseed, uint8_t, iReg, IEMMODE, enmEffOpSize);
|
---|
5383 | IEM_CIMPL_PROTO_2(iemCImpl_rdrand, uint8_t, iReg, IEMMODE, enmEffOpSize);
|
---|
5384 | /** @} */
|
---|
5385 |
|
---|
5386 | /** @name IEMAllCImplStrInstr.cpp.h
|
---|
5387 | * @note sed -e '/IEM_CIMPL_DEF_/!d' -e 's/IEM_CIMPL_DEF_/IEM_CIMPL_PROTO_/' -e 's/$/;/' -e 's/RT_CONCAT4(//' \
|
---|
5388 | * -e 's/,ADDR_SIZE)/64/g' -e 's/,OP_SIZE,/64/g' -e 's/,OP_rAX,/rax/g' IEMAllCImplStrInstr.cpp.h
|
---|
5389 | * @{ */
|
---|
5390 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op8_addr16, uint8_t, iEffSeg);
|
---|
5391 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op8_addr16, uint8_t, iEffSeg);
|
---|
5392 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_al_m16);
|
---|
5393 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_al_m16);
|
---|
5394 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op8_addr16, uint8_t, iEffSeg);
|
---|
5395 | IEM_CIMPL_PROTO_0(iemCImpl_stos_al_m16);
|
---|
5396 | IEM_CIMPL_PROTO_1(iemCImpl_lods_al_m16, int8_t, iEffSeg);
|
---|
5397 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op8_addr16, bool, fIoChecked);
|
---|
5398 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op8_addr16, bool, fIoChecked);
|
---|
5399 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op8_addr16, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5400 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op8_addr16, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5401 |
|
---|
5402 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op16_addr16, uint8_t, iEffSeg);
|
---|
5403 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op16_addr16, uint8_t, iEffSeg);
|
---|
5404 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_ax_m16);
|
---|
5405 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_ax_m16);
|
---|
5406 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op16_addr16, uint8_t, iEffSeg);
|
---|
5407 | IEM_CIMPL_PROTO_0(iemCImpl_stos_ax_m16);
|
---|
5408 | IEM_CIMPL_PROTO_1(iemCImpl_lods_ax_m16, int8_t, iEffSeg);
|
---|
5409 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op16_addr16, bool, fIoChecked);
|
---|
5410 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op16_addr16, bool, fIoChecked);
|
---|
5411 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op16_addr16, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5412 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op16_addr16, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5413 |
|
---|
5414 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op32_addr16, uint8_t, iEffSeg);
|
---|
5415 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op32_addr16, uint8_t, iEffSeg);
|
---|
5416 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_eax_m16);
|
---|
5417 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_eax_m16);
|
---|
5418 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op32_addr16, uint8_t, iEffSeg);
|
---|
5419 | IEM_CIMPL_PROTO_0(iemCImpl_stos_eax_m16);
|
---|
5420 | IEM_CIMPL_PROTO_1(iemCImpl_lods_eax_m16, int8_t, iEffSeg);
|
---|
5421 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op32_addr16, bool, fIoChecked);
|
---|
5422 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op32_addr16, bool, fIoChecked);
|
---|
5423 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op32_addr16, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5424 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op32_addr16, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5425 |
|
---|
5426 |
|
---|
5427 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op8_addr32, uint8_t, iEffSeg);
|
---|
5428 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op8_addr32, uint8_t, iEffSeg);
|
---|
5429 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_al_m32);
|
---|
5430 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_al_m32);
|
---|
5431 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op8_addr32, uint8_t, iEffSeg);
|
---|
5432 | IEM_CIMPL_PROTO_0(iemCImpl_stos_al_m32);
|
---|
5433 | IEM_CIMPL_PROTO_1(iemCImpl_lods_al_m32, int8_t, iEffSeg);
|
---|
5434 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op8_addr32, bool, fIoChecked);
|
---|
5435 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op8_addr32, bool, fIoChecked);
|
---|
5436 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op8_addr32, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5437 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op8_addr32, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5438 |
|
---|
5439 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op16_addr32, uint8_t, iEffSeg);
|
---|
5440 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op16_addr32, uint8_t, iEffSeg);
|
---|
5441 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_ax_m32);
|
---|
5442 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_ax_m32);
|
---|
5443 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op16_addr32, uint8_t, iEffSeg);
|
---|
5444 | IEM_CIMPL_PROTO_0(iemCImpl_stos_ax_m32);
|
---|
5445 | IEM_CIMPL_PROTO_1(iemCImpl_lods_ax_m32, int8_t, iEffSeg);
|
---|
5446 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op16_addr32, bool, fIoChecked);
|
---|
5447 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op16_addr32, bool, fIoChecked);
|
---|
5448 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op16_addr32, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5449 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op16_addr32, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5450 |
|
---|
5451 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op32_addr32, uint8_t, iEffSeg);
|
---|
5452 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op32_addr32, uint8_t, iEffSeg);
|
---|
5453 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_eax_m32);
|
---|
5454 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_eax_m32);
|
---|
5455 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op32_addr32, uint8_t, iEffSeg);
|
---|
5456 | IEM_CIMPL_PROTO_0(iemCImpl_stos_eax_m32);
|
---|
5457 | IEM_CIMPL_PROTO_1(iemCImpl_lods_eax_m32, int8_t, iEffSeg);
|
---|
5458 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op32_addr32, bool, fIoChecked);
|
---|
5459 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op32_addr32, bool, fIoChecked);
|
---|
5460 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op32_addr32, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5461 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op32_addr32, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5462 |
|
---|
5463 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op64_addr32, uint8_t, iEffSeg);
|
---|
5464 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op64_addr32, uint8_t, iEffSeg);
|
---|
5465 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_rax_m32);
|
---|
5466 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_rax_m32);
|
---|
5467 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op64_addr32, uint8_t, iEffSeg);
|
---|
5468 | IEM_CIMPL_PROTO_0(iemCImpl_stos_rax_m32);
|
---|
5469 | IEM_CIMPL_PROTO_1(iemCImpl_lods_rax_m32, int8_t, iEffSeg);
|
---|
5470 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op64_addr32, bool, fIoChecked);
|
---|
5471 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op64_addr32, bool, fIoChecked);
|
---|
5472 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op64_addr32, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5473 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op64_addr32, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5474 |
|
---|
5475 |
|
---|
5476 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op8_addr64, uint8_t, iEffSeg);
|
---|
5477 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op8_addr64, uint8_t, iEffSeg);
|
---|
5478 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_al_m64);
|
---|
5479 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_al_m64);
|
---|
5480 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op8_addr64, uint8_t, iEffSeg);
|
---|
5481 | IEM_CIMPL_PROTO_0(iemCImpl_stos_al_m64);
|
---|
5482 | IEM_CIMPL_PROTO_1(iemCImpl_lods_al_m64, int8_t, iEffSeg);
|
---|
5483 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op8_addr64, bool, fIoChecked);
|
---|
5484 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op8_addr64, bool, fIoChecked);
|
---|
5485 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op8_addr64, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5486 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op8_addr64, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5487 |
|
---|
5488 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op16_addr64, uint8_t, iEffSeg);
|
---|
5489 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op16_addr64, uint8_t, iEffSeg);
|
---|
5490 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_ax_m64);
|
---|
5491 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_ax_m64);
|
---|
5492 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op16_addr64, uint8_t, iEffSeg);
|
---|
5493 | IEM_CIMPL_PROTO_0(iemCImpl_stos_ax_m64);
|
---|
5494 | IEM_CIMPL_PROTO_1(iemCImpl_lods_ax_m64, int8_t, iEffSeg);
|
---|
5495 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op16_addr64, bool, fIoChecked);
|
---|
5496 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op16_addr64, bool, fIoChecked);
|
---|
5497 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op16_addr64, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5498 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op16_addr64, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5499 |
|
---|
5500 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op32_addr64, uint8_t, iEffSeg);
|
---|
5501 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op32_addr64, uint8_t, iEffSeg);
|
---|
5502 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_eax_m64);
|
---|
5503 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_eax_m64);
|
---|
5504 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op32_addr64, uint8_t, iEffSeg);
|
---|
5505 | IEM_CIMPL_PROTO_0(iemCImpl_stos_eax_m64);
|
---|
5506 | IEM_CIMPL_PROTO_1(iemCImpl_lods_eax_m64, int8_t, iEffSeg);
|
---|
5507 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op32_addr64, bool, fIoChecked);
|
---|
5508 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op32_addr64, bool, fIoChecked);
|
---|
5509 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op32_addr64, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5510 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op32_addr64, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5511 |
|
---|
5512 | IEM_CIMPL_PROTO_1(iemCImpl_repe_cmps_op64_addr64, uint8_t, iEffSeg);
|
---|
5513 | IEM_CIMPL_PROTO_1(iemCImpl_repne_cmps_op64_addr64, uint8_t, iEffSeg);
|
---|
5514 | IEM_CIMPL_PROTO_0(iemCImpl_repe_scas_rax_m64);
|
---|
5515 | IEM_CIMPL_PROTO_0(iemCImpl_repne_scas_rax_m64);
|
---|
5516 | IEM_CIMPL_PROTO_1(iemCImpl_rep_movs_op64_addr64, uint8_t, iEffSeg);
|
---|
5517 | IEM_CIMPL_PROTO_0(iemCImpl_stos_rax_m64);
|
---|
5518 | IEM_CIMPL_PROTO_1(iemCImpl_lods_rax_m64, int8_t, iEffSeg);
|
---|
5519 | IEM_CIMPL_PROTO_1(iemCImpl_ins_op64_addr64, bool, fIoChecked);
|
---|
5520 | IEM_CIMPL_PROTO_1(iemCImpl_rep_ins_op64_addr64, bool, fIoChecked);
|
---|
5521 | IEM_CIMPL_PROTO_2(iemCImpl_outs_op64_addr64, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5522 | IEM_CIMPL_PROTO_2(iemCImpl_rep_outs_op64_addr64, uint8_t, iEffSeg, bool, fIoChecked);
|
---|
5523 | /** @} */
|
---|
5524 |
|
---|
5525 | #ifdef VBOX_WITH_NESTED_HWVIRT_VMX
|
---|
5526 | VBOXSTRICTRC iemVmxVmexit(PVMCPUCC pVCpu, uint32_t uExitReason, uint64_t u64ExitQual) RT_NOEXCEPT;
|
---|
5527 | VBOXSTRICTRC iemVmxVmexitInstr(PVMCPUCC pVCpu, uint32_t uExitReason, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5528 | VBOXSTRICTRC iemVmxVmexitInstrNeedsInfo(PVMCPUCC pVCpu, uint32_t uExitReason, VMXINSTRID uInstrId, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5529 | VBOXSTRICTRC iemVmxVmexitTaskSwitch(PVMCPUCC pVCpu, IEMTASKSWITCH enmTaskSwitch, RTSEL SelNewTss, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5530 | VBOXSTRICTRC iemVmxVmexitEvent(PVMCPUCC pVCpu, uint8_t uVector, uint32_t fFlags, uint32_t uErrCode, uint64_t uCr2, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5531 | VBOXSTRICTRC iemVmxVmexitEventDoubleFault(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
5532 | VBOXSTRICTRC iemVmxVmexitEpt(PVMCPUCC pVCpu, PPGMPTWALK pWalk, uint32_t fAccess, uint32_t fSlatFail, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5533 | VBOXSTRICTRC iemVmxVmexitPreemptTimer(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
5534 | VBOXSTRICTRC iemVmxVmexitInstrMwait(PVMCPUCC pVCpu, bool fMonitorHwArmed, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5535 | VBOXSTRICTRC iemVmxVmexitInstrIo(PVMCPUCC pVCpu, VMXINSTRID uInstrId, uint16_t u16Port,
|
---|
5536 | bool fImm, uint8_t cbAccess, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5537 | VBOXSTRICTRC iemVmxVmexitInstrStrIo(PVMCPUCC pVCpu, VMXINSTRID uInstrId, uint16_t u16Port, uint8_t cbAccess,
|
---|
5538 | bool fRep, VMXEXITINSTRINFO ExitInstrInfo, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5539 | VBOXSTRICTRC iemVmxVmexitInstrMovDrX(PVMCPUCC pVCpu, VMXINSTRID uInstrId, uint8_t iDrReg, uint8_t iGReg, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5540 | VBOXSTRICTRC iemVmxVmexitInstrMovToCr8(PVMCPUCC pVCpu, uint8_t iGReg, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5541 | VBOXSTRICTRC iemVmxVmexitInstrMovFromCr8(PVMCPUCC pVCpu, uint8_t iGReg, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5542 | VBOXSTRICTRC iemVmxVmexitInstrMovToCr3(PVMCPUCC pVCpu, uint64_t uNewCr3, uint8_t iGReg, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5543 | VBOXSTRICTRC iemVmxVmexitInstrMovFromCr3(PVMCPUCC pVCpu, uint8_t iGReg, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5544 | VBOXSTRICTRC iemVmxVmexitInstrMovToCr0Cr4(PVMCPUCC pVCpu, uint8_t iCrReg, uint64_t *puNewCrX, uint8_t iGReg, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5545 | VBOXSTRICTRC iemVmxVmexitInstrClts(PVMCPUCC pVCpu, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5546 | VBOXSTRICTRC iemVmxVmexitInstrLmsw(PVMCPUCC pVCpu, uint32_t uGuestCr0, uint16_t *pu16NewMsw,
|
---|
5547 | RTGCPTR GCPtrEffDst, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5548 | VBOXSTRICTRC iemVmxVmexitInstrInvlpg(PVMCPUCC pVCpu, RTGCPTR GCPtrPage, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5549 | VBOXSTRICTRC iemVmxApicWriteEmulation(PVMCPUCC pVCpu) RT_NOEXCEPT;
|
---|
5550 | VBOXSTRICTRC iemVmxVirtApicAccessUnused(PVMCPUCC pVCpu, PRTGCPHYS pGCPhysAccess, size_t cbAccess, uint32_t fAccess) RT_NOEXCEPT;
|
---|
5551 | uint32_t iemVmxVirtApicReadRaw32(PVMCPUCC pVCpu, uint16_t offReg) RT_NOEXCEPT;
|
---|
5552 | void iemVmxVirtApicWriteRaw32(PVMCPUCC pVCpu, uint16_t offReg, uint32_t uReg) RT_NOEXCEPT;
|
---|
5553 | VBOXSTRICTRC iemVmxInvvpid(PVMCPUCC pVCpu, uint8_t cbInstr, uint8_t iEffSeg, RTGCPTR GCPtrInvvpidDesc,
|
---|
5554 | uint64_t u64InvvpidType, PCVMXVEXITINFO pExitInfo) RT_NOEXCEPT;
|
---|
5555 | bool iemVmxIsRdmsrWrmsrInterceptSet(PCVMCPU pVCpu, uint32_t uExitReason, uint32_t idMsr) RT_NOEXCEPT;
|
---|
5556 | IEM_CIMPL_PROTO_0(iemCImpl_vmxoff);
|
---|
5557 | IEM_CIMPL_PROTO_2(iemCImpl_vmxon, uint8_t, iEffSeg, RTGCPTR, GCPtrVmxon);
|
---|
5558 | IEM_CIMPL_PROTO_0(iemCImpl_vmlaunch);
|
---|
5559 | IEM_CIMPL_PROTO_0(iemCImpl_vmresume);
|
---|
5560 | IEM_CIMPL_PROTO_2(iemCImpl_vmptrld, uint8_t, iEffSeg, RTGCPTR, GCPtrVmcs);
|
---|
5561 | IEM_CIMPL_PROTO_2(iemCImpl_vmptrst, uint8_t, iEffSeg, RTGCPTR, GCPtrVmcs);
|
---|
5562 | IEM_CIMPL_PROTO_2(iemCImpl_vmclear, uint8_t, iEffSeg, RTGCPTR, GCPtrVmcs);
|
---|
5563 | IEM_CIMPL_PROTO_2(iemCImpl_vmwrite_reg, uint64_t, u64Val, uint64_t, u64VmcsField);
|
---|
5564 | IEM_CIMPL_PROTO_3(iemCImpl_vmwrite_mem, uint8_t, iEffSeg, RTGCPTR, GCPtrVal, uint32_t, u64VmcsField);
|
---|
5565 | IEM_CIMPL_PROTO_2(iemCImpl_vmread_reg64, uint64_t *, pu64Dst, uint64_t, u64VmcsField);
|
---|
5566 | IEM_CIMPL_PROTO_2(iemCImpl_vmread_reg32, uint64_t *, pu32Dst, uint32_t, u32VmcsField);
|
---|
5567 | IEM_CIMPL_PROTO_3(iemCImpl_vmread_mem_reg64, uint8_t, iEffSeg, RTGCPTR, GCPtrDst, uint32_t, u64VmcsField);
|
---|
5568 | IEM_CIMPL_PROTO_3(iemCImpl_vmread_mem_reg32, uint8_t, iEffSeg, RTGCPTR, GCPtrDst, uint32_t, u32VmcsField);
|
---|
5569 | IEM_CIMPL_PROTO_3(iemCImpl_invvpid, uint8_t, iEffSeg, RTGCPTR, GCPtrInvvpidDesc, uint64_t, uInvvpidType);
|
---|
5570 | IEM_CIMPL_PROTO_3(iemCImpl_invept, uint8_t, iEffSeg, RTGCPTR, GCPtrInveptDesc, uint64_t, uInveptType);
|
---|
5571 | IEM_CIMPL_PROTO_0(iemCImpl_vmx_pause);
|
---|
5572 | #endif
|
---|
5573 |
|
---|
5574 | #ifdef VBOX_WITH_NESTED_HWVIRT_SVM
|
---|
5575 | VBOXSTRICTRC iemSvmVmexit(PVMCPUCC pVCpu, uint64_t uExitCode, uint64_t uExitInfo1, uint64_t uExitInfo2) RT_NOEXCEPT;
|
---|
5576 | VBOXSTRICTRC iemHandleSvmEventIntercept(PVMCPUCC pVCpu, uint8_t cbInstr, uint8_t u8Vector, uint32_t fFlags, uint32_t uErr, uint64_t uCr2) RT_NOEXCEPT;
|
---|
5577 | VBOXSTRICTRC iemSvmHandleIOIntercept(PVMCPUCC pVCpu, uint16_t u16Port, SVMIOIOTYPE enmIoType, uint8_t cbReg,
|
---|
5578 | uint8_t cAddrSizeBits, uint8_t iEffSeg, bool fRep, bool fStrIo, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5579 | VBOXSTRICTRC iemSvmHandleMsrIntercept(PVMCPUCC pVCpu, uint32_t idMsr, bool fWrite, uint8_t cbInstr) RT_NOEXCEPT;
|
---|
5580 | IEM_CIMPL_PROTO_0(iemCImpl_vmrun);
|
---|
5581 | IEM_CIMPL_PROTO_0(iemCImpl_vmload);
|
---|
5582 | IEM_CIMPL_PROTO_0(iemCImpl_vmsave);
|
---|
5583 | IEM_CIMPL_PROTO_0(iemCImpl_clgi);
|
---|
5584 | IEM_CIMPL_PROTO_0(iemCImpl_stgi);
|
---|
5585 | IEM_CIMPL_PROTO_0(iemCImpl_invlpga);
|
---|
5586 | IEM_CIMPL_PROTO_0(iemCImpl_skinit);
|
---|
5587 | IEM_CIMPL_PROTO_0(iemCImpl_svm_pause);
|
---|
5588 | #endif
|
---|
5589 |
|
---|
5590 | IEM_CIMPL_PROTO_0(iemCImpl_vmcall); /* vmx */
|
---|
5591 | IEM_CIMPL_PROTO_0(iemCImpl_vmmcall); /* svm */
|
---|
5592 | IEM_CIMPL_PROTO_1(iemCImpl_Hypercall, uint16_t, uDisOpcode); /* both */
|
---|
5593 |
|
---|
5594 | extern const PFNIEMOP g_apfnIemInterpretOnlyOneByteMap[256];
|
---|
5595 | extern const PFNIEMOP g_apfnIemInterpretOnlyTwoByteMap[1024];
|
---|
5596 | extern const PFNIEMOP g_apfnIemInterpretOnlyThreeByte0f3a[1024];
|
---|
5597 | extern const PFNIEMOP g_apfnIemInterpretOnlyThreeByte0f38[1024];
|
---|
5598 | extern const PFNIEMOP g_apfnIemInterpretOnlyVecMap1[1024];
|
---|
5599 | extern const PFNIEMOP g_apfnIemInterpretOnlyVecMap2[1024];
|
---|
5600 | extern const PFNIEMOP g_apfnIemInterpretOnlyVecMap3[1024];
|
---|
5601 |
|
---|
5602 | /*
|
---|
5603 | * Recompiler related stuff.
|
---|
5604 | */
|
---|
5605 | extern const PFNIEMOP g_apfnIemThreadedRecompilerOneByteMap[256];
|
---|
5606 | extern const PFNIEMOP g_apfnIemThreadedRecompilerTwoByteMap[1024];
|
---|
5607 | extern const PFNIEMOP g_apfnIemThreadedRecompilerThreeByte0f3a[1024];
|
---|
5608 | extern const PFNIEMOP g_apfnIemThreadedRecompilerThreeByte0f38[1024];
|
---|
5609 | extern const PFNIEMOP g_apfnIemThreadedRecompilerVecMap1[1024];
|
---|
5610 | extern const PFNIEMOP g_apfnIemThreadedRecompilerVecMap2[1024];
|
---|
5611 | extern const PFNIEMOP g_apfnIemThreadedRecompilerVecMap3[1024];
|
---|
5612 |
|
---|
5613 | DECLCALLBACK(int) iemTbInit(PVMCC pVM, uint32_t cInitialTbs, uint32_t cMaxTbs,
|
---|
5614 | uint64_t cbInitialExec, uint64_t cbMaxExec, uint32_t cbChunkExec);
|
---|
5615 | void iemThreadedTbObsolete(PVMCPUCC pVCpu, PIEMTB pTb, bool fSafeToFree);
|
---|
5616 | void iemTbAllocatorProcessDelayedFrees(PVMCPUCC pVCpu, PIEMTBALLOCATOR pTbAllocator);
|
---|
5617 | void iemTbAllocatorFreeupNativeSpace(PVMCPUCC pVCpu, uint32_t cNeededInstrs);
|
---|
5618 |
|
---|
5619 |
|
---|
5620 | /** @todo FNIEMTHREADEDFUNC and friends may need more work... */
|
---|
5621 | #if defined(__GNUC__) && !defined(IEM_WITH_THROW_CATCH)
|
---|
5622 | typedef VBOXSTRICTRC /*__attribute__((__nothrow__))*/ FNIEMTHREADEDFUNC(PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2);
|
---|
5623 | typedef FNIEMTHREADEDFUNC *PFNIEMTHREADEDFUNC;
|
---|
5624 | # define IEM_DECL_IEMTHREADEDFUNC_DEF(a_Name) \
|
---|
5625 | VBOXSTRICTRC __attribute__((__nothrow__)) a_Name(PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)
|
---|
5626 | # define IEM_DECL_IEMTHREADEDFUNC_PROTO(a_Name) \
|
---|
5627 | VBOXSTRICTRC __attribute__((__nothrow__)) a_Name(PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2)
|
---|
5628 |
|
---|
5629 | #else
|
---|
5630 | typedef VBOXSTRICTRC (FNIEMTHREADEDFUNC)(PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2);
|
---|
5631 | typedef FNIEMTHREADEDFUNC *PFNIEMTHREADEDFUNC;
|
---|
5632 | # define IEM_DECL_IEMTHREADEDFUNC_DEF(a_Name) \
|
---|
5633 | VBOXSTRICTRC a_Name(PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2) IEM_NOEXCEPT_MAY_LONGJMP
|
---|
5634 | # define IEM_DECL_IEMTHREADEDFUNC_PROTO(a_Name) \
|
---|
5635 | VBOXSTRICTRC a_Name(PVMCPU pVCpu, uint64_t uParam0, uint64_t uParam1, uint64_t uParam2) IEM_NOEXCEPT_MAY_LONGJMP
|
---|
5636 | #endif
|
---|
5637 |
|
---|
5638 |
|
---|
5639 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_Nop);
|
---|
5640 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_LogCpuState);
|
---|
5641 |
|
---|
5642 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_DeferToCImpl0);
|
---|
5643 |
|
---|
5644 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckIrq);
|
---|
5645 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckMode);
|
---|
5646 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckHwInstrBps);
|
---|
5647 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckCsLim);
|
---|
5648 |
|
---|
5649 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckCsLimAndOpcodes);
|
---|
5650 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodes);
|
---|
5651 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesConsiderCsLim);
|
---|
5652 |
|
---|
5653 | /* Branching: */
|
---|
5654 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckCsLimAndPcAndOpcodes);
|
---|
5655 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckPcAndOpcodes);
|
---|
5656 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckPcAndOpcodesConsiderCsLim);
|
---|
5657 |
|
---|
5658 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckCsLimAndOpcodesLoadingTlb);
|
---|
5659 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesLoadingTlb);
|
---|
5660 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesLoadingTlbConsiderCsLim);
|
---|
5661 |
|
---|
5662 | /* Natural page crossing: */
|
---|
5663 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckCsLimAndOpcodesAcrossPageLoadingTlb);
|
---|
5664 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesAcrossPageLoadingTlb);
|
---|
5665 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesAcrossPageLoadingTlbConsiderCsLim);
|
---|
5666 |
|
---|
5667 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckCsLimAndOpcodesOnNextPageLoadingTlb);
|
---|
5668 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesOnNextPageLoadingTlb);
|
---|
5669 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesOnNextPageLoadingTlbConsiderCsLim);
|
---|
5670 |
|
---|
5671 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckCsLimAndOpcodesOnNewPageLoadingTlb);
|
---|
5672 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesOnNewPageLoadingTlb);
|
---|
5673 | IEM_DECL_IEMTHREADEDFUNC_PROTO(iemThreadedFunc_BltIn_CheckOpcodesOnNewPageLoadingTlbConsiderCsLim);
|
---|
5674 |
|
---|
5675 | bool iemThreadedCompileEmitIrqCheckBefore(PVMCPUCC pVCpu, PIEMTB pTb);
|
---|
5676 | bool iemThreadedCompileBeginEmitCallsComplications(PVMCPUCC pVCpu, PIEMTB pTb);
|
---|
5677 |
|
---|
5678 | /* Native recompiler public bits: */
|
---|
5679 | DECLHIDDEN(PIEMTB) iemNativeRecompile(PVMCPUCC pVCpu, PIEMTB pTb) RT_NOEXCEPT;
|
---|
5680 | DECLHIDDEN(void) iemNativeDisassembleTb(PCIEMTB pTb, PCDBGFINFOHLP pHlp) RT_NOEXCEPT;
|
---|
5681 | int iemExecMemAllocatorInit(PVMCPU pVCpu, uint64_t cbMax, uint64_t cbInitial, uint32_t cbChunk);
|
---|
5682 | void iemExecMemAllocatorFree(PVMCPU pVCpu, void *pv, size_t cb);
|
---|
5683 |
|
---|
5684 |
|
---|
5685 | /** @} */
|
---|
5686 |
|
---|
5687 | RT_C_DECLS_END
|
---|
5688 |
|
---|
5689 | #endif /* !VMM_INCLUDED_SRC_include_IEMInternal_h */
|
---|
5690 |
|
---|