VirtualBox

Changeset 101742 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 3, 2023 3:16:50 PM (13 months ago)
Author:
vboxsync
Message:

VMM/IEM: Consider #if/#ifdef/#ifndef/#elif/#else/#endif when picking MC blocks for the threaded and native recompilation. This should fix the cmpxchg16b compile problems on arm64. [fix] bugref:10371

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllInstPython.py

    r101732 r101742  
    33313331
    33323332        @staticmethod
    3333         def isInBlockForArch(aoCppCondStack, sArch):
     3333        def isInBlockForArch(aoCppCondStack, sArch, iLine):
    33343334            """ Checks if sArch is included in the current conditional block. """
     3335            _ = iLine;
     3336            #print('debug: isInBlockForArch(%s,%s); line %s' % (len(aoCppCondStack), sArch, iLine), file = sys.stderr);
    33353337            for oCond in aoCppCondStack:
    33363338                if oCond.isArchIncludedInPrimaryBlock(sArch):
    33373339                    if oCond.aoElif or oCond.fInElse:
     3340                        #print('debug: isInBlockForArch -> False #1', file = sys.stderr);
    33383341                        return False;
     3342                    #print('debug: isInBlockForArch(%s,%s): in IF-block' % (len(aoCppCondStack), sArch), file = sys.stderr);
    33393343                else:
     3344                    fFine = False;
    33403345                    for oElifCond in oCond.aoElif:
    33413346                        if oElifCond.isArchIncludedInPrimaryBlock(sArch):
    33423347                            if oElifCond is not oCond.aoElif[-1] or oCond.fInElse:
     3348                                #print('debug: isInBlockForArch -> False #3', file = sys.stderr);
    33433349                                return False;
    3344 
     3350                            fFine = True;
     3351                    if not fFine and not oCond.fInElse:
     3352                        #print('debug: isInBlockForArch -> False #4', file = sys.stderr);
     3353                        return False;
     3354            #print('debug: isInBlockForArch -> True', file = sys.stderr);
    33453355            return True;
    33463356
     
    50295039            if (   not self.aoCppCondStack
    50305040                or not self.sHostArch
    5031                 or self.PreprocessorConditional.isInBlockForArch(self.aoCppCondStack, self.sHostArch)):
     5041                or self.PreprocessorConditional.isInBlockForArch(self.aoCppCondStack, self.sHostArch, self.iLine)):
    50325042                g_aoMcBlocks.append(self.oCurMcBlock);
    50335043                self.cTotalMcBlocks += 1;
Note: See TracChangeset for help on using the changeset viewer.

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