[masm] Cleanup: Eliminate ScratchRegister2 on AMD64
authorSimon Hausmann <simon.hausmann@digia.com>
Mon, 22 Oct 2012 13:03:43 +0000 (15:03 +0200)
committerLars Knoll <lars.knoll@digia.com>
Tue, 23 Oct 2012 08:34:12 +0000 (10:34 +0200)
commit43f970df35a5fa71e0616fc8f9f56a9c4c737291
tree0e122736d35e4a8a31070a411a45ec2f614bebca
parent89b2015c02cb42f688ee114c5b3eb24c9da8aa69
[masm] Cleanup: Eliminate ScratchRegister2 on AMD64

Functions like loadArgument and storeValue that work right above
the macro assembler may use ScratchRegister because they only call
functions that do not "allocate" that register themselves.

copyValue on the other hand is a higher-level function and may not use
ScratchRegister because the functions it calls (i.e. loadArgument)
may clobber it. In the 64-bit case of quickly copying one VM value
to another location, we might as well use the ReturnValueRegister
as intermediate register and therefore re-allow the use of ScratchRegister
in the lower-level loadArgument/storeArgument functions.

Change-Id: I9f0c0d326e5af87101972f0cceb86cffe4ebdd0d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qv4isel_masm.cpp
qv4isel_masm_p.h