Changeset 104378 in vbox
- Timestamp:
- Apr 19, 2024 2:43:14 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/various.sed
r98103 r104378 3 3 # Converts some C header elements into nasm/yasm syntax. 4 4 # 5 # This is used by 'incs' in /Maintenance.kmk (/Makefile.kmk). 6 # 7 8 # 9 # Copyright (C) 2006-2023 Oracle and/or its affiliates. 5 # This is used by 'incs' in /Maintenance.kmk (/Makefile.kmk) as well as the VMM 6 # for IEM headers. 7 # 8 9 # 10 # Copyright (C) 2006-2024 Oracle and/or its affiliates. 10 11 # 11 12 # This file is part of VirtualBox base platform packages, as … … 48 49 :next 49 50 50 # Check for markers (typically in comments). 51 /ASM-INC/basm-inc 52 /ASM-NOINC/basm-noinc 51 # Check for block markers (typically in comments). 52 /ASM-NOINC-START/,/ASM-NOINC-END/ { 53 d 54 } 53 55 54 56 # Newline escapes. … … 59 61 :no-more-newline-escapes 60 62 61 # Strip comments and trailing space. 62 s/[[:space:]][[:space:]]*\/\*.*$//g 63 s/[[:space:]][[:space:]]*\/\/.*$//g 63 # Check for line markers (typically in comments). 64 /ASM-INC/basm-inc 65 /ASM-NOINC/basm-noinc 66 67 # Save the original line in the hold space for error reporting. 68 h 69 70 # Strip comments. 71 /\/\*/!b strip_cpp_style_comment 72 :load_another_c_style_comment_line 73 /\*\//b strip_c_style_comment 74 N 75 b load_another_c_style_comment_line 76 :strip_c_style_comment 77 s/\/\*.*\*\// /g 78 79 :strip_cpp_style_comment 80 s,//.*$, ,g 81 82 # Strip trailing spaces 64 83 s/[[:space:]][[:space:]]*$//g 65 84 … … 119 138 b end 120 139 140 121 141 :ifndef 122 142 s/#\([[:space:]]*\)ifndef/\1%ifndef/ 123 143 b end 124 144 145 125 146 :if 126 147 s/#\([[:space:]]*\)if/\1%if/ 127 b end 148 149 # Replace 'defined(DOXYGEN_RUNNING)' with '0' to simplify subsequent matching to '[0]' when we mean 'defined[(]DOXYGEN_RUNNING[)]'. 150 s/defined[(]DOXYGEN_RUNNING[)]/0/ 151 152 # Simplify stuff that was turned into '0' in the previous step (or in the input file). 153 s/||[[:space:]]*0[[:space:]]*$//g 154 s/||[[:space:]]*0\([[:space:]|&]\)/\1/g 155 s/\([[:space:]|&]\)0[[:space:]]*||/\1/g 156 s/[[:space:]][[:space:]]*$// 157 158 # Convert #if [!]defined(xxxx) into %if[n]def xxxx 159 s/%if[[:space:]][[:space:]]*defined[(]\([^)][^)]*\)[)]$/%ifdef \1/ 160 s/%if[[:space:]][[:space:]]*[!][[:space:]]*defined[(]\([^)][^)]*\)[)]$/%ifndef \1/ 161 162 # Convert '#if ... && 0' and '#if 0 && ...' to %if 0 163 s/%if[[:space:]].*&&[[:space:]]*00*$/%if 0/ 164 s/%if[[:space:]][[:space:]]*00*[[:space:]]*&&$/%if 0/ 165 166 # Convert '#if ... || 1' and '#if 1 || ...' to '%if 1' 167 s/%if[[:space:]].*||[[:space:]]*1[0-9]*$/%if 1/ 168 s/%if[[:space:]][[:space:]]*1[0-9]*[[:space:]]*||$/%if 1/ 169 170 /defined/b defined_error 171 b end 172 128 173 129 174 :elif 130 175 s/#\([[:space:]]*\)elif/\1%elif/ 131 b end 176 177 # Replace 'defined(DOXYGEN_RUNNING)' with '0' to simplify subsequent matching to '[0]' when we mean 'defined[(]DOXYGEN_RUNNING[)]'. 178 s/defined[(]DOXYGEN_RUNNING[)]/0/ 179 180 # Simplify stuff that was turned into '0' in the previous step (or in the input file). 181 s/||[[:space:]]*0[[:space:]]*$//g 182 s/||[[:space:]]*0\([[:space:]|&]\)/\1/g 183 s/\([[:space:]|&]\)0[[:space:]]*||/\1/g 184 s/[[:space:]][[:space:]]*$// 185 186 # Convert #if [!]defined(xxxx) into %if[n]def xxxx 187 s/%elif[[:space:]][[:space:]]*defined[(]\([^)][^)]*\)[)]$/%elifdef \1/ 188 s/%elif[[:space:]][[:space:]]*[!][[:space:]]*defined[(]\([^)][^)]*\)[)]$/%elifndef \1/ 189 190 # Convert '#elif ... && 0' and '#elif 0 && ...' to '%elif 0' 191 s/%elif[[:space:]].*&&[[:space:]]*00*$/%elif 0/ 192 s/%elif[[:space:]][[:space:]]*00*[[:space:]]*&&$/%elif 0/ 193 194 # Convert '#elif ... || 1' and '#elif 1 || ...' to '%elif 1' 195 s/%elif[[:space:]].*||[[:space:]]*1[0-9]*$/%elif 1/ 196 s/%elif[[:space:]][[:space:]]*1[0-9]*[[:space:]]*||$/%elif 1/ 197 198 /defined/b defined_error 199 b end 200 132 201 133 202 :else … … 135 204 b end 136 205 206 137 207 :endif 138 208 s/#\([[:space:]]*\)endif.*$/\1%endif/ 139 209 b end 140 210 141 # 142 # Assembly statement... may need adjusting when used. 211 212 :defined_error 213 x 214 s/^/error: yasm & nasm does not grok 'defined': / 215 p 216 x 217 s/^/info: state: / 218 q1 219 220 221 # 222 # Assembly statement inside a C-style comment. 143 223 # 144 224 :asm-inc 145 b end 225 /\/\*[[:space:]]*ASM-INC:.*\*\//b asm-inc-c-style-oneliner 226 /\/\/[[:space:]]*ASM-INC:/b asm-inc-cpp-style-oneliner 227 /\/\*[[:space:]]*ASM-INC/b asm-inc-c-style-block 228 s/^/error: unknown ASM-INC form: / 229 q1 230 231 # /* ASM-INC: %include "whatever.mac" */ 232 :asm-inc-c-style-oneliner 233 s/[[:space:]]*\/\*[[:space:]][[:space:]]*ASM-INC:[[:space:]]*\(.*\)[[:space:]]*\*\//\1/ 234 b end 235 236 # // ASM-INC: %include "whatever.mac" 237 :asm-inc-cpp-style-oneliner 238 s/[[:space:]]*\/\/[[:space:]][[:space:]]*ASM-INC:[[:space:]]*\(.*\)[[:space:]]*$/\1/ 239 b end 240 241 # /* ASM-INC 242 # %include "whatever.mac" 243 # */ 244 :asm-inc-c-style-block 245 s/.*$// 246 :asm-inc-c-style-block-next 247 h 248 N 249 /\*\//!b asm-inc-c-style-block-next 250 x 251 b end 252 146 253 147 254 :end -
trunk/src/VBox/VMM/Makefile.kmk
r104367 r104378 745 745 if1of ($(KBUILD_TARGET_ARCH), arm64) 746 746 VBoxVMM_CLEAN += \ 747 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMAssemblyOffsets.h.ts \748 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMAssemblyOffsets.h747 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMAssemblyOffsets.h.ts \ 748 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMAssemblyOffsets.h 749 749 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMAssemblyOffsets.h.ts) 750 750 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMAssemblyOffsets.h.ts \ … … 753 753 $(PATH_SUB_CURRENT)/dwarfdump-to-offsets.sed 754 754 $(QUIET)$(call MSG_GENERATE,VBoxVMM,$@,IEMAllN8veRecompiler.o) 755 $(QUIET)$(RM) -f -- "$@" "[email protected]" "$(basename $@)"755 $(QUIET)$(RM) -f -- "$@" "[email protected]" 756 756 $(QUIET)$(MKDIR) -p -- "$(dir $@)" 757 757 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) … … 764 764 # Set up the dependencies. 765 765 $(VBoxVMM_0_OUTDIR)/VMMAll/IEMAllN8veHlpA-arm64.o: $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMAssemblyOffsets.h 766 endif 767 768 # 769 # Generate member offsets for selected structures for use from ARM64 assembly. 770 # 771 if1of ($(KBUILD_TARGET_ARCH), amd64) 772 VBoxVMM_CLEAN += \ 773 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInternal.mac.ts \ 774 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInternal.mac \ 775 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMN8veRecompiler.mac.ts \ 776 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMN8veRecompiler.mac 777 778 VBoxVMM_INTERMEDIATES.amd64 += $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInternal.mac 779 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInternal.mac.ts) 780 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInternal.mac.ts \ 781 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMInternal.mac: \ 782 $(PATH_SUB_CURRENT)/include/IEMInternal.h \ 783 $(PATH_ROOT)/include/VBox/various.sed 784 $(QUIET)$(call MSG_GENERATE,VBoxVMM,$@,$<) 785 $(QUIET)$(MKDIR) -p -- "$(dir $@)" 786 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) 787 $(QUIET)$(SED) -f "$(filter %.sed,$^)" --output "$@" "$<" 788 $(QUIET)$(CP) -v -f --changed -- "$@" "$(basename $@)" 789 790 VBoxVMM_INTERMEDIATES.amd64 += $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMN8veRecompiler.mac 791 $(call KB_FN_AUTO_CMD_DEPS,$(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMN8veRecompiler.mac.ts) 792 $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMN8veRecompiler.mac.ts \ 793 +| $(VBoxVMM_0_OUTDIR)/CommonGenIncs/IEMN8veRecompiler.mac: \ 794 $(PATH_SUB_CURRENT)/include/IEMN8veRecompiler.h \ 795 $(PATH_ROOT)/include/VBox/various.sed 796 $(QUIET)$(call MSG_GENERATE,VBoxVMM,$@,$<) 797 $(QUIET)$(MKDIR) -p -- "$(dir $@)" 798 $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) 799 $(QUIET)$(SED) -f "$(filter %.sed,$^)" --output "$@" "$<" 800 $(QUIET)$(CP) -v -f --changed -- "$@" "$(basename $@)" 766 801 endif 767 802 -
trunk/src/VBox/VMM/VMMAll/IEMAllN8veHlpA.asm
r104331 r104378 32 32 %include "VBox/asmdefs.mac" 33 33 34 ;; @todo r=aeichner The following is copied from IEMInternal.h 35 ;%define VBOX_WITH_IEM_NATIVE_RECOMPILER_LONGJMP - not enabled right now on amd64 36 37 ;; @todo r=aeichner The following defines are copied from IEMN8veRecompiler.h 38 39 ; /** @def IEMNATIVE_WITH_RECOMPILER_PROLOGUE_SINGLETON 40 ; * Enables having only a single prologue for native TBs. */ 41 %define IEMNATIVE_WITH_RECOMPILER_PROLOGUE_SINGLETON 42 43 ; /** An stack alignment adjustment (between non-volatile register pushes and 44 ; * the stack variable area, so the latter better aligned). */ 45 %define IEMNATIVE_FRAME_ALIGN_SIZE 8 46 47 ; /** The size of the area for stack variables and spills and stuff. 48 ; * @note This limit is duplicated in the python script(s). We add 0x40 for 49 ; * alignment padding. */ 50 %define IEMNATIVE_FRAME_VAR_SIZE (0xc0 + 0x40) 51 52 ; This needs to correspond to IEMNATIVE_REG_FIXED_PVMCPU in IEMN8veRecompiler.h 53 %define IEMNATIVE_REG_FIXED_PVMCPU_ASM xBX 54 55 ; /** Number of stack arguments slots for calls made from the frame. */ 56 %ifdef RT_OS_WINDOWS 57 %define IEMNATIVE_FRAME_STACK_ARG_COUNT 4 58 %else 59 %define IEMNATIVE_FRAME_STACK_ARG_COUNT 2 60 %endif 61 ; /** Number of any shadow arguments (spill area) for calls we make. */ 62 %ifdef RT_OS_WINDOWS 63 %define IEMNATIVE_FRAME_SHADOW_ARG_COUNT 4 64 %else 65 %define IEMNATIVE_FRAME_SHADOW_ARG_COUNT 0 66 %endif 67 68 34 %include "IEMInternal.mac" 35 %include "IEMN8veRecompiler.mac" 36 37 38 ;********************************************************************************************************************************* 39 ;* External Symbols * 40 ;********************************************************************************************************************************* 69 41 BEGINCODE 70 71 42 extern NAME(iemThreadedFunc_BltIn_LogCpuStateWorker) 72 43 extern NAME(iemNativeHlpCheckTlbLookup) 73 44 74 45 75 %ifdef IEMNATIVE_WITH_RECOMPILER_PROLOGUE_SINGLETON 76 46 BEGINCODE 77 47 ;; 78 48 ; This is the common prologue of a TB, saving all volatile registers … … 113 83 SEH64_PUSH_GREG r15 114 84 %ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER_LONGJMP 115 %error "Port me - need to store RBP in IEMCPU::pvTbFramePointerR3 "85 %error "Port me - need to store RBP in IEMCPU::pvTbFramePointerR3; Create ASM version of IEMCPU in IEMInternalStruct.mac" 116 86 %endif 117 87 %define MY_STACK_ALLOC ( IEMNATIVE_FRAME_ALIGN_SIZE \ … … 131 101 %endif 132 102 ENDPROC iemNativeTbEntry 133 %endif134 103 135 104 -
trunk/src/VBox/VMM/include/IEMInternal.h
r104367 r104378 53 53 */ 54 54 55 /* Make doxygen happy w/o overcomplicating the #if checks. */ 56 #ifdef DOXYGEN_RUNNING 57 # define IEM_WITH_THROW_CATCH 58 # define VBOX_WITH_IEM_NATIVE_RECOMPILER_LONGJMP 59 #endif 60 55 61 /** For expanding symbol in slickedit and other products tagging and 56 62 * crossreferencing IEM symbols. */ … … 83 89 * Linux, but it should be quite a bit faster for normal code. 84 90 */ 85 #if (defined(__cplusplus) && defined(IEM_WITH_SETJMP) && defined(IN_RING3) && (defined(__GNUC__) || defined(_MSC_VER))) \ 86 || defined(DOXYGEN_RUNNING) 91 #if defined(__cplusplus) && defined(IEM_WITH_SETJMP) && defined(IN_RING3) && (defined(__GNUC__) || defined(_MSC_VER)) /* ASM-NOINC-START */ 87 92 # define IEM_WITH_THROW_CATCH 88 #endif 93 #endif /*ASM-NOINC-END*/ 89 94 90 95 /** @def IEMNATIVE_WITH_DELAYED_PC_UPDATING … … 117 122 * non-volatile (and does something even more crazy for ARM), this probably 118 123 * won't work reliably on Windows. */ 119 #if defined(DOXYGEN_RUNNING) || (!defined(RT_OS_WINDOWS) && (defined(RT_ARCH_ARM64) /*|| defined(_RT_ARCH_AMD64)*/)) 120 # define VBOX_WITH_IEM_NATIVE_RECOMPILER_LONGJMP 121 #endif 124 #ifdef RT_ARCH_ARM64 125 # ifndef RT_OS_WINDOWS 126 # define VBOX_WITH_IEM_NATIVE_RECOMPILER_LONGJMP 127 # endif 128 #endif 129 /* ASM-NOINC-START */ 122 130 #ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER_LONGJMP 123 131 # if !defined(IN_RING3) \ … … 189 197 # define IEM_NOEXCEPT_MAY_LONGJMP RT_NOEXCEPT 190 198 #endif 199 /* ASM-NOINC-END */ 191 200 192 201 #define IEM_IMPLEMENTS_TASKSWITCH … … 194 203 /** @def IEM_WITH_3DNOW 195 204 * Includes the 3DNow decoding. */ 196 #if (!defined(IEM_WITH_3DNOW) && !defined(IEM_WITHOUT_3DNOW)) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 197 # define IEM_WITH_3DNOW 205 #if !defined(IEM_WITH_3DNOW) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 206 # ifndef IEM_WITHOUT_3DNOW 207 # define IEM_WITH_3DNOW 208 # endif 198 209 #endif 199 210 200 211 /** @def IEM_WITH_THREE_0F_38 201 212 * Includes the three byte opcode map for instrs starting with 0x0f 0x38. */ 202 #if (!defined(IEM_WITH_THREE_0F_38) && !defined(IEM_WITHOUT_THREE_0F_38)) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 203 # define IEM_WITH_THREE_0F_38 213 #if !defined(IEM_WITH_THREE_0F_38) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 214 # ifdef IEM_WITHOUT_THREE_0F_38 215 # define IEM_WITH_THREE_0F_38 216 # endif 204 217 #endif 205 218 206 219 /** @def IEM_WITH_THREE_0F_3A 207 220 * Includes the three byte opcode map for instrs starting with 0x0f 0x38. */ 208 #if (!defined(IEM_WITH_THREE_0F_3A) && !defined(IEM_WITHOUT_THREE_0F_3A)) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 209 # define IEM_WITH_THREE_0F_3A 221 #if !defined(IEM_WITH_THREE_0F_3A) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 222 # ifndef IEM_WITHOUT_THREE_0F_3A 223 # define IEM_WITH_THREE_0F_3A 224 # endif 210 225 #endif 211 226 212 227 /** @def IEM_WITH_VEX 213 228 * Includes the VEX decoding. */ 214 #if (!defined(IEM_WITH_VEX) && !defined(IEM_WITHOUT_VEX)) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 215 # define IEM_WITH_VEX 229 #if !defined(IEM_WITH_VEX) || defined(DOXYGEN_RUNNING) /* For doxygen, set in Config.kmk. */ 230 # ifndef IEM_WITHOUT_VEX 231 # define IEM_WITH_VEX 232 # endif 216 233 #endif 217 234 … … 234 251 /** @def IEM_USE_UNALIGNED_DATA_ACCESS 235 252 * Use unaligned accesses instead of elaborate byte assembly. */ 236 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) || defined(DOXYGEN_RUNNING) 253 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) || defined(DOXYGEN_RUNNING) /*ASM-NOINC*/ 237 254 # define IEM_USE_UNALIGNED_DATA_ACCESS 238 #endif 255 #endif /*ASM-NOINC*/ 239 256 240 257 //#define IEM_LOG_MEMORY_WRITES … … 242 259 243 260 244 #ifndef RT_IN_ASSEMBLER /* the rest of the file */261 #ifndef RT_IN_ASSEMBLER /* ASM-NOINC-START - the rest of the file */ 245 262 246 263 # if !defined(IN_TSTVMSTRUCT) && !defined(DOXYGEN_RUNNING) … … 6198 6215 DECLASM(DECL_NO_RETURN(void)) iemNativeTbLongJmp(void *pvFramePointer, int rc) RT_NOEXCEPT; 6199 6216 6200 #endif /* !RT_IN_ASSEMBLER */6217 #endif /* !RT_IN_ASSEMBLER - ASM-NOINC-END */ 6201 6218 6202 6219 … … 6205 6222 RT_C_DECLS_END 6206 6223 6224 /* ASM-INC: %include "IEMInternalStruct.mac" */ 6225 6207 6226 #endif /* !VMM_INCLUDED_SRC_include_IEMInternal_h */ 6208 6227 -
trunk/src/VBox/VMM/include/IEMN8veRecompiler.h
r104367 r104378 55 55 /** @def IEMNATIVE_WITH_EFLAGS_SKIPPING 56 56 * Enables skipping EFLAGS calculations/updating based on liveness info. */ 57 #if (defined(IEMNATIVE_WITH_LIVENESS_ANALYSIS) && 1) || defined(DOXYGEN_RUNNING)57 #if defined(IEMNATIVE_WITH_LIVENESS_ANALYSIS) || defined(DOXYGEN_RUNNING) 58 58 # define IEMNATIVE_WITH_EFLAGS_SKIPPING 59 59 #endif … … 63 63 * Enables strict consistency checks around EFLAGS skipping. 64 64 * @note Only defined when IEMNATIVE_WITH_EFLAGS_SKIPPING is also defined. */ 65 #if (defined(VBOX_STRICT) && defined(IEMNATIVE_WITH_EFLAGS_SKIPPING)) || defined(DOXYGEN_RUNNING) 65 #ifdef IEMNATIVE_WITH_EFLAGS_SKIPPING 66 # ifdef VBOX_STRICT 67 # define IEMNATIVE_STRICT_EFLAGS_SKIPPING 68 # endif 69 #elif defined(DOXYGEN_RUNNING) 66 70 # define IEMNATIVE_STRICT_EFLAGS_SKIPPING 67 71 #endif … … 186 190 * Dedicated temporary SIMD register. */ 187 191 #endif 188 #if defined(RT_ARCH_AMD64) && !defined(DOXYGEN_RUNNING)192 #ifdef RT_ARCH_AMD64 189 193 # define IEMNATIVE_REG_FIXED_PVMCPU X86_GREG_xBX 194 # define IEMNATIVE_REG_FIXED_PVMCPU_ASM xBX 190 195 # define IEMNATIVE_REG_FIXED_TMP0 X86_GREG_x11 191 # define IEMNATIVE_REG_FIXED_MASK ( RT_BIT_32(IEMNATIVE_REG_FIXED_PVMCPU) \192 | RT_BIT_32(IEMNATIVE_REG_FIXED_TMP0) \193 | RT_BIT_32(X86_GREG_xSP) \194 | RT_BIT_32(X86_GREG_xBP) )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) ) 195 200 196 201 # ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR 197 # define IEMNATIVE_SIMD_REG_FIXED_TMP0 5 /* xmm5/ymm5 */ 198 # if defined(IEMNATIVE_WITH_SIMD_REG_ACCESS_ALL_REGISTERS) || !defined(_MSC_VER) 199 # define IEMNATIVE_SIMD_REG_FIXED_MASK (RT_BIT_32(IEMNATIVE_SIMD_REG_FIXED_TMP0)) 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)) 200 210 # else 201 /** On Windows xmm6 through xmm15 are marked as callee saved. */ 202 # define IEMNATIVE_SIMD_REG_FIXED_MASK ( UINT32_C(0xffc0) \ 203 | RT_BIT_32(IEMNATIVE_SIMD_REG_FIXED_TMP0)) 211 # define IEMNATIVE_SIMD_REG_FIXED_MASK ( UINT32_C(0xffc0) \ 212 | RT_BIT_32(IEMNATIVE_SIMD_REG_FIXED_TMP0)) 204 213 # endif 205 214 # endif … … 229 238 230 239 # ifdef IEMNATIVE_WITH_SIMD_REG_ALLOCATOR 231 # define IEMNATIVE_SIMD_REG_FIXED_TMP0 ARMV8_A64_REG_Q30240 # define IEMNATIVE_SIMD_REG_FIXED_TMP0 ARMV8_A64_REG_Q30 232 241 # if defined(IEMNATIVE_WITH_SIMD_REG_ACCESS_ALL_REGISTERS) 233 # define IEMNATIVE_SIMD_REG_FIXED_MASK RT_BIT_32(ARMV8_A64_REG_Q30)242 # define IEMNATIVE_SIMD_REG_FIXED_MASK RT_BIT_32(ARMV8_A64_REG_Q30) 234 243 # else 235 244 /* … … 242 251 * having to save and restore them in the prologue/epilogue. 243 252 */ 244 # define IEMNATIVE_SIMD_REG_FIXED_MASK ( UINT32_C(0xff00) \245 | RT_BIT_32(ARMV8_A64_REG_Q31) \246 | RT_BIT_32(ARMV8_A64_REG_Q30) \247 | RT_BIT_32(ARMV8_A64_REG_Q29) \248 | RT_BIT_32(ARMV8_A64_REG_Q27) \249 | RT_BIT_32(ARMV8_A64_REG_Q25) \250 | RT_BIT_32(ARMV8_A64_REG_Q23) \251 | RT_BIT_32(ARMV8_A64_REG_Q21) \252 | RT_BIT_32(ARMV8_A64_REG_Q19) \253 | RT_BIT_32(ARMV8_A64_REG_Q17) \254 | RT_BIT_32(ARMV8_A64_REG_Q15) \255 | RT_BIT_32(ARMV8_A64_REG_Q13) \256 | RT_BIT_32(ARMV8_A64_REG_Q11) \257 | RT_BIT_32(ARMV8_A64_REG_Q9) \258 | RT_BIT_32(ARMV8_A64_REG_Q7) \259 | RT_BIT_32(ARMV8_A64_REG_Q5) \260 | RT_BIT_32(ARMV8_A64_REG_Q3) \261 | RT_BIT_32(ARMV8_A64_REG_Q1))253 # define IEMNATIVE_SIMD_REG_FIXED_MASK ( UINT32_C(0xff00) \ 254 | RT_BIT_32(ARMV8_A64_REG_Q31) \ 255 | RT_BIT_32(ARMV8_A64_REG_Q30) \ 256 | RT_BIT_32(ARMV8_A64_REG_Q29) \ 257 | RT_BIT_32(ARMV8_A64_REG_Q27) \ 258 | RT_BIT_32(ARMV8_A64_REG_Q25) \ 259 | RT_BIT_32(ARMV8_A64_REG_Q23) \ 260 | RT_BIT_32(ARMV8_A64_REG_Q21) \ 261 | RT_BIT_32(ARMV8_A64_REG_Q19) \ 262 | RT_BIT_32(ARMV8_A64_REG_Q17) \ 263 | RT_BIT_32(ARMV8_A64_REG_Q15) \ 264 | RT_BIT_32(ARMV8_A64_REG_Q13) \ 265 | RT_BIT_32(ARMV8_A64_REG_Q11) \ 266 | RT_BIT_32(ARMV8_A64_REG_Q9) \ 267 | RT_BIT_32(ARMV8_A64_REG_Q7) \ 268 | RT_BIT_32(ARMV8_A64_REG_Q5) \ 269 | RT_BIT_32(ARMV8_A64_REG_Q3) \ 270 | RT_BIT_32(ARMV8_A64_REG_Q1)) 262 271 # endif 263 272 # endif … … 309 318 # endif 310 319 311 # else 320 # else /* !RT_OS_WINDOWS */ 312 321 # define IEMNATIVE_CALL_ARG_GREG_COUNT 6 313 322 # define IEMNATIVE_CALL_ARG0_GREG X86_GREG_xDI … … 336 345 # define IEMNATIVE_CALL_VOLATILE_SIMD_REG_MASK (UINT32_C(0xffff)) 337 346 # endif 338 # endif 347 # endif /* !RT_OS_WINDOWS */ 339 348 340 349 #elif defined(RT_ARCH_ARM64) … … 384 393 385 394 /** This is the maximum argument count we'll ever be needing. */ 386 #if defined(RT_OS_WINDOWS) && defined(VBOXSTRICTRC_STRICT_ENABLED) 387 # define IEMNATIVE_CALL_MAX_ARG_COUNT 8 388 #else 389 # define IEMNATIVE_CALL_MAX_ARG_COUNT 7 395 #define IEMNATIVE_CALL_MAX_ARG_COUNT 7 396 #ifdef RT_OS_WINDOWS 397 # ifdef VBOXSTRICTRC_STRICT_ENABLED 398 # undef IEMNATIVE_CALL_MAX_ARG_COUNT 399 # define IEMNATIVE_CALL_MAX_ARG_COUNT 8 400 # endif 390 401 #endif 391 402 /** @} */ … … 427 438 428 439 429 #ifndef RT_IN_ASSEMBLER /* the rest of the file */440 #ifndef RT_IN_ASSEMBLER /* ASM-NOINC-START - the rest of the file */ 430 441 431 442 … … 2503 2514 #endif 2504 2515 2505 #endif /* !RT_IN_ASSEMBLER */2516 #endif /* !RT_IN_ASSEMBLER - ASM-NOINC-END */ 2506 2517 2507 2518 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.