Richard Henderson <richard.hender...@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é <f4...@amsat.org> > Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> > Signed-off-by: Richard Henderson <richard.hender...@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