Closed Bug 1103108 Opened 10 years ago Closed 9 years ago

Reduce the number of call paths on arm & mips32

Categories

(Core :: JavaScript Engine: JIT, defect)

ARM
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: mjrosenb, Assigned: nbp)

References

Details

Attachments

(4 files)

Currently, there is CallIon, CallIonNoPush and CallIonHalfPush. Bug 1088316 is going to change Ion to use the hardware calling convention, at which point these don't make sense, and should be removed.
It looks like removing these functions depends on changing the Ion ABI to align before the call is made, counting the possibly-pushed return address as part of the newly created frame.
FWIW, I'm going to be removing the callJitNoPush from GenerateFFIIonExit in bug 1125561; it's kindof hilarious: we worked around the old terrible ARM convention in Odin and then, when that got fixed, CallJitNoPush had to work around our dependence on the old conversion.
We don't have to use ABI-compatible calls for Ion calls, to get rid of these multiple paths.
Because, there is one function which is never used (ma_callJit), and one used once (ma_callJitNoPush).

These functions were used at the time when we tried to push the return address before calling the callee, but now, all the callee are pushing their link registers, both on ARM and MIPS.

I have to clean-up these before refactoring all architectures Jit calls with Bug 1184965.
Assignee: nobody → nicolas.b.pierron
Blocks: 1184965
Status: NEW → ASSIGNED
Summary: Reduce the number of call paths on arm → Reduce the number of call paths on arm & mips32
Attachment #8647000 - Flags: review?(branislav.rankov)
Attachment #8647003 - Flags: review?(branislav.rankov)
ma_callJit has to be unused, because it is pushing extra space on the stack, which does not make sense any more as all our callee are now pushing their link registers on top of the stack, and not just write in back in the reserved space, as it used to be a while ago.
Attachment #8647001 - Flags: review?(hv1989) → review+
Comment on attachment 8646999 [details] [diff] [review]
part 1 - ARM: Remove unused ma_callJit.

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

Nice. Apparently dead code removal :D.

::: js/src/jit/arm/MacroAssembler-arm.cpp
@@ +1891,5 @@
>  
>  void
>  MacroAssemblerARMCompat::callJit(Register callee)
>  {
> +    MOZ_ASSERT((asMasm().framePushed() & 7) == 4);

what about foo % 8 = 4 instead of the & ? Seems more readable for me. Not sure if that is general. Feel free to ignore...
Attachment #8646999 - Flags: review?(hv1989) → review+
Attachment #8647003 - Flags: review?(branislav.rankov) → review+
Attachment #8647000 - Flags: review?(branislav.rankov) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: