We do a lot of pushing and popping that we don't need to, especially on armv7 and x86_64. This could minimize it.
Created attachment 233185 [details] Patch
Comment on attachment 233185 [details] Patch We need a way to specify whether we want to save the values in the argument registers.
Created attachment 233994 [details] Patch
Created attachment 234001 [details] Patch
Comment on attachment 234001 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=234001&action=review r=me > Source/WebCore/cssjit/SelectorCompiler.cpp:1442 > // FIXME: We should look into doing something smart in MacroAssembler instead. > Assembler::Address flagAddress(childStyle, RenderStyle::noninheritedFlagsMemoryOffset() + RenderStyle::NonInheritedFlags::flagsMemoryOffset()); > #if CPU(ARM_THUMB2) > - m_assembler.or32(Assembler::TrustedImm32(newFlag & 0xffffffff), flagAddress); > - Assembler::Address flagHighBits = flagAddress.withOffset(4); > - m_assembler.or32(Assembler::TrustedImm32(newFlag >> 32), flagHighBits); > + int32_t flagLowBits = newFlag & 0xffffffff; > + int32_t flagHighBits = newFlag >> 32; > + if (flagLowBits) > + m_assembler.or32(Assembler::TrustedImm32(flagLowBits), flagAddress); > + if (flagHighBits) { > + Assembler::Address flagHighAddress = flagAddress.withOffset(4); > + m_assembler.or32(Assembler::TrustedImm32(flagHighBits), flagHighAddress); > + } A good optimization, but probably better as a separate patch, since the topic is not related to register saving.
http://trac.webkit.org/changeset/170548