V4 JIT: fix stack layout.
authorErik Verbruggen <erik.verbruggen@digia.com>
Tue, 26 Aug 2014 12:21:01 +0000 (14:21 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Tue, 26 Aug 2014 15:40:42 +0000 (17:40 +0200)
commitbfee76bdc96cfa8b4decf6d099ff690446d2f8eb
treeee12b7506428f361348b6ae9faa640102e786dc5
parentb926452f6c98e35fd87706fc637240cb47bac4bf
V4 JIT: fix stack layout.

Commit d9f33ccdef985badc56fd8940373748626beffc7 introduced an off-by-one
in the calculation of the offset of a saved register (in
StackLayout::savedRegPointer), resulting in overwriting a callee saved
register with the tag of a QV4::Value. This method now calculates those
pointers relative to the bottom of the stack frame.

The off-by-one didn't happen before that patch, because there was a
magical +1 used in the constructor for the number of callee saved
registers, thereby prevented this from happening. However, that resulted
in a frame size that was unnecessary big.

Task-number: QTBUG-40927
Change-Id: If88fe9f3490a4d23a1e69c630c87219fcfef671f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/jit/qv4assembler_p.h