Bug 114580

Summary: Implement JIT for MinGW-w64 64-bit
Product: WebKit Reporter: Jonathan Liu <net147>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Enhancement CC: allan.jensen, commit-queue, fpizlo, ggaren, hausmann, jturcotte
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Jonathan Liu 2013-04-14 02:57:37 PDT
https://bugs.webkit.org/show_bug.cgi?id=107965 implements JIT for MSVC 64-bit but not MinGW-w64 64-bit.
Comment 1 Jonathan Liu 2013-04-14 03:14:50 PDT
This may be useful for reference:
http://sourceforge.net/apps/trac/mingw-w64/wiki/MinGW%20x64%20Software%20convention
Comment 2 Allan Sandfeld Jensen 2013-04-14 05:02:18 PDT
(In reply to comment #1)
> This may be useful for reference:
> http://sourceforge.net/apps/trac/mingw-w64/wiki/MinGW%20x64%20Software%20convention

Isn't that the same calling convention?

Perhaps you just need to find a place where COMPILER(MSVC) is used where COMPILER(MINGW64) needs to be added.
Comment 3 Jonathan Liu 2013-04-14 05:05:00 PDT
(In reply to comment #2)
> Isn't that the same calling convention?
> 
> Perhaps you just need to find a place where COMPILER(MSVC) is used where COMPILER(MINGW64) needs to be added.

It appears the calling convention are the same, but we will need an implementation of the trampoline functions in GCC inline asm.
Comment 4 Jonathan Liu 2013-04-14 06:53:22 PDT
Created attachment 197986 [details]
Patch
Comment 5 WebKit Commit Bot 2013-04-14 06:54:25 PDT
Attachment 197986 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/jit/JITStubs.cpp']" exit_code: 1
Source/JavaScriptCore/jit/JITStubs.cpp:449:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:486:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:488:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:495:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:497:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:509:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 6 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Jonathan Liu 2013-04-14 07:09:14 PDT
Created attachment 197988 [details]
Patch
Comment 7 WebKit Commit Bot 2013-04-14 07:11:41 PDT
Attachment 197988 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/jit/JITStubs.cpp']" exit_code: 1
Source/JavaScriptCore/jit/JITStubs.cpp:454:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:491:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:493:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:500:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:502:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:514:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 6 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Jonathan Liu 2013-04-14 07:12:02 PDT
Created attachment 197989 [details]
Patch
Comment 9 WebKit Commit Bot 2013-04-14 07:14:13 PDT
Attachment 197989 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/jit/JITStubs.cpp']" exit_code: 1
Source/JavaScriptCore/jit/JITStubs.cpp:447:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:484:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:486:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:493:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:495:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:507:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 6 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Jocelyn Turcotte 2013-04-15 02:30:29 PDT
Comment on attachment 197989 [details]
Patch

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

> Source/JavaScriptCore/jit/JITStubs.cpp:509
> +#elif COMPILER(MSVC) && CPU(X86_64) && OS(WINDOWS)

As far as I know MSVC is only used to build for Windows, no need to add an extra check.
Comment 11 Jonathan Liu 2013-04-15 02:32:55 PDT
Created attachment 198042 [details]
Patch
Comment 12 WebKit Commit Bot 2013-04-15 02:34:06 PDT
Attachment 198042 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source/JavaScriptCore/jit/JITStubs.cpp']" exit_code: 1
Source/JavaScriptCore/jit/JITStubs.cpp:447:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:484:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:486:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:493:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/jit/JITStubs.cpp:495:  Extra space before ( in function call  [whitespace/parens] [4]
Source/JavaScriptCore/jit/JITStubs.cpp:507:  The parameter name """" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 6 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 Jocelyn Turcotte 2013-04-18 02:43:51 PDT
Comment on attachment 198042 [details]
Patch

I'm no expert generally in JavaScriptCore but this patch is pretty straigthforward, so r=me.
Comment 14 WebKit Commit Bot 2013-04-18 03:10:05 PDT
Comment on attachment 198042 [details]
Patch

Clearing flags on attachment: 198042

Committed r148663: <http://trac.webkit.org/changeset/148663>
Comment 15 WebKit Commit Bot 2013-04-18 03:10:07 PDT
All reviewed patches have been landed.  Closing bug.