Changeset 93556 in vbox for trunk/src/bldprogs
- Timestamp:
- Feb 2, 2022 11:14:47 PM (3 years ago)
- Location:
- trunk/src/bldprogs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bldprogs/scm.cpp
r93553 r93556 90 90 SCMOPT_NO_FIX_ERR_H, 91 91 SCMOPT_ONLY_GUEST_HOST_PAGE, 92 SCMOPT_NO_ASM_MEM_PAGE_USE, 93 SCMOPT_UNRESTRICTED_ASM_MEM_PAGE_USE, 92 94 SCMOPT_NO_PAGE_RESTRICTIONS, 93 95 SCMOPT_UPDATE_COPYRIGHT_YEAR, … … 199 201 /* .fFixErrH = */ true, 200 202 /* .fOnlyGuestHostPage = */ false, 203 /* .fNoASMMemPageUse = */ false, 201 204 /* .fUpdateCopyrightYear = */ false, 202 205 /* .fExternalCopyright = */ false, … … 254 257 { "--only-guest-host-page", SCMOPT_ONLY_GUEST_HOST_PAGE, RTGETOPT_REQ_NOTHING }, 255 258 { "--no-page-restrictions", SCMOPT_NO_PAGE_RESTRICTIONS, RTGETOPT_REQ_NOTHING }, 259 { "--no-ASMMemPage-use", SCMOPT_NO_ASM_MEM_PAGE_USE, RTGETOPT_REQ_NOTHING }, 260 { "--unrestricted-ASMMemPage-use", SCMOPT_UNRESTRICTED_ASM_MEM_PAGE_USE, RTGETOPT_REQ_NOTHING }, 256 261 { "--update-copyright-year", SCMOPT_UPDATE_COPYRIGHT_YEAR, RTGETOPT_REQ_NOTHING }, 257 262 { "--no-update-copyright-year", SCMOPT_NO_UPDATE_COPYRIGHT_YEAR, RTGETOPT_REQ_NOTHING }, … … 1184 1189 case SCMOPT_NO_PAGE_RESTRICTIONS: 1185 1190 pSettings->fOnlyGuestHostPage = false; 1191 return VINF_SUCCESS; 1192 1193 case SCMOPT_NO_ASM_MEM_PAGE_USE: 1194 pSettings->fNoASMMemPageUse = true; 1195 return VINF_SUCCESS; 1196 case SCMOPT_UNRESTRICTED_ASM_MEM_PAGE_USE: 1197 pSettings->fNoASMMemPageUse = false; 1186 1198 return VINF_SUCCESS; 1187 1199 … … 2908 2920 " GUEST_ or HOST_ prefix. Default: %RTbool\n", g_Defaults.fOnlyGuestHostPage); 2909 2921 break; 2922 case SCMOPT_NO_ASM_MEM_PAGE_USE: 2923 RTPrintf(" No ASMMemIsZeroPage or ASMMemZeroPage allowed, must instead use\n" 2924 " ASMMemIsZero and RT_BZERO with appropriate page size. Default: %RTbool\n", 2925 g_Defaults.fNoASMMemPageUse); 2926 break; 2910 2927 case SCMOPT_UPDATE_COPYRIGHT_YEAR: 2911 2928 RTPrintf(" Update the copyright year. Default: %RTbool\n", g_Defaults.fUpdateCopyrightYear); -
trunk/src/bldprogs/scm.h
r93553 r93556 359 359 * or HOST_ prefixed versions. */ 360 360 bool fOnlyGuestHostPage; 361 /** No ASMMemIsZeroPage or ASMMemZeroPage calls allowed (C/C++). */ 362 bool fNoASMMemPageUse; 361 363 362 364 /** Update the copyright year. */ -
trunk/src/bldprogs/scmrw.cpp
r93553 r93556 3264 3264 { 3265 3265 RT_NOREF(pOut); 3266 if (!pSettings->fOnlyGuestHostPage) 3267 return false; 3266 if (!pSettings->fOnlyGuestHostPage && !pSettings->fNoASMMemPageUse) 3267 return false; 3268 3269 static RTSTRTUPLE const g_aWords[] = 3270 { 3271 { RT_STR_TUPLE("PAGE_SIZE") }, 3272 { RT_STR_TUPLE("PAGE_SHIFT") }, 3273 { RT_STR_TUPLE("PAGE_OFFSET_MASK") }, 3274 { RT_STR_TUPLE("ASMMemIsZeroPage") }, 3275 { RT_STR_TUPLE("ASMMemZeroPage") }, 3276 }; 3277 size_t const iFirstWord = pSettings->fOnlyGuestHostPage ? 0 : 3; 3278 size_t const iEndWords = pSettings->fNoASMMemPageUse ? 5 : 3; 3268 3279 3269 3280 uint32_t iLine = 0; … … 3274 3285 { 3275 3286 iLine++; 3276 3277 static RTSTRTUPLE const g_aWords[] = 3278 { 3279 { RT_STR_TUPLE("PAGE_SIZE") }, 3280 { RT_STR_TUPLE("PAGE_SHIFT") }, 3281 { RT_STR_TUPLE("PAGE_OFFSET_MASK") }, 3282 }; 3283 for (size_t i = 0; i < RT_ELEMENTS(g_aWords); i++) 3287 for (size_t i = iFirstWord; i < iEndWords; i++) 3284 3288 { 3285 3289 size_t const cchWord = g_aWords[i].cch; … … 3297 3301 && ( cchLeft == cchWord 3298 3302 || !ScmIsCIdentifierChar(pchHit[cchWord])) ) 3299 ScmFixManually(pState, "%u:%zu: %s is not allow! Use GUEST_%s or HOST_%s instead.\n", 3300 iLine, pchHit - pchLine, pszWord, pszWord, pszWord); 3303 { 3304 if (i < 3) 3305 ScmFixManually(pState, "%u:%zu: %s is not allow! Use GUEST_%s or HOST_%s instead.\n", 3306 iLine, pchHit - pchLine + 1, pszWord, pszWord, pszWord); 3307 else 3308 ScmFixManually(pState, "%u:%zu: %s is not allow! Use %s with correct page size instead.\n", 3309 iLine, pchHit - pchLine + 1, pszWord, i == 3 ? "ASMMemIsZero" : "RT_BZERO"); 3310 } 3301 3311 3302 3312 /* next */
Note:
See TracChangeset
for help on using the changeset viewer.