From 0cb6e3fff870f5e8ab428c7df54fcac7e699b1ad Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 29 Jul 2019 21:17:51 +0200 Subject: [PATCH] riscv: Fix mixed2 and mixed3 abi tests this was caused by a simple bug, not by the current inability to pass a {float,int} struct per psABI. So now only ret_mixed_test is still broken. --- riscv64-gen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/riscv64-gen.c b/riscv64-gen.c index f8d06f0f..fd50585f 100644 --- a/riscv64-gen.c +++ b/riscv64-gen.c @@ -457,7 +457,8 @@ static int pass_in_freg(CType *type, int regs) return toplevel ? 0 : -1; return regs + tr; } - return is_float(type->t) && (type->t & VT_BTYPE) != VT_LDOUBLE; + return is_float(type->t) && (type->t & VT_BTYPE) != VT_LDOUBLE + ? 1 : toplevel ? 0 : -1; } ST_FUNC void gfunc_call(int nb_args)