Bug 114495 - LLInt should not use d8 register as scratch register
Summary: LLInt should not use d8 register as scratch register
Status: RESOLVED DUPLICATE of bug 114811
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2013-04-12 00:11 PDT by SangGyu Lee
Modified: 2013-07-22 15:21 PDT (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description SangGyu Lee 2013-04-12 00:11:01 PDT
Currently, LLInt uses d8 register as scratch register as followings:

ARM_SCRATCH_FPR = SpecialRegister.new("d8")    in arm.rb
C_LOOP_SCRATCH_FPR = SpecialRegister.new("d8") in cloop.rb

However, AAPCS ยง5.1.2.1 says

Registers s16-s31 (d8-d15, q4-q7) must be preserved across subroutine calls; registers s0-s15 (d0-d7, q0-q3) do not need to be preserved (and can be used for passing arguments or returning results in standard procedure-call variants). Registers d16-d31 (q8-q15), if present, do not need to be preserved.

Therefore it should not use d8 for that purpose.

I think it would be safe to use d6.
(Register d7 is already in use for other purpose. )

ARM_SCRATCH_FPR = SpecialRegister.new("d6")    in arm.rb
C_LOOP_SCRATCH_FPR = SpecialRegister.new("d6") in cloop.rb
Comment 1 Cosmin Truta 2013-05-10 11:49:31 PDT
Duplicate of bug 114811.
Comment 2 Mark Lam 2013-07-22 15:21:10 PDT

*** This bug has been marked as a duplicate of bug 114811 ***