Title: [170598] trunk/Source/WebCore
- Revision
- 170598
- Author
- achristen...@apple.com
- Date
- 2014-06-30 14:25:33 -0700 (Mon, 30 Jun 2014)
Log Message
Use non-thumb registers in armv7 css jit.
https://bugs.webkit.org/show_bug.cgi?id=134450
Reviewed by Geoff Garen.
* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::isValidRegister):
(WebCore::RegisterAllocator::isCallerSavedRegister):
Use additional general purpose registers.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
Always succeed when compiling css selectors.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (170597 => 170598)
--- trunk/Source/WebCore/ChangeLog 2014-06-30 21:21:29 UTC (rev 170597)
+++ trunk/Source/WebCore/ChangeLog 2014-06-30 21:25:33 UTC (rev 170598)
@@ -1,3 +1,19 @@
+2014-06-30 Alex Christensen <achristen...@webkit.org>
+
+ Use non-thumb registers in armv7 css jit.
+ https://bugs.webkit.org/show_bug.cgi?id=134450
+
+ Reviewed by Geoff Garen.
+
+ * cssjit/RegisterAllocator.h:
+ (WebCore::RegisterAllocator::isValidRegister):
+ (WebCore::RegisterAllocator::isCallerSavedRegister):
+ Use additional general purpose registers.
+ * cssjit/SelectorCompiler.cpp:
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
+ (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
+ Always succeed when compiling css selectors.
+
2014-06-30 Myles C. Maxfield <mmaxfi...@apple.com>
Tiles on bottom of screen are not always allocated when necessary
Modified: trunk/Source/WebCore/cssjit/RegisterAllocator.h (170597 => 170598)
--- trunk/Source/WebCore/cssjit/RegisterAllocator.h 2014-06-30 21:21:29 UTC (rev 170597)
+++ trunk/Source/WebCore/cssjit/RegisterAllocator.h 2014-06-30 21:25:33 UTC (rev 170598)
@@ -62,11 +62,15 @@
JSC::ARMRegisters::r1,
JSC::ARMRegisters::r2,
JSC::ARMRegisters::r3,
+ JSC::ARMRegisters::r9,
};
static const JSC::MacroAssembler::RegisterID calleeSavedRegisters[] = {
JSC::ARMRegisters::r4,
JSC::ARMRegisters::r5,
JSC::ARMRegisters::r7,
+ JSC::ARMRegisters::r8,
+ JSC::ARMRegisters::r10,
+ JSC::ARMRegisters::r11,
};
// r6 is also used as addressTempRegister in the macro assembler. It is saved in the prologue and restored in the epilogue.
static const JSC::MacroAssembler::RegisterID tempRegister = JSC::ARMRegisters::r6;
@@ -175,7 +179,7 @@
return (registerID >= JSC::ARM64Registers::x0 && registerID <= JSC::ARM64Registers::x14)
|| registerID == JSC::ARM64Registers::x19;
#elif CPU(ARM_THUMB2)
- return registerID >= JSC::ARMRegisters::r0 && registerID <= JSC::ARMRegisters::r7 && registerID != JSC::ARMRegisters::r6;
+ return registerID >= JSC::ARMRegisters::r0 && registerID <= JSC::ARMRegisters::r11 && registerID != JSC::ARMRegisters::r6;
#elif CPU(X86_64)
return (registerID >= JSC::X86Registers::eax && registerID <= JSC::X86Registers::edx)
|| (registerID >= JSC::X86Registers::esi && registerID <= JSC::X86Registers::r15);
@@ -190,7 +194,8 @@
#if CPU(ARM64)
return registerID >= JSC::ARM64Registers::x0 && registerID <= JSC::ARM64Registers::x14;
#elif CPU(ARM_THUMB2)
- return registerID >= JSC::ARMRegisters::r0 && registerID <= JSC::ARMRegisters::r3;
+ return (registerID >= JSC::ARMRegisters::r0 && registerID <= JSC::ARMRegisters::r3)
+ || registerID == JSC::ARMRegisters::r9;
#elif CPU(X86_64)
return (registerID >= JSC::X86Registers::eax && registerID <= JSC::X86Registers::edx)
|| (registerID >= JSC::X86Registers::esi && registerID <= JSC::X86Registers::r11);
Modified: trunk/Source/WebCore/cssjit/SelectorCompiler.cpp (170597 => 170598)
--- trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2014-06-30 21:21:29 UTC (rev 170597)
+++ trunk/Source/WebCore/cssjit/SelectorCompiler.cpp 2014-06-30 21:25:33 UTC (rev 170598)
@@ -206,7 +206,7 @@
static const Assembler::RegisterID checkingContextRegister;
static const Assembler::RegisterID callFrameRegister;
- bool generateSelectorChecker();
+ void generateSelectorChecker();
// Element relations tree walker.
void generateWalkToParentNode(Assembler::RegisterID targetRegister);
@@ -733,8 +733,7 @@
switch (m_functionType) {
case FunctionType::SimpleSelectorChecker:
case FunctionType::SelectorCheckerWithCheckingContext:
- if (!generateSelectorChecker())
- return SelectorCompilationStatus::CannotCompile;
+ generateSelectorChecker();
break;
case FunctionType::CannotMatchAnything:
m_assembler.move(Assembler::TrustedImm32(0), returnRegister);
@@ -1165,24 +1164,13 @@
#endif
}
-bool SelectorCodeGenerator::generateSelectorChecker()
+void SelectorCodeGenerator::generateSelectorChecker()
{
Vector<StackAllocator::StackReference> calleeSavedRegisterStackReferences;
bool reservedCalleeSavedRegisters = false;
unsigned availableRegisterCount = m_registerAllocator.availableRegisterCount();
unsigned minimumRegisterCountForAttributes = minimumRegisterRequirements(m_selectorFragments);
- if (minimumRegisterCountForAttributes > registerCount) {
-#if !CPU(ARM_THUMB2)
- // ARM_THUMB2 does not have enough registers to compile complicated selectors.
- // Compiling should always succeed on non-ARM_THUMB2 CPUs.
- ASSERT_NOT_REACHED();
-#endif
#if CSS_SELECTOR_JIT_DEBUGGING
- dataLogF("Failed to compile because it would have required %u registers\n", minimumRegisterCountForAttributes);
-#endif
- return false;
- }
-#if CSS_SELECTOR_JIT_DEBUGGING
dataLogF("Compiling with minimum required register count %u\n", minimumRegisterCountForAttributes);
#endif
@@ -1281,7 +1269,6 @@
generateEpilogue();
m_assembler.ret();
}
- return true;
}
static inline Assembler::Jump testIsElementFlagOnNode(Assembler::ResultCondition condition, Assembler& assembler, Assembler::RegisterID nodeAddress)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes