Closed
Bug 570276
Opened 14 years ago
Closed 14 years ago
Extra junk code generated for loading variable address on SPARC
Categories
(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
Q3 11 - Serrano
People
(Reporter: wmaddox, Assigned: wmaddox)
Details
(Whiteboard: fixed-in-nanojit, fixed-in-tracemonkey, fixed-in-tamarin)
Attachments
(1 file)
901 bytes,
patch
|
leon.sha
:
review+
|
Details | Diff | Splinter Review |
While analyzing an unrelated problem, I observed the following code generated for an LEA, that is, "addr = addp vars, offset": immi168 = immi 72 addi10 = addi vars, immi168/*72*/ 00008ec77c or %g0, 72, %l2 00008ec780 addcc %l7, %l2, %l7 00008ec784 or %g0, -56, %l2 00008ec788 add %fp, %l2, %o4 In Assembler::asm_arith, the LEA case is recognized, and treated specially: else if ((op == LIR_addi || op == LIR_addxovi) && lhs->isop(LIR_allocp) && rhs->isImmI()) { // add alloc+const, use lea Register rr = deprecated_prepResultReg(ins, allow); int d = findMemFor(lhs) + rhs->immI(); ADD(FP, L2, rr); SET32(d, L2); } This results in the generation of the final two instructions in the example above, i.e.: 00008ec784 or %g0, -56, %l2 00008ec788 add %fp, %l2, %o4 Instead of exiting after peeling off this special case, however, asm_arith continues, emitting code for the general case of addi, resulting in two additional instructions: 00008ec77c or %g0, 72, %l2 00008ec780 addcc %l7, %l2, %l7 Recall that the assembler emits instructions in the reverse order form that in which they will be executed.
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #450781 -
Flags: review?(leon.sha)
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → wmaddox
Flags: flashplayer-qrb+
Priority: -- → P3
Whiteboard: has-patch
Target Milestone: --- → flash10.2
Attachment #450781 -
Flags: review?(leon.sha) → review+
Assignee | ||
Comment 2•14 years ago
|
||
Pushed to nanojit-central: http://hg.mozilla.org/projects/nanojit-central/rev/639cf2aa6573
Whiteboard: has-patch → has-patch fixed-in-nanojit
Comment 3•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/cc645910e1fa
Whiteboard: has-patch fixed-in-nanojit → has-patch fixed-in-nanojit, fixed-in-tracemonkey
Comment 4•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/cc645910e1fa
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Comment 5•14 years ago
|
||
TR: http://hg.mozilla.org/tamarin-redux/rev/bb18dcbaeb68
Whiteboard: has-patch fixed-in-nanojit, fixed-in-tracemonkey → fixed-in-nanojit, fixed-in-tracemonkey, fixed-in-tamarin
Updated•13 years ago
|
Flags: flashplayer-bug+
You need to log in
before you can comment on or make changes to this bug.
Description
•