Bug 122890

Summary: Build break on ARMv7 after r157209
Product: WebKit Reporter: Ryuan Choi <ryuan.choi>
Component: WebKit Misc.Assignee: Ryuan Choi <ryuan.choi>
Status: RESOLVED FIXED    
Severity: Normal CC: brian.holt, commit-queue, fpizlo, ossy, rgabor, zherczeg
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 108645    
Attachments:
Description Flags
Patch
none
Patch for ARM TRADITIONAL none

Description Ryuan Choi 2013-10-16 05:13:47 PDT
MacroAssemblerARMv7 does not have framePointerRegister
Comment 1 Ryuan Choi 2013-10-16 05:16:39 PDT
Created attachment 214357 [details]
Patch
Comment 2 Ryuan Choi 2013-10-17 19:09:13 PDT
Comment on attachment 214357 [details]
Patch

I realized that we need more fixes including this.
Comment 3 Filip Pizlo 2013-10-17 19:35:40 PDT
About to land speculative fix...
Comment 4 Filip Pizlo 2013-10-17 19:35:56 PDT
(In reply to comment #3)
> About to land speculative fix...

Never mind, I'm confused.
Comment 5 Filip Pizlo 2013-10-17 19:37:45 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > About to land speculative fix...
> 
> Never mind, I'm confused.

Actually, no, I am not confused.  Fix on the way.
Comment 6 Filip Pizlo 2013-10-17 19:38:06 PDT
(In reply to comment #2)
> (From update of attachment 214357 [details])
> I realized that we need more fixes including this.

Can you elaborate?
Comment 7 Filip Pizlo 2013-10-17 19:42:27 PDT
Landed a speculative fix in http://trac.webkit.org/changeset/157618
Comment 8 Ryuan Choi 2013-10-17 20:48:02 PDT
(In reply to comment #6)
> (In reply to comment #2)
> > (From update of attachment 214357 [details] [details])
> > I realized that we need more fixes including this.
> 
> Can you elaborate?

I am not sure.
I am not familiar with jsc code although I want to fix.

Below is the part of logs which I met.(And there are more and similar breaks)

[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JITInlines.h: In member function 'JSC::AbstractMacroAssembler<JSC::ARMv7Assembler>::Call JSC::JIT::callOperation(JSC::F_JITOperation_EJJZ, JSC::GPRReg, JSC::GPRReg, JSC::GPRReg, JSC::GPRReg, int32_t)':
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JITInlines.h:434:112: error: no matching function for call to 'JSC::JIT::setupArgumentsWithExecState(JSC::AbstractMacroAssembler<JSC::ARMv7Assembler>::TrustedImm32, JSC::GPRReg&, JSC::GPRReg&, JSC::GPRReg&, JSC::GPRReg&, JSC::AbstractMacroAssembler<JSC::ARMv7Assembler>::TrustedImm32)'
[   84s]      setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2Payload, arg2Tag, TrustedImm32(arg3));
[   84s]                                                                                                                 ^
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JITInlines.h:434:112: note: candidates are:
[   84s] In file included from /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JSInterfaceJIT.h:30:0,
[   84s]                  from /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JIT.h:45,
[   84s]                  from /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JITArithmetic.cpp:29:
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:712:52: note: void JSC::CCallHelpers::setupArgumentsWithExecState(JSC::FPRReg, JSC::GPRReg)
[   84s]      ALWAYS_INLINE void setupArgumentsWithExecState(FPRReg arg1, GPRReg arg2)
[   84s]                                                     ^
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:712:52: note:   candidate expects 2 arguments, 6 provided
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:719:52: note: void JSC::CCallHelpers::setupArgumentsWithExecState(JSC::GPRReg, JSC::GPRReg, JSC::FPRReg)
[   84s]      ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, FPRReg arg3)
[   84s]                                                     ^
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:719:52: note:   candidate expects 3 arguments, 6 provided
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:727:52: note: void JSC::CCallHelpers::setupArgumentsWithExecState(JSC::AbstractMacroAssembler<JSC::ARMv7Assembler>::TrustedImm32, JSC::FPRReg, JSC::GPRReg)
[   84s]      ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, FPRReg arg2, GPRReg arg3)
[   84s]                                                     ^
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:727:52: note:   candidate expects 3 arguments, 6 provided
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:735:52: note: void JSC::CCallHelpers::setupArgumentsWithExecState(JSC::GPRReg, JSC::GPRReg, JSC::AbstractMacroAssembler<JSC::ARMv7Assembler>::TrustedImm32, JSC::FPRReg)
[   84s]      ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, FPRReg arg4)
[   84s]                                                     ^
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:735:52: note:   candidate expects 4 arguments, 6 provided
[   84s] In file included from /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JSInterfaceJIT.h:30:0,
[   84s]                  from /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JIT.h:45,
[   84s]                  from /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/JITArithmetic.cpp:29:
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:843:52: note: void JSC::CCallHelpers::setupArgumentsWithExecState(JSC::GPRReg)
[   84s]      ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1)
[   84s]                                                     ^
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:843:52: note:   candidate expects 1 argument, 6 provided
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:849:52: note: void JSC::CCallHelpers::setupArgumentsWithExecState(JSC::AbstractMacroAssembler<JSC::ARMv7Assembler>::TrustedImmPtr)
[   84s]      ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImmPtr arg1)
[   84s]                                                     ^
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:849:52: note:   candidate expects 1 argument, 6 provided
[   84s] /home/abuild/rpmbuild/BUILD/webkit2-efl-157512_0.10.142.0/Source/JavaScriptCore/jit/CCallHelpers.h:855:52: note: void JSC::CCallHelpers::setupArgumentsWithExecState(JSC::AbstractMacroAssembler<JSC::ARMv7Assembler>::TrustedImm32)
[   84s]      ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1)
[   84s]                                                     ^


Anyway, Thank you so much to fix the issues. :)
Comment 9 Brian Holt 2013-10-21 05:04:26 PDT
(In reply to comment #7)
> Landed a speculative fix in http://trac.webkit.org/changeset/157618

fpizlo, it seems like this is still a problem with ARM_TRADITIONAL:

This diff resolves it (rgabor confirmed that the frame pointer is r5 for TRADITIONAL)


diff --git a/Source/JavaScriptCore/assembler/ARMAssembler.h b/Source/JavaScriptCore/assembler/ARMAssembler.h
index 89d29a1..6744789 100644
--- a/Source/JavaScriptCore/assembler/ARMAssembler.h
+++ b/Source/JavaScriptCore/assembler/ARMAssembler.h
@@ -43,7 +43,7 @@ namespace JSC {
             r2,
             r3, S0 = r3, /* Same as thumb assembler. */
             r4,
-            r5,
+            r5, fp = r5, // frame pointer
             r6,
             r7,
             r8,
diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerARM.h b/Source/JavaScriptCore/assembler/MacroAssemblerARM.h
index 3a37204..27684d5 100644
--- a/Source/JavaScriptCore/assembler/MacroAssemblerARM.h
+++ b/Source/JavaScriptCore/assembler/MacroAssemblerARM.h
@@ -42,6 +42,12 @@ class MacroAssemblerARM : public AbstractMacroAssembler<ARMAssembler> {
 public:
     typedef ARMRegisters::FPRegisterID FPRegisterID;
 
+    static RegisterID firstRegister() { return ARMRegisters::r0; }
+    static RegisterID lastRegister() { return ARMRegisters::r15; }
+
+    static FPRegisterID firstFPRegister() { return ARMRegisters::d0; }
+    static FPRegisterID lastFPRegister() { return ARMRegisters::d31; }
+
     enum RelationalCondition {
         Equal = ARMAssembler::EQ,
         NotEqual = ARMAssembler::NE,
@@ -81,6 +87,7 @@ public:
     };
 
     static const RegisterID stackPointerRegister = ARMRegisters::sp;
+    static const RegisterID framePointerRegister = ARMRegisters::fp;
     static const RegisterID linkRegister = ARMRegisters::lr;
 
     static const Scale ScalePtr = TimesFour;
Comment 10 Brian Holt 2013-10-21 05:17:13 PDT
Created attachment 214730 [details]
Patch for ARM TRADITIONAL
Comment 11 Csaba Osztrogonác 2013-10-22 04:31:54 PDT
Comment on attachment 214730 [details]
Patch for ARM TRADITIONAL

r=me
Comment 12 WebKit Commit Bot 2013-10-22 04:55:51 PDT
Comment on attachment 214730 [details]
Patch for ARM TRADITIONAL

Clearing flags on attachment: 214730

Committed r157784: <http://trac.webkit.org/changeset/157784>
Comment 13 WebKit Commit Bot 2013-10-22 04:55:54 PDT
All reviewed patches have been landed.  Closing bug.