Changeset 106198 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 1, 2024 10:22:31 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/target-x86/IEMAllN8veEmit-x86.h
r106197 r106198 559 559 * It takes liveness stuff into account. 560 560 */ 561 /** @todo make fNativeFlags a template argument. */ 561 template<bool a_fNeedToSetFlags> 562 562 DECL_INLINE_THROW(uint32_t) 563 563 iemNativeEmitEFlagsForLogical(PIEMRECOMPILERSTATE pReNative, uint32_t off, uint8_t idxVarEfl, 564 uint8_t cOpBits, uint8_t idxRegResult 565 #ifndef RT_ARCH_AMD64 566 , bool fNativeFlags = false 567 #endif 568 ) 564 uint8_t cOpBits, uint8_t idxRegResult) 569 565 { 570 566 STAM_COUNTER_INC(&pReNative->pVCpu->iem.s.StatNativeEflTotalLogical); … … 624 620 # error "port me" 625 621 #endif 626 #ifndef RT_ARCH_AMD64 627 if (!fNativeFlags) 628 off = iemNativeEmitPostponedEFlagsCalcLogical<true>(pCodeBuf, off, cOpBits, idxRegResult, idxRegEfl, idxRegTmp); 629 else 630 #endif 631 off = iemNativeEmitPostponedEFlagsCalcLogical<false>(pCodeBuf, off, cOpBits, idxRegResult, idxRegEfl, idxRegTmp); 622 off = iemNativeEmitPostponedEFlagsCalcLogical<a_fNeedToSetFlags>(pCodeBuf, off, cOpBits, idxRegResult, 623 idxRegEfl, idxRegTmp); 632 624 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 633 625 … … 872 864 iemNativeVarRegisterRelease(pReNative, idxVarSrc); 873 865 874 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);866 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 875 867 876 868 #elif defined(RT_ARCH_ARM64) … … 881 873 iemNativeVarRegisterRelease(pReNative, idxVarSrc); 882 874 883 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst, true /*fNativeFlags*/);875 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegDst, true /*fNativeFlags*/); 884 876 #else 885 877 # error "Port me" … … 904 896 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 905 897 906 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);898 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 907 899 908 900 #elif defined(RT_ARCH_ARM64) … … 932 924 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 933 925 934 off = iemNativeEmitEFlagsForLogical(pReNative, off, idxVarEfl, cOpBits, idxRegDst, cOpBits >= 32 /*fNativeFlags*/); 926 if (cOpBits >= 32) 927 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 928 else 929 off = iemNativeEmitEFlagsForLogical<true>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 935 930 RT_NOREF_PV(cImmBits); 936 931 … … 979 974 980 975 #ifdef RT_ARCH_AMD64 981 off = iemNativeEmitEFlagsForLogical(pReNative, off, idxVarEfl, cOpBits, UINT8_MAX); 982 #else 983 off = iemNativeEmitEFlagsForLogical(pReNative, off, idxVarEfl, cOpBits, idxRegResult, cOpBits >= 32 /*fNativeFlags*/); 976 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, UINT8_MAX); 977 #else 978 if (cOpBits >= 32) 979 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegResult); 980 else 981 off = iemNativeEmitEFlagsForLogical<true>(pReNative, off, idxVarEfl, cOpBits, idxRegResult); 984 982 iemNativeRegFreeTmp(pReNative, idxRegResult); 985 983 #endif … … 1003 1001 iemNativeVarRegisterRelease(pReNative, idxVarDst); 1004 1002 1005 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, UINT8_MAX);1003 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, UINT8_MAX); 1006 1004 1007 1005 #elif defined(RT_ARCH_ARM64) … … 1034 1032 iemNativeVarRegisterRelease(pReNative, idxVarDst); 1035 1033 1036 off = iemNativeEmitEFlagsForLogical(pReNative, off, idxVarEfl, cOpBits, idxRegResult, cOpBits >= 32 /*fNativeFlags*/); 1034 if (cOpBits >= 32) 1035 off = iemNativeEmitEFlagsForLogical<>(pReNative, off, idxVarEfl, cOpBits, idxRegResult); 1036 else 1037 off = iemNativeEmitEFlagsForLogical<>(pReNative, off, idxVarEfl, cOpBits, idxRegResult); 1037 1038 1038 1039 iemNativeRegFreeTmp(pReNative, idxRegResult); … … 1063 1064 iemNativeVarRegisterRelease(pReNative, idxVarSrc); 1064 1065 1065 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);1066 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 1066 1067 1067 1068 #elif defined(RT_ARCH_ARM64) … … 1072 1073 iemNativeVarRegisterRelease(pReNative, idxVarSrc); 1073 1074 1074 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);1075 off = iemNativeEmitEFlagsForLogical<true>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 1075 1076 1076 1077 #else … … 1096 1097 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 1097 1098 1098 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);1099 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 1099 1100 1100 1101 #elif defined(RT_ARCH_ARM64) … … 1118 1119 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 1119 1120 1120 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);1121 off = iemNativeEmitEFlagsForLogical<true>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 1121 1122 RT_NOREF_PV(cImmBits); 1122 1123 … … 1146 1147 iemNativeVarRegisterRelease(pReNative, idxVarSrc); 1147 1148 1148 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);1149 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 1149 1150 1150 1151 #elif defined(RT_ARCH_ARM64) … … 1155 1156 iemNativeVarRegisterRelease(pReNative, idxVarSrc); 1156 1157 1157 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);1158 off = iemNativeEmitEFlagsForLogical<true>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 1158 1159 1159 1160 #else … … 1179 1180 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 1180 1181 1181 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);1182 off = iemNativeEmitEFlagsForLogical<false>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 1182 1183 1183 1184 #elif defined(RT_ARCH_ARM64) … … 1201 1202 IEMNATIVE_ASSERT_INSTR_BUF_ENSURE(pReNative, off); 1202 1203 1203 off = iemNativeEmitEFlagsForLogical (pReNative, off, idxVarEfl, cOpBits, idxRegDst);1204 off = iemNativeEmitEFlagsForLogical<true>(pReNative, off, idxVarEfl, cOpBits, idxRegDst); 1204 1205 RT_NOREF_PV(cImmBits); 1205 1206
Note:
See TracChangeset
for help on using the changeset viewer.