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