Trampolines can be 2 words, so take that into account when reserving space for LIR_call instructions (473225, r=danderson).
authorAndreas Gal <gal@mozilla.com>
Mon, 12 Jan 2009 19:46:13 -0800
changeset 23720 4e72d3b2d6b62ac0d1b0cc444d767d3f51e5fd2f
parent 23719 0f835ebad7060123b7f412b81d18aff87de94b68
child 23721 7dde0d72f7c82486f9ac5d53e334b9294c308ae8
push id4690
push userrsayre@mozilla.com
push dateThu, 15 Jan 2009 07:42:55 +0000
treeherdermozilla-central@ddfa483fea2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdanderson
bugs473225
milestone1.9.2a1pre
Trampolines can be 2 words, so take that into account when reserving space for LIR_call instructions (473225, r=danderson).
js/src/nanojit/LIR.cpp
--- a/js/src/nanojit/LIR.cpp
+++ b/js/src/nanojit/LIR.cpp
@@ -1122,21 +1122,21 @@ namespace nanojit
 		//    'LIR_CALL_SLOTS' = 2          (words K+5 - K+6)
 		//    'insSz' = 1+2 = 3             (words K+4 - K+6)
 		//    'from' = next + (insSz - 1)   (word K+6       )
 		//
 
 		NanoAssert(argc <= (int)MAXARGS);
 		uint32_t words = argwords(argc);
 		int32_t insSz = words + LIR_CALL_SLOTS; // words need for offsets + size of instruction
-		ensureRoom(argc + insSz);  // argc=# possible tramps for args
+		ensureRoom(argc * LIR_FAR_SLOTS + insSz);  // argc=# possible tramps for args
 
 		// Argument deltas are calculated relative to the final LIns,
 		// which is the last word in the cluster.
-		LInsp from = _buf->next() + argc + insSz - 1; 
+		LInsp from = _buf->next() + argc * LIR_FAR_SLOTS + insSz - 1; 
 		for (int32_t i=0; i < argc; i++)
 			makeReachable(args[i], from);
 
 		// skip 'words' needed for call parameters
 		LirCallIns *l = (LirCallIns*) (_buf->next()+words);
 		l->ci = ci;
 
 		// call parameters laid in reverse order