Ignore:
Timestamp:
Mar 10, 2014, 9:53:52 PM (11 years ago)
Author:
[email protected]
Message:

r165414 broke the 32-bit x86 tests: ASSERTION FAILED: result != InvalidIndex @ GPRInfo.h:330.
<https://webkit.org/b/130065>

Reviewed by Michael Saboff.

There is code in ScratchRegisterAllocator.cpp that is relying on GPRInfo::toIndex()
being able to return InvalidIndex. Hence, the assertion is invalid. Ditto for
FPRInfo::toIndex().

The fix is to remove the "result != InvalidIndex" assertions.

  • jit/FPRInfo.h:

(JSC::FPRInfo::toIndex):

  • jit/GPRInfo.h:

(JSC::GPRInfo::toIndex):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/GPRInfo.h

    r165362 r165431  
    328328        static const unsigned indexForRegister[8] = { 0, 2, 1, 3, InvalidIndex, InvalidIndex, 5, 4 };
    329329        unsigned result = indexForRegister[reg];
    330         ASSERT(result != InvalidIndex);
    331330        return result;
    332331    }
     
    505504#endif
    506505        unsigned result = indexForRegister[reg];
    507         ASSERT(result != InvalidIndex);
    508506        return result;
    509507    }
     
    685683        };
    686684        unsigned result = indexForRegister[reg];
    687         ASSERT(result != InvalidIndex);
    688685        return result;
    689686    }
     
    757754        static const unsigned indexForRegister[14] = { 0, 1, 2, InvalidIndex, 4, 5, 6, 7, 8, 9, 3, InvalidIndex, InvalidIndex, InvalidIndex };
    758755        unsigned result = indexForRegister[reg];
    759         ASSERT(result != InvalidIndex);
    760756        return result;
    761757    }
Note: See TracChangeset for help on using the changeset viewer.