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

RESOLVED FIXED in mozilla28

Status

()

defect
--
minor
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sunfish, Assigned: sunfish)

Tracking

unspecified
mozilla28
ARM
All
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Posted 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: 6 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.