qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 33/54] tcg: Introduce arg_slot_stk_ofs


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 33/54] tcg: Introduce arg_slot_stk_ofs
Date: Sun, 23 Apr 2023 20:55:59 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 11/4/23 03:04, Richard Henderson wrote:
Unify all computation of argument stack offset in one function.
This requires that we adjust ref_slot to be in the same units,
by adding max_reg_slots during init_call_layout.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  tcg/tcg.c | 29 +++++++++++++++++------------
  1 file changed, 17 insertions(+), 12 deletions(-)


+static inline int arg_slot_stk_ofs(unsigned arg_slot)
+{
+    unsigned max = TCG_STATIC_CALL_ARGS_SIZE / sizeof(tcg_target_long);

static const?

Regardless,

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

+    unsigned stk_slot = arg_slot - ARRAY_SIZE(tcg_target_call_iarg_regs);
+
+    tcg_debug_assert(stk_slot < max);
+    return TCG_TARGET_CALL_STACK_OFFSET + stk_slot * sizeof(tcg_target_long);
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]