[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 11/27] tcg/tci: Use ffi for calls
From: |
Alex Bennée |
Subject: |
Re: [PATCH v7 11/27] tcg/tci: Use ffi for calls |
Date: |
Wed, 02 Jun 2021 11:31:36 +0100 |
User-agent: |
mu4e 1.5.13; emacs 28.0.50 |
Richard Henderson <richard.henderson@linaro.org> writes:
> This requires adjusting where arguments are stored.
> Place them on the stack at left-aligned positions.
> Adjust the stack frame to be at entirely positive offsets.
>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
FWIW checkpatch is being anal about comment formatting:
--8<---------------cut here---------------start------------->8---
fixup! tcg/tci: Use ffi for calls
2 files changed, 16 insertions(+), 14 deletions(-)
tcg/tcg.c | 24 ++++++++++++------------
tcg/tci.c | 6 ++++--
modified tcg/tcg.c
@@ -2148,18 +2148,18 @@ void tcg_gen_callN(void *func, TCGTemp *ret, int nargs,
TCGTemp **args)
}
if (TCG_TARGET_REG_BITS < 64 && is_64bit) {
- /*
- * If stack grows up, then we will be placing successive
- * arguments at lower addresses, which means we need to
- * reverse the order compared to how we would normally
- * treat either big or little-endian. For those arguments
- * that will wind up in registers, this still works for
- * HPPA (the only current STACK_GROWSUP target) since the
- * argument registers are *also* allocated in decreasing
- * order. If another such target is added, this logic may
- * have to get more complicated to differentiate between
- * stack arguments and register arguments.
- */
+ /*
+ * If stack grows up, then we will be placing successive
+ * arguments at lower addresses, which means we need to
+ * reverse the order compared to how we would normally
+ * treat either big or little-endian. For those arguments
+ * that will wind up in registers, this still works for
+ * HPPA (the only current STACK_GROWSUP target) since the
+ * argument registers are *also* allocated in decreasing
+ * order. If another such target is added, this logic may
+ * have to get more complicated to differentiate between
+ * stack arguments and register arguments.
+ */
#if defined(HOST_WORDS_BIGENDIAN) != defined(TCG_TARGET_STACK_GROWSUP)
op->args[pi++] = temp_arg(args[i] + 1);
op->args[pi++] = temp_arg(args[i]);
modified tcg/tci.c
@@ -26,8 +26,10 @@
#include <ffi.h>
-/* Enable TCI assertions only when debugging TCG (and without NDEBUG defined).
- * Without assertions, the interpreter runs much faster. */
+/*
+ * Enable TCI assertions only when debugging TCG (and without NDEBUG defined).
+ * Without assertions, the interpreter runs much faster.
+ */
#if defined(CONFIG_DEBUG_TCG)
# define tci_assert(cond) assert(cond)
#else
--8<---------------cut here---------------end--------------->8---
--
Alex Bennée
- [PATCH v7 25/27] tcg/tci: Remove the qemu_ld/st_type macros, (continued)
- [PATCH v7 25/27] tcg/tci: Remove the qemu_ld/st_type macros, Richard Henderson, 2021/06/01
- [PATCH v7 22/27] tcg/tci: Implement add2, sub2, Richard Henderson, 2021/06/01
- [PATCH v7 27/27] tests/tcg: Increase timeout for TCI, Richard Henderson, 2021/06/01
- [PATCH v7 16/27] tcg/tci: Implement goto_ptr, Richard Henderson, 2021/06/01
- [PATCH v7 21/27] tcg/tci: Implement mulu2, muls2, Richard Henderson, 2021/06/01
- [PATCH v7 11/27] tcg/tci: Use ffi for calls, Richard Henderson, 2021/06/01
- Re: [PATCH v7 11/27] tcg/tci: Use ffi for calls,
Alex Bennée <=
- [PATCH v7 19/27] tcg/tci: Implement extract, sextract, Richard Henderson, 2021/06/01
- [PATCH v7 17/27] tcg/tci: Implement movcond, Richard Henderson, 2021/06/01
- [PATCH v7 12/27] tcg/tci: Reserve r13 for a temporary, Richard Henderson, 2021/06/01
- [PATCH v7 14/27] tcg/tci: Remove tci_write_reg, Richard Henderson, 2021/06/01
- [PATCH v7 18/27] tcg/tci: Implement andc, orc, eqv, nand, nor, Richard Henderson, 2021/06/01
- [PATCH v7 26/27] tcg/tci: Use {set,clear}_helper_retaddr, Richard Henderson, 2021/06/01
- [PATCH v7 24/27] Revert "tcg/tci: Use exec/cpu_ldst.h interfaces", Richard Henderson, 2021/06/01