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.hender...@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