Clean up definition of MAX_OPC_PARAM
commit4d0e4ac703745e366d15ea5e174ae5e25c384461
authorStuart Brady <sdb@zubnet.me.uk>
Tue, 27 Apr 2010 21:23:35 +0000 (27 22:23 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 1 May 2010 19:47:39 +0000 (1 19:47 +0000)
treee9fb7b92efca66e442b46d3b4ca8048322ba19da
parent50a480946b980c2000fc3b13bda174d57b45fbdd
Clean up definition of MAX_OPC_PARAM

MAX_OPC_PARAM is intended to refer to the maximum number of entries used
in gen_opparam_buf[] for any single helper call.  It is currently defined
as 10, but for 32-bit archs, the correct value (with a maximum for four
helper arguments) is 14, and for 64-bit archs, only 9 entries are needed.

tcg_gen_callN() fills four entries with the function address, flags,
number of args, etc. and on 32-bit archs uses a further two entries per
argument (with a maximum of four helper arguments), plus two more for the
return value.  On 64-bit archs, only half as many entries are used for the
args and the return value.

In reality, TBs tend not to consist purely of helper calls exceeding the
stated 10 gen_opparam_buf[] entries, so this would never actually be a
problem on 32-bit archs, but the definition is still rather confusing.

Signed-off-by: Stuart Brady <sdb@zubnet.me.uk>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
exec-all.h