]> git.ipfire.org Git - thirdparty/qemu.git/commit
tcg: Reorg function calls
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 11 Nov 2022 00:09:37 +0000 (10:09 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 5 Jan 2023 19:41:29 +0000 (11:41 -0800)
commit39004a71d8f6b61501e41be21cc874272c78212f
tree91069224f04f81257174e64f8d9062234b9f25a2
parent31fd884b2e53dc50328dd616667c745fc4808fd1
tcg: Reorg function calls

Pre-compute the function call layout for each helper at startup.
Drop TCG_CALL_DUMMY_ARG, as we no longer need to leave gaps
in the op->args[] array.  This allows several places to stop
checking for NULL TCGTemp, to which TCG_CALL_DUMMY_ARG mapped.

For tcg_gen_callN, loop over the arguments once.  Allocate the TCGOp
for the call early but delay emitting it, collecting arguments first.
This allows the argument processing loop to emit code for extensions
and have them sequenced before the call.

For tcg_reg_alloc_call, loop over the arguments in reverse order,
which allows stack slots to be filled first naturally.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
include/exec/helper-head.h
include/tcg/tcg.h
tcg/optimize.c
tcg/tcg-internal.h
tcg/tcg.c