update gprIndex when switching to stack-based argument passing

This is necessary when passing a 64-bit value on 32-bit ARM since
otherwise we risk using a register for the following argument instead
of the stack.
This commit is contained in:
Joel Dice 2010-12-10 14:01:22 -07:00
parent 64b11f0c64
commit d5d414aa52

View File

@ -101,6 +101,7 @@ dynamicCall(void* function, uintptr_t* arguments, uint8_t* argumentTypes,
memcpy(gprTable + gprIndex, arguments + ai, 8);
gprIndex += 8 / BytesPerWord;
} else { // pass argument on stack
gprIndex = GprCount;
if (stackIndex & 1) { // 8-byte alignment
memset(stack + stackIndex, 0, 4); // probably not necessary, but for good luck
++stackIndex;