Summary: | fix css jit register usage on armv7 | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||
Component: | JavaScriptCore | Assignee: | Alex Christensen <achristensen> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 133961 | ||||||
Attachments: |
|
Description
Alex Christensen
2014-06-16 14:27:23 PDT
Created attachment 233180 [details]
Patch
Comment on attachment 233180 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=233180&action=review > Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:1423 > - load32(left, dataTempRegister); > - return branch32(cond, dataTempRegister, right); > + // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/ > + load32(left, addressTempRegister); > + return branch32(cond, addressTempRegister, right); I don't get this. We know exactly which branch32() we want to use (Jump branch32(RelationalCondition cond, RegisterID left, RegisterID right)). What am I missing? > Source/WebCore/cssjit/SelectorCompiler.cpp:1096 > + // r6 is tempRegister in RegisterAllocator.h and addressTempRegister in MacroAssemblerARMv7.h and must be preserved by the callee. > + prologueRegisters.append(JSC::ARMRegisters::r6); I did not think of that. One more reason I hate the registers implicitly used by the MacroAssembler. (In reply to comment #2) > (From update of attachment 233180 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=233180&action=review > > > Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:1423 > > - load32(left, dataTempRegister); > > - return branch32(cond, dataTempRegister, right); > > + // use addressTempRegister incase the branch32 we call uses dataTempRegister. :-/ > > + load32(left, addressTempRegister); > > + return branch32(cond, addressTempRegister, right); > > I don't get this. We know exactly which branch32() we want to use (Jump branch32(RelationalCondition cond, RegisterID left, RegisterID right)). What am I missing? I think you're right. I'll test it in the morning without this change. For some reason I though it was necessary, but now I'm not sure. I confirmed that branchPtr is used and works without this change, so I'm committing the non-JavaScriptCore part of this patch. |