Bug 131532 - [sh4] LLINT is broken
Summary: [sh4] LLINT is broken
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-11 03:03 PDT by Julien Brianceau
Modified: 2014-04-14 01:07 PDT (History)
2 users (show)

See Also:


Attachments
Fix sh4 LLINT (9.68 KB, patch)
2014-04-11 03:16 PDT, Julien Brianceau
no flags Details | Formatted Diff | Diff
Fix sh4 LLINT (with consistent letter casing) (9.68 KB, patch)
2014-04-11 08:46 PDT, Julien Brianceau
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Brianceau 2014-04-11 03:03:58 PDT
sh4 backend of LLINT is broken since C stack merge.
Specific parts are missing since http://trac.webkit.org/changeset/167094 too.
Comment 1 Julien Brianceau 2014-04-11 03:16:56 PDT
Created attachment 229122 [details]
Fix sh4 LLINT
Comment 2 Mark Lam 2014-04-11 08:00:11 PDT
Comment on attachment 229122 [details]
Fix sh4 LLINT

View in context: https://bugs.webkit.org/attachment.cgi?id=229122&action=review

> Source/JavaScriptCore/offlineasm/instructions.rb:296
> +    "alignFormova",

nit: This looks weird.  I suggest either renaming this to alignformova, or alignForMova or alignForMovA.
Comment 3 Julien Brianceau 2014-04-11 08:46:10 PDT
Created attachment 229134 [details]
Fix sh4 LLINT (with consistent letter casing)
Comment 4 Mark Lam 2014-04-11 08:47:37 PDT
Comment on attachment 229134 [details]
Fix sh4 LLINT (with consistent letter casing)

r=me
Comment 5 Julien Brianceau 2014-04-11 08:57:01 PDT
Committed r167127: <http://trac.webkit.org/changeset/167127>
Comment 6 Michael Saboff 2014-04-11 17:51:21 PDT
Comment on attachment 229134 [details]
Fix sh4 LLINT (with consistent letter casing)

View in context: https://bugs.webkit.org/attachment.cgi?id=229134&action=review

> Source/JavaScriptCore/llint/LowLevelInterpreter.asm:721
> +        mova _relativePCBase, t0
> +        move t0, pcBase

Why can't you just mova _relativePCBase directly into pcBase?

> Source/JavaScriptCore/offlineasm/sh4.rb:1032
> +            $asm.puts ".balign 4"

If the .balign has to fill, is the '0' fill going to be a nop?  You may want to explicitly mention that with a comment.
Comment 7 Julien Brianceau 2014-04-14 00:52:55 PDT
(In reply to comment #6)
> Why can't you just mova _relativePCBase directly into pcBase?
Unfortunately, r0 is the only allowed dest register for the mova opcode.

> If the .balign has to fill, is the '0' fill going to be a nop?  You may want to explicitly mention that with a comment.
Yes, as the .balign directive is put in a section containing code, no-op instructions are used as fill value instead of 0.


I found a way to use SubImmediates with sh4 const pool, so the sh4 arch can share the arm path for setEntryAddress. I'm going to file a new bug with this implementation, and I'll add a comment for .balign in it.
Comment 8 Julien Brianceau 2014-04-14 01:07:37 PDT
Created bugzilla: https://bugs.webkit.org/show_bug.cgi?id=131608