haikuwebkit/PerformanceTests/SunSpider
Caio Araujo Neponoceno de Lima cb2f500427 [JSC] OSR exit to LLInt is broken on MIPS
https://bugs.webkit.org/show_bug.cgi?id=203737

Reviewed by Yusuke Suzuki.

JSTests:

Unskipping broken tests due to OSR to LLInt bug.

* microbenchmarks/call-spread-call.js:
* microbenchmarks/throw.js:
* stress/allocation-sinking-hints-are-valid-ssa-2.js:
* stress/allocation-sinking-hints-are-valid-ssa.js:
* stress/arith-profile-for-negate-can-see-non-number-due-to-dfg-osr-exit-profiling.js:
* stress/arrowfunction-lexical-bind-supercall-4.js:
* stress/arrowfunction-tdz-3.js:
* stress/function-constructor-semantics.js:
* stress/global-import-function-should-return-a-promise-when-clearing-exceptions.js:
* stress/stress-cleared-calllinkinfo.js:
* stress/typedarray-configure-index.js:
* stress/v8-deltablue-strict.js:

PerformanceTests/SunSpider:

* tests/v8-v6/v8-deltablue.js:

Source/JavaScriptCore:

This patch is adjusting the OSR to LLInt mechanism to MIPS. When we
use PIC on this architecture, we need to properly configure `$gp`
at some places to be able to access global variables. This is required
on LLInt to access Global Offset Table (got). According to MIPS ABI,
the `$gp` can be recalculated during function prologue using caller
register `$t9`. We also emit such instructions (we can see this as
`OFFLINE_ASM_CPLOAD` macro) immediately after a non-local label on
LLInt. With the introduction of OSR to LLInt mechanism, we now have
return location labels that are reached from `ret` LLInt instructions.
Such return locations are used to properly return to LLInt execution
whenever an OSR exits from inlined call on DFG or FTL to LLInt. When
OSR is materializing LLInt stack frames for inlined functions (or
accessors), it sets return address to its return location label.
This means that for such labels, we need to adjust `$gp`
using `$ra` instead of `$t9`, given that LLInt `ret` operation uses
`jr $ra` to jump the execution to there.
To implement this, we changed `mipsAddPICCode` to emit code
using the correct register required to recalculate `$gp`.
We also changed `callTargetFunction` to use the stubs as return
location points, since the declaration of global labels will emmit
`OFFLINE_ASM_CPLOAD($ra)` and we don't want to execute it during
normal LLInt execution.

* llint/LowLevelInterpreter.asm:
* offlineasm/mips.rb:


Canonical link: https://commits.webkit.org/217694@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-11-20 23:12:41 +00:00
..
hosted
resources
tests
ChangeLog
SunSpider.make
TODO
UNCOVERED
make-hosted
no-architecture-specific-optimizations.yaml
profiler-test.yaml
shadow-chicken.yaml
sunspider
sunspider-compare-results
xcopy.excludes