Bug 495396 - TM: missing early return in Nativei386 when generating LEA. r=edwsmith
authorAndreas Gal <gal@uci.edu>
Mon, 01 Jun 2009 16:24:59 -0400
changeset 28886 22363f125188ed8e919025abd7bea7d376690520
parent 28842 7ec985e33884939244a7633c952c42e110466d07
child 28887 eaaddd9ccd64c30260e542d3a9b1d80475030c76
push id7324
push userrsayre@mozilla.com
push dateTue, 02 Jun 2009 21:32:37 +0000
treeherdermozilla-central@b9e104ec562f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersedwsmith
bugs495396
milestone1.9.2a1pre
Bug 495396 - TM: missing early return in Nativei386 when generating LEA. r=edwsmith
js/src/nanojit/Nativei386.cpp
--- a/js/src/nanojit/Nativei386.cpp
+++ b/js/src/nanojit/Nativei386.cpp
@@ -848,16 +848,17 @@ namespace nanojit
 			}
 			allow &= ~rmask(rb);
 		}
 		else if ((op == LIR_add||op == LIR_addp) && lhs->isop(LIR_alloc) && rhs->isconst()) {
 			// add alloc+const, use lea
 			Register rr = prepResultReg(ins, allow);
 			int d = findMemFor(lhs) + rhs->imm32();
 			LEA(rr, d, FP);
+			return;
 		}
 
 		Register rr = prepResultReg(ins, allow);
 		Reservation* rA = getresv(lhs);
 		Register ra;
 		// if this is last use of lhs in reg, we can re-use result reg
 		if (rA == 0 || (ra = rA->reg) == UnknownReg)
 			ra = findSpecificRegFor(lhs, rr);