* src/vm/jit/replace.c (replace_read_executionstate)
authoredwin <none@none>
Thu, 16 Mar 2006 19:36:30 +0000 (19:36 +0000)
committeredwin <none@none>
Thu, 16 Mar 2006 19:36:30 +0000 (19:36 +0000)
(replace_write_executionstate): Position of synchronization slot must
be calculated from low addresses up, instead of backwards from stack base.

src/vm/jit/replace.c

index e7fd3328ba9019e874efacd31f09d7ce619f2508..6fb1aef99040eddfdf37ad3658e7690ef5b91bc1 100644 (file)
@@ -529,7 +529,7 @@ static void replace_read_executionstate(rplpoint *rp,executionstate *es,
        ss->syncslotcount = count;
        ss->syncslots = DMNEW(u8,count);
        for (i=0; i<count; ++i) {
-               ss->syncslots[i] = *--basesp;
+               ss->syncslots[i] = sp[code->memuse + i];
        }
 }
 
@@ -728,7 +728,7 @@ static void replace_write_executionstate(rplpoint *rp,executionstate *es,
        count = code_get_sync_slot_count(code);
        assert(count == ss->syncslotcount);
        for (i=0; i<count; ++i) {
-               *--basesp = ss->syncslots[i];
+               sp[code->memuse + i] = ss->syncslots[i];
        }
 
        /* set new pc */