qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 33/36] tcg/tci: Add TCG_TARGET_CALL_{RET,ARG}_I128


From: Richard Henderson
Subject: Re: [PATCH v2 33/36] tcg/tci: Add TCG_TARGET_CALL_{RET,ARG}_I128
Date: Sat, 22 Oct 2022 13:48:35 +1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

On 10/21/22 20:47, Philippe Mathieu-Daudé wrote:
On 21/10/22 09:15, Richard Henderson wrote:
Fill in the parameters for libffi for Int128.
Adjust the interpreter to allow for 16-byte return values.
Adjust tcg_out_call to record the return value length.

Call parameters are no longer all the same size, so we
cannot reuse the same call_slots array for every function.
Compute it each time now, but only fill in slots required
for the call we're about to make.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  tcg/tci/tcg-target.h     |  3 +++
  tcg/tcg.c                | 18 ++++++++++++++++
  tcg/tci.c                | 45 ++++++++++++++++++++--------------------
  tcg/tci/tcg-target.c.inc |  8 +++----
  4 files changed, 48 insertions(+), 26 deletions(-)

  static ffi_type *typecode_to_ffi(int argmask)
  {
+    /*
+     * libffi does not support __int128_t, so we have forced Int128
+     * to use the structure definition instead of the builtin type.
+     */
+    static ffi_type *ffi_type_i128_elements[3] = {

static const.

+        &ffi_type_uint64,
+        &ffi_type_uint64,
+        NULL
+    };
+    static ffi_type ffi_type_i128 = {

static const.

Can't, because of the libffi interface. Indeed this second structure will be modified by the library to complete the library-specific initialization.


r~



reply via email to

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