Make CSS JIT run on ARM64.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 May 2014 01:06:16 +0000 (01:06 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 May 2014 01:06:16 +0000 (01:06 +0000)
commitffe52f462d148bbb014cc81df360a070a0354ad9
tree1ba238d01766ee0458ae568dcd87f90e9eadce1a
parent8e2cfc23f615df0cb3c7dc89d2917857c58fbd30
Make CSS JIT run on ARM64.
https://bugs.webkit.org/show_bug.cgi?id=133156

Reviewed by Benjamin Poulain.

* cssjit/FunctionCall.h:
(WebCore::FunctionCall::saveAllocatedRegisters):
(WebCore::FunctionCall::restoreAllocatedRegisters):
Use StackAllocator's new push and pop functions to push and pop a vector instead of iterating it.
* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::reserveCalleeSavedRegisters):
(WebCore::RegisterAllocator::restoreCalleeSavedRegisters):
Return a vector of registers to allocate instead of doing the allocation to make the RegisterAllocator
not need to know about the StackAllocator and to use the new vector push and pop functions.
(WebCore::RegisterAllocator::~RegisterAllocator):
Store RegisterIDs instead of StackReferences to avoid needing to know about the stack.
* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
Removed the requirement for assert to be disabled to print disassembly when debugging css jit.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
Added to correctly push the link register and frame pointer.
This is required if the jit code calls a function on arm64 and helpful for debugging tools on x86_64.
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
Generate the prologue and epilogue which respectively push and pop
the link register, frame pointer, and callee saved registers if needed.
* cssjit/StackAllocator.h:
(WebCore::StackAllocator::push):
(WebCore::StackAllocator::pop):
Added new vector push and pop functions to use stp and ldb instructions on arm64.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@169297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/cssjit/FunctionCall.h
Source/WebCore/cssjit/RegisterAllocator.h
Source/WebCore/cssjit/SelectorCompiler.cpp
Source/WebCore/cssjit/StackAllocator.h