JM: don't allocate an extra register for JSOP_MUL if one operand is constant

RESOLVED FIXED in mozilla9

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jandem, Assigned: jandem)

Tracking

({perf})

unspecified
mozilla9
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Currently we allocate an extra register for JSOP_MUL if one operand is constant. We do this because (quote) "not all CPUs have multiplication on immediates"

GCC just generates a 3-operand IMUL instruction, and the x86, ARM and Sparc assemblers already support this (the ARM implementation uses a scratch register).
(Assignee)

Comment 1

6 years ago
Created attachment 559675 [details] [diff] [review]
Patch
Attachment #559675 - Flags: review?(bhackett1024)
(Assignee)

Comment 2

6 years ago
Created attachment 559676 [details] [diff] [review]
Patch
Attachment #559675 - Attachment is obsolete: true
Attachment #559675 - Flags: review?(bhackett1024)
Attachment #559676 - Flags: review?(bhackett1024)
Comment on attachment 559676 [details] [diff] [review]
Patch

Yeah, differences in the supported instruction set should be abstracted away by the assembler as much as possible (see also: AbsoluteAddress on x86 vs. x64).
Attachment #559676 - Flags: review?(bhackett1024) → review+
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/5079bd3f82bf
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
https://hg.mozilla.org/mozilla-central/rev/5079bd3f82bf
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.