Closed Bug 1217873 Opened 9 years ago Closed 9 years ago

IonMonkey: MIPS64: Simplify BailoutStack for MIPS64

Categories

(Core :: JavaScript Engine: JIT, defect)

Other
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: hev, Assigned: hev)

References

Details

Attachments

(3 files, 1 obsolete file)

Looks the BailoutStack::frameClass not required on mips64. This bug clean up it and makes bailout implementation similar to x64.
Attachment #8678694 - Flags: review?(nicolas.b.pierron)
Attachment #8678695 - Flags: review?(nicolas.b.pierron)
Attached patch Part 3: Simplify BailoutStack (obsolete) — Splinter Review
Attachment #8678696 - Flags: review?(nicolas.b.pierron)
Attachment #8678694 - Flags: review?(arai.unmht)
Attachment #8678695 - Flags: review?(arai.unmht)
Attachment #8678696 - Flags: review?(lhansen)
Attachment #8678694 - Flags: review?(arai.unmht) → review+
Attachment #8678695 - Flags: review?(arai.unmht) → review+
Comment on attachment 8678696 [details] [diff] [review]
Part 3: Simplify BailoutStack

Review of attachment 8678696 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit/mips64/CodeGenerator-mips64.cpp
@@ +48,5 @@
>  
>  void
>  CodeGeneratorMIPS64::visitOutOfLineBailout(OutOfLineBailout* ool)
>  {
> +    masm.push(ImmWord(ool->snapshot()->snapshotOffset()));

No longer any need to keep the frame aligned to two words?

::: js/src/jit/mips64/Trampoline-mips64.cpp
@@ +617,3 @@
>      // Remove both the bailout frame and the topmost Ion frame's stack.
>      // Load frameSize from stack
> +    masm.loadPtr(Address(StackPointer, sizeOfBailoutInfo + sizeof(RegisterDump)), a1);

This is still loading the frameSize from the frame so I don't understand why you would not keep the offsetOfFrameSize() method and use that here, instead of hardcoding sizeof(RegisterDump).  Naming the offset seems like good hygiene.
(In reply to Lars T Hansen [:lth] from comment #4)
> Comment on attachment 8678696 [details] [diff] [review]
> Part 3: Simplify BailoutStack
> 
> Review of attachment 8678696 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: js/src/jit/mips64/CodeGenerator-mips64.cpp
> @@ +48,5 @@
> >  
> >  void
> >  CodeGeneratorMIPS64::visitOutOfLineBailout(OutOfLineBailout* ool)
> >  {
> > +    masm.push(ImmWord(ool->snapshot()->snapshotOffset()));
> 
> No longer any need to keep the frame aligned to two words?
I think no at this point. We just need make stack aligned before call c++ Bailout function.
// Stack is:
//     [frame]
//     snapshotOffset  // 8-byte, pushed here.
//     frameSize       // 8-byte, pushed in PushBailoutFrame
//     [bailoutFrame]  // (64 * 8) bytes, same above.
//     [bailoutInfo]   // 16-byte, in GenerateBailoutThunk
//                     // 16-byte aligned, call c++ Bailout

> 
> ::: js/src/jit/mips64/Trampoline-mips64.cpp
> @@ +617,3 @@
> >      // Remove both the bailout frame and the topmost Ion frame's stack.
> >      // Load frameSize from stack
> > +    masm.loadPtr(Address(StackPointer, sizeOfBailoutInfo + sizeof(RegisterDump)), a1);
> 
> This is still loading the frameSize from the frame so I don't understand why
> you would not keep the offsetOfFrameSize() method and use that here, instead
> of hardcoding sizeof(RegisterDump).  Naming the offset seems like good
> hygiene.
You are right. thanks!
Attachment #8678696 - Attachment is obsolete: true
Attachment #8678696 - Flags: review?(nicolas.b.pierron)
Attachment #8678696 - Flags: review?(lhansen)
Attachment #8679201 - Flags: review?(lhansen)
Status: NEW → ASSIGNED
Keywords: leave-open
Attachment #8679201 - Flags: review?(lhansen) → review+
Attachment #8678694 - Flags: review?(nicolas.b.pierron) → review+
Comment on attachment 8678695 [details] [diff] [review]
Part 2: Move visitOutOfLineBailout

Review of attachment 8678695 [details] [diff] [review]:
-----------------------------------------------------------------

Is a patch missing?  Otherwise I do not see the point of duplicating the logic if we have no differences.
(In reply to Nicolas B. Pierron [:nbp] from comment #9)
> Comment on attachment 8678695 [details] [diff] [review]
> Part 2: Move visitOutOfLineBailout
> 
> Review of attachment 8678695 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Is a patch missing?  Otherwise I do not see the point of duplicating the
> logic if we have no differences.

Do you mean CodeGenerator-mips64? It's still not landed, waiting for review (bug 1213743)
Part 3 changes CodeGeneratorMIPS64::visitOutOfLineBailout.
I thought that's the reason of duplication in Part 2.
Depends on: 1213743
Attachment #8678695 - Flags: review?(nicolas.b.pierron)
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
removing the b2g 2.5 flag since this commit has been reverted due to an incorrect merge, sorry for the confusion
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: