VirtualBox

Ignore:
Timestamp:
May 12, 2023 12:21:58 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157370
Message:

*: Mark functions as static if not used outside of a given compilation unit. Enables the compiler to optimize inlining, reduces the symbol tables, exposes unused functions and in some rare cases exposes mismtaches between function declarations and definitions, but most importantly reduces the number of parfait reports for the extern-function-no-forward-declaration category. This should not result in any functional changes, bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp

    r98103 r99775  
    139139
    140140
    141 bool CidetInstrHasMrmMemOperand(PCCIDETINSTR pInstr)
     141static bool CidetInstrHasMrmMemOperand(PCCIDETINSTR pInstr)
    142142{
    143143    return CIDET_INSTR_TEST_OP_FLAG(pInstr, CIDET_OF_M_RM_ONLY_M);
     
    145145
    146146
    147 bool CidetInstrHasMrmRegOperand(PCCIDETINSTR pInstr)
     147static bool CidetInstrHasMrmRegOperand(PCCIDETINSTR pInstr)
    148148{
    149149    return CIDET_INSTR_TEST_OP_FLAG(pInstr, CIDET_OF_M_RM_ONLY_R);
     
    151151
    152152
    153 bool CidetInstrRespondsToOperandSizePrefixes(PCCIDETINSTR pInstr)
     153static bool CidetInstrRespondsToOperandSizePrefixes(PCCIDETINSTR pInstr)
    154154{
    155155    return CIDET_INSTR_TEST_OP_MASK_VALUE(pInstr, CIDET_OF_Z_MASK, CIDET_OF_Z_VAR_WDQ);
     
    188188 * @param   va              Arguments referenced in @a pszFormat.
    189189 */
    190 int CidetCoreSetErrorV(PCIDETCORE pThis, const char *pszFormat, va_list va)
     190static int CidetCoreSetErrorV(PCIDETCORE pThis, const char *pszFormat, va_list va)
    191191{
    192192    pThis->pfnFailure(pThis, pszFormat, va);
     
    203203 * @param   ...             Arguments referenced in @a pszFormat.
    204204 */
    205 bool CidetCoreSetError(PCIDETCORE pThis, const char *pszFormat, ...)
     205static bool CidetCoreSetError(PCIDETCORE pThis, const char *pszFormat, ...)
    206206{
    207207    va_list va;
     
    220220 * @param   cbSignificant   The number of significant bytes.
    221221 */
    222 int64_t CidetCoreGetRandS64(PCIDETCORE pThis, uint8_t cbSignificant)
     222static int64_t CidetCoreGetRandS64(PCIDETCORE pThis, uint8_t cbSignificant)
    223223{
    224224    int64_t iVal = RTRandAdvS64(pThis->hRand);
     
    243243 * @param   cbSignificant   The number of significant bytes.
    244244 */
    245 uint64_t CidetCoreGetRandU64(PCIDETCORE pThis, uint8_t cbSignificant)
     245static uint64_t CidetCoreGetRandU64(PCIDETCORE pThis, uint8_t cbSignificant)
    246246{
    247247    Assert(cbSignificant == 1 || cbSignificant == 2 || cbSignificant == 4 || cbSignificant == 8);
     
    255255
    256256
    257 void CidetCoreInitializeCtxTemplate(PCIDETCORE pThis)
     257static void CidetCoreInitializeCtxTemplate(PCIDETCORE pThis)
    258258{
    259259    pThis->InTemplateCtx.rip = UINT64_MAX;
     
    327327
    328328
    329 bool CidetCoreIsEncodingCompatibleWithInstruction(PCIDETCORE pThis)
     329static bool CidetCoreIsEncodingCompatibleWithInstruction(PCIDETCORE pThis)
    330330{
    331331    RT_NOREF_PV(pThis);
     
    12271227
    12281228
    1229 bool CidetCoreSetupNextBaseEncoding(PCIDETCORE pThis)
     1229static bool CidetCoreSetupNextBaseEncoding(PCIDETCORE pThis)
    12301230{
    12311231    if (pThis->fUsesModRm)
     
    12781278
    12791279
    1280 bool CidetCoreSetupFirstBaseEncoding(PCIDETCORE pThis)
     1280static bool CidetCoreSetupFirstBaseEncoding(PCIDETCORE pThis)
    12811281{
    12821282    /*
     
    13311331 * @param   pThis               The core state structure.
    13321332 */
    1333 bool CidetCoreSetupNextMemoryOperandConfig(PCIDETCORE pThis)
     1333static bool CidetCoreSetupNextMemoryOperandConfig(PCIDETCORE pThis)
    13341334{
    13351335    RT_NOREF_PV(pThis);
     
    13441344 * @param   pThis               The core state structure.
    13451345 */
    1346 bool CidetCoreSetupFirstMemoryOperandConfig(PCIDETCORE pThis)
     1346static bool CidetCoreSetupFirstMemoryOperandConfig(PCIDETCORE pThis)
    13471347{
    13481348    pThis->cMemoryOperands = 0;
     
    13841384 * @param   pThis               The core state structure.
    13851385 */
    1386 bool CidetCoreSetupNextCodeBufferConfig(PCIDETCORE pThis)
     1386static bool CidetCoreSetupNextCodeBufferConfig(PCIDETCORE pThis)
    13871387{
    13881388    RT_NOREF_PV(pThis);
     
    13971397 * @param   pThis               The core state structure.
    13981398 */
    1399 bool CidetCoreSetupFirstCodeBufferConfig(PCIDETCORE pThis)
     1399static bool CidetCoreSetupFirstCodeBufferConfig(PCIDETCORE pThis)
    14001400{
    14011401    Assert(pThis->cCodeBufConfigs > 0);
     
    14761476
    14771477
    1478 bool CideCoreSetInstruction(PCIDETCORE pThis, PCCIDETINSTR pInstr)
     1478static bool CideCoreSetInstruction(PCIDETCORE pThis, PCCIDETINSTR pInstr)
    14791479{
    14801480    AssertReleaseMsgReturn(RT_VALID_PTR(pInstr), ("%p\n", pInstr), false);
     
    15681568
    15691569
    1570 bool CidetCoreSetupInOut(PCIDETCORE pThis)
     1570static bool CidetCoreSetupInOut(PCIDETCORE pThis)
    15711571{
    15721572    /*
     
    18861886 * @param   pThis           The core state structure (for context).
    18871887 */
    1888 bool CidetCoreAssembleLength(PCIDETCORE pThis)
     1888static bool CidetCoreAssembleLength(PCIDETCORE pThis)
    18891889{
    18901890    uint8_t off = 0;
     
    20042004 * @param   pThis           The core state structure (for context).
    20052005 */
    2006 bool CidetCoreAssemble(PCIDETCORE pThis)
     2006static bool CidetCoreAssemble(PCIDETCORE pThis)
    20072007{
    20082008    uint8_t off = 0;
     
    21132113
    21142114
    2115 bool CidetCoreReInitCodeBuf(PCIDETCORE pThis)
     2115static bool CidetCoreReInitCodeBuf(PCIDETCORE pThis)
    21162116{
    21172117    /*
     
    21612161
    21622162
    2163 bool CidetCoreSetupCodeBuf(PCIDETCORE pThis, unsigned iSubTest)
     2163static bool CidetCoreSetupCodeBuf(PCIDETCORE pThis, unsigned iSubTest)
    21642164{
    21652165    if (CidetCoreAssemble(pThis))
     
    22022202 * @param   pThis           The core state structure.
    22032203 */
    2204 bool CidetCoreCheckResults(PCIDETCORE pThis)
     2204static bool CidetCoreCheckResults(PCIDETCORE pThis)
    22052205{
    22062206    if (memcmp(&pThis->ActualCtx, &pThis->ExpectedCtx, CIDETCPUCTX_COMPARE_SIZE) == 0)
     
    22652265
    22662266
    2267 bool CidetCoreTest_Basic(PCIDETCORE pThis)
     2267static bool CidetCoreTest_Basic(PCIDETCORE pThis)
    22682268{
    22692269    /*
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette