Ignore:
Timestamp:
Feb 26, 2020, 6:06:30 AM (5 years ago)
Author:
Caio Lima
Message:

[JSC][MIPS] Adding support to Checkpoints
https://bugs.webkit.org/show_bug.cgi?id=208196

Reviewed by Yusuke Suzuki.

JSTests:

  • microbenchmarks/memcpy-typed-loop.js:

Source/JavaScriptCore:

This patch is adding changes to properly support OSR to
checkpoints on MIPS. It required fixes on JIT probe and some
adjustment on Offlineasm to correct generate $gp load when executing
checkpoint_osr_exit_from_inlined_call_trampoline.

  • assembler/MacroAssemblerMIPS.cpp:

Probe trampoline needs to allocate 16 bytes for 4 arguments to
properly follow C calling conventions. This space is used by callee
when the JSC is compiled with -O0 flags
(Check "DEFAULT C CALLING CONVENTION (O32)" section on
https://www.mips.com/downloads/mips32-instruction-set-quick-reference-v1-01).

  • llint/LowLevelInterpreter.asm:

As we need to do on ARMv7, 64-bits arguments needs to be passed in
register pairs $a1:$a0 or $a3:$a2 (little-endian mode). Since $a0
contais CallFrame*, we need to pass EncodedJSValue on $a3:$a2
pair.

  • offlineasm/mips.rb:

Following the same reason for return locations on OSR to LLInt, we
need to adjust $gp using $ra instead of $t9 on
checkpoint_osr_exit_from_inlined_call_trampoline, given it is only
reachable through ret operations. For detailed explanation, check
ChangeLog of https://trac.webkit.org/changeset/252713.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/mips.rb

    r254674 r257466  
    686686        myList << node
    687687        if node.is_a? Label
    688             if node.name =~ /^.*_return_location(?:_(?:wide16|wide32))?$/
     688            # FIXME: [JSC] checkpoint_osr_exit_from_inlined_call_trampoline is a return location
     689            # and we should name it properly.
     690            # https://bugs.webkit.org/show_bug.cgi?id=208236
     691            if node.name =~ /^.*_return_location(?:_(?:wide16|wide32))?$/ or node.name.start_with?("_checkpoint_osr_exit_from_inlined_call_trampoline")
    689692                # We need to have a special case for return location labels because they are always
    690693                # reached from a `ret` instruction. In this case, we need to proper reconfigure `$gp`
Note: See TracChangeset for help on using the changeset viewer.