Hi, I think this is the best mailing list to discuss the technical questions about the porting of DFG JIT since everybody is here, still we do not pollute webkit-dev. My questions: - What is the difference between labelIgnoringWatchpoints, labelForWatchpoint, and label. - What is the difference between *_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_* macros? Are they similar to the DEFINE_STUB_FUNCTION macros? Thanks, Zoltan
Hi Zoltan, On Jun 25, 2012, at 11:08 AM, Zoltan Herczeg wrote:
- What is the difference between labelIgnoringWatchpoints, labelForWatchpoint, and label.
- What is the difference between *_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_* macros? Are they similar to the DEFINE_STUB_FUNCTION macros?
Filip can best answer your question about watchpoints. So far as the function wrappers are concerned, yes, these are certainly similar, in that they pass the return address of the call site into the JIT helper functions. There are a couple of minor differences. The baseline JIT's stub function macros place the return address in memory, so that not only can it be read by the helper functions, but it also may be modified (when an exception is thrown). The DFG JIT does not currently require that the return address is in memory; it is passed just like any regular C function argument. In the DFG JIT exceptions are trapped by a branch on the return value. In the baseline JIT we down use a wrapper on x86, since the return address is already in memory, in the DFG JIT we do provide a wrapper to avoid a little calling-convention dependent magic in the helper. cheers, Gavin
Hi, I think I am quite close to finish the DFG JIT port of ARM traditional as you requested, but I still don't understand the concept of watchpoints, and this is a blocker for me. Filip or anyone, could you help me?
- What is the difference between labelIgnoringWatchpoints, labelForWatchpoint, and label.
Filip can best answer your question about watchpoints.
First function: AssemblerLabel labelForWatchpoint() { AssemblerLabel result = m_formatter.label(); if (static_cast<int>(result.m_offset) != m_indexOfLastWatchpoint) result = label(); m_indexOfLastWatchpoint = result.m_offset; m_indexOfTailOfLastWatchpoint = result.m_offset + maxJumpReplacementSize(); return result; } - why result.m_offset != m_indexOfLastWatchpoint? Isn't this should be equal? - maxJumpReplacementSize() is constant, why do you need two member variables here? Isn't m_indexOfLastWatchpoint = m_indexOfTailOfLastWatchpoint - maxJumpReplacementSize() all the time? AssemblerLabel label() {...} - What is the purpose of inserting these nops()? static void replaceWithJump(void* instructionStart, void* to) {...} - This is the strangest function for me. Replace what? A jump, a nop or something else? - How this function relates to labelForWatchpoint()? - Do you have to manually insert nops / jumps after a labelForWatchpoint? Since I don't understand the concept of these functions, my questions may be incorrect. Please, help me. Thanks, Zoltan
participants (2)
-
Gavin Barraclough
-
Zoltan Herczeg