]> git.proxmox.com Git - qemu.git/commit
w64: Fix TCG helper functions with 5 arguments
authorStefan Weil <sw@weilnetz.de>
Thu, 13 Sep 2012 17:37:43 +0000 (19:37 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 9 Oct 2012 06:42:10 +0000 (01:42 -0500)
commita48028b8e9ec7a2063c1ac83acda006cd7b1289a
treeee46ea0e3689433f000c91033f5df275835eaa7a
parent5096a7c7d8529de2994a1bc47a1ba01d622ce0de
w64: Fix TCG helper functions with 5 arguments

TCG uses 6 registers for function arguments on 64 bit Linux hosts,
but only 4 registers on W64 hosts.

Commit 2999a0b20074a7e4a58f56572bb1436749368f59 increased the number
of arguments for some important helper functions from 4 to 5
which triggered a bug for W64 hosts: QEMU aborts when executing
helper_lcall_real in the guest's BIOS because function
tcg_target_get_call_iarg_regs_count always returned 6.

As W64 has only 4 registers for arguments, the 5th argument must be
passed on the stack using a correct stack offset.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
tcg/i386/tcg-target.c
tcg/i386/tcg-target.h