Closed Bug 937944 Opened 7 years ago Closed 7 years ago

Make ARM's scratch float register different from its argument registers

Categories

(Core :: JavaScript Engine: JIT, defect)

ARM
All
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: sunfish, Assigned: sunfish)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch arm-scratch-reg.patch (obsolete) — Splinter Review
The ARM backend currently uses d1 as both a scratch float register and an argument register. This makes it difficult for register allocators to keep an argument in a register.

Also, in bug 880512, the backtracking allocator is currently assuming that argument registers are allocatable, and the scratch register is not allocatable.

Attached is a patch which changes the scratch register from d1 to d14, which is not currently being used for any other special purpose.
Attachment #831196 - Flags: review?(mrosenberg)
Blocks: 880512
Comment on attachment 831196 [details] [diff] [review]
arm-scratch-reg.patch

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

I look forward to seeing if this gives us a performance boost!
Attachment #831196 - Flags: review?(mrosenberg) → review+
This patch fixes a bug in the previous patch and makes a minor adjustment.

The bug was that I had removed d14 from the NonVolatileMask. I believe this is incorrect, because that register still needs to be saved and restored with the other non-volatile registers. This patch fixes that.

The minor adjustment was that I picked d15 instead of d14 to be the scratch register, and I moved NANRreg to d14. Since NANReg is only used in asm.js mode, this change makes the allocatable register set contiguous in all cases, which is nice.
Attachment #831196 - Attachment is obsolete: true
Attachment #831552 - Flags: review?(mrosenberg)
Attachment #831552 - Flags: review?(mrosenberg) → review+
https://hg.mozilla.org/mozilla-central/rev/1fb0f60a3d6b
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Depends on: 964005
You need to log in before you can comment on or make changes to this bug.