Changeset 104383 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Apr 19, 2024 8:00:51 PM (10 months ago)
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInternal.h
r104380 r104383 212 212 * Includes the three byte opcode map for instrs starting with 0x0f 0x38. */ 213 213 #if !defined(IEM_WITH_THREE_0F_38) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 214 # if def IEM_WITHOUT_THREE_0F_38214 # ifndef IEM_WITHOUT_THREE_0F_38 215 215 # define IEM_WITH_THREE_0F_38 216 216 # endif -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r104378 r104383 190 190 * Dedicated temporary SIMD register. */ 191 191 #endif 192 #ifdef RT_ARCH_AMD64 193 # define IEMNATIVE_REG_FIXED_PVMCPU X86_GREG_xBX 194 # define IEMNATIVE_REG_FIXED_PVMCPU_ASM xBX 195 # define IEMNATIVE_REG_FIXED_TMP0 X86_GREG_x11 196 # define IEMNATIVE_REG_FIXED_MASK ( RT_BIT_32(IEMNATIVE_REG_FIXED_PVMCPU) \ 197 | RT_BIT_32(IEMNATIVE_REG_FIXED_TMP0) \ 198 | RT_BIT_32(X86_GREG_xSP) \ 199 | RT_BIT_32(X86_GREG_xBP) ) 200 201 # ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR 202 # define IEMNATIVE_SIMD_REG_FIXED_TMP0 5 /* xmm5/ymm5 */ 203 # ifndef IEMNATIVE_WITH_SIMD_REG_ACCESS_ALL_REGISTERS 204 # ifndef _MSC_VER /* On Windows xmm6 through xmm15 are marked as callee saved. */ 205 # define IEMNATIVE_WITH_SIMD_REG_ACCESS_ALL_REGISTERS 206 # endif 207 # endif 208 # ifdef IEMNATIVE_WITH_SIMD_REG_ACCESS_ALL_REGISTERS 209 # define IEMNATIVE_SIMD_REG_FIXED_MASK (RT_BIT_32(IEMNATIVE_SIMD_REG_FIXED_TMP0)) 210 # else 211 # define IEMNATIVE_SIMD_REG_FIXED_MASK ( UINT32_C(0xffc0) \ 212 | RT_BIT_32(IEMNATIVE_SIMD_REG_FIXED_TMP0)) 213 # endif 214 # endif 215 216 #elif defined(RT_ARCH_ARM64) || defined(DOXYGEN_RUNNING) 192 #if defined(RT_ARCH_ARM64) || defined(DOXYGEN_RUNNING) /* arm64 goes first because of doxygen */ 217 193 # define IEMNATIVE_REG_FIXED_PVMCPU ARMV8_A64_REG_X28 218 194 # define IEMNATIVE_REG_FIXED_PVMCPU_ASM RT_CONCAT(x,IEMNATIVE_REG_FIXED_PVMCPU) … … 242 218 # define IEMNATIVE_SIMD_REG_FIXED_MASK RT_BIT_32(ARMV8_A64_REG_Q30) 243 219 # else 244 /* 245 * ARM64 has 32 128-bit registers only, in order to support emulating 256-bit registers we pair 246 * two real registers statically to one virtual for now, leaving us with only 16 256-bit registers. 247 * We always pair v0 with v1, v2 with v3, etc. so we mark the higher register as fixed 248 * and the register allocator assumes that it will be always free when the lower is picked. 249 * 250 * Also ARM64 declares the low 64-bit of v8-v15 as callee saved, so we don't touch them in order to avoid 251 * having to save and restore them in the prologue/epilogue. 220 /** @note 221 * ARM64 has 32 registers, but they are only 128-bit wide. So, in order to 222 * support emulating 256-bit registers we pair two real registers statically to 223 * one virtual for now, leaving us with only 16 256-bit registers. We always 224 * pair v0 with v1, v2 with v3, etc. so we mark the higher register as fixed and 225 * the register allocator assumes that it will be always free when the lower is 226 * picked. 227 * 228 * Also ARM64 declares the low 64-bit of v8-v15 as callee saved, so we don't 229 * touch them in order to avoid having to save and restore them in the 230 * prologue/epilogue. 252 231 */ 253 232 # define IEMNATIVE_SIMD_REG_FIXED_MASK ( UINT32_C(0xff00) \ … … 269 248 | RT_BIT_32(ARMV8_A64_REG_Q3) \ 270 249 | RT_BIT_32(ARMV8_A64_REG_Q1)) 250 # endif 251 # endif 252 253 #elif defined(RT_ARCH_AMD64) 254 # define IEMNATIVE_REG_FIXED_PVMCPU X86_GREG_xBX 255 # define IEMNATIVE_REG_FIXED_PVMCPU_ASM xBX 256 # define IEMNATIVE_REG_FIXED_TMP0 X86_GREG_x11 257 # define IEMNATIVE_REG_FIXED_MASK ( RT_BIT_32(IEMNATIVE_REG_FIXED_PVMCPU) \ 258 | RT_BIT_32(IEMNATIVE_REG_FIXED_TMP0) \ 259 | RT_BIT_32(X86_GREG_xSP) \ 260 | RT_BIT_32(X86_GREG_xBP) ) 261 262 # ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR 263 # define IEMNATIVE_SIMD_REG_FIXED_TMP0 5 /* xmm5/ymm5 */ 264 # ifndef IEMNATIVE_WITH_SIMD_REG_ACCESS_ALL_REGISTERS 265 # ifndef _MSC_VER 266 # define IEMNATIVE_WITH_SIMD_REG_ACCESS_ALL_REGISTERS 267 # endif 268 # endif 269 # ifdef IEMNATIVE_WITH_SIMD_REG_ACCESS_ALL_REGISTERS 270 # define IEMNATIVE_SIMD_REG_FIXED_MASK (RT_BIT_32(IEMNATIVE_SIMD_REG_FIXED_TMP0)) 271 # else 272 /** @note On Windows/AMD64 xmm6 through xmm15 are marked as callee saved. */ 273 # define IEMNATIVE_SIMD_REG_FIXED_MASK ( UINT32_C(0xffc0) \ 274 | RT_BIT_32(IEMNATIVE_SIMD_REG_FIXED_TMP0)) 271 275 # endif 272 276 # endif
Note:
See TracChangeset
for help on using the changeset viewer.