Last Comment Bug 686106 - JM: don't allocate an extra register for JSOP_MUL if one operand is constant
: JM: don't allocate an extra register for JSOP_MUL if one operand is constant
Status: RESOLVED FIXED
: perf
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla9
Assigned To: Jan de Mooij [:jandem] (PTO until July 31)
:
Mentors:
Depends on:
Blocks: Jaeger
  Show dependency treegraph
 
Reported: 2011-09-10 02:46 PDT by Jan de Mooij [:jandem] (PTO until July 31)
Modified: 2011-09-13 06:45 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (5.18 KB, patch)
2011-09-10 03:09 PDT, Jan de Mooij [:jandem] (PTO until July 31)
no flags Details | Diff | Splinter Review
Patch (5.25 KB, patch)
2011-09-10 03:15 PDT, Jan de Mooij [:jandem] (PTO until July 31)
bhackett1024: review+
Details | Diff | Splinter Review

Description Jan de Mooij [:jandem] (PTO until July 31) 2011-09-10 02:46:36 PDT
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).
Comment 1 Jan de Mooij [:jandem] (PTO until July 31) 2011-09-10 03:09:05 PDT
Created attachment 559675 [details] [diff] [review]
Patch
Comment 2 Jan de Mooij [:jandem] (PTO until July 31) 2011-09-10 03:15:17 PDT
Created attachment 559676 [details] [diff] [review]
Patch
Comment 3 Brian Hackett (:bhackett) 2011-09-11 12:25:35 PDT
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).
Comment 4 Jan de Mooij [:jandem] (PTO until July 31) 2011-09-12 10:33:25 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/5079bd3f82bf
Comment 5 Matt Brubeck (:mbrubeck) 2011-09-13 06:45:43 PDT
https://hg.mozilla.org/mozilla-central/rev/5079bd3f82bf

Note You need to log in before you can comment on or make changes to this bug.