ARM hardfloat: fix struct return with float/double args
authorDaniel Glöckner <daniel-gl@gmx.net>
Wed, 1 May 2013 14:17:54 +0000 (1 16:17 +0200)
committerDaniel Glöckner <daniel-gl@gmx.net>
Wed, 1 May 2013 14:17:54 +0000 (1 16:17 +0200)
Fixes the case where the structure is not returned in registers.

arm-gen.c

index a883121..250b1d9 100644 (file)
--- a/arm-gen.c
+++ b/arm-gen.c
@@ -1217,6 +1217,7 @@ void gfunc_prolog(CType *func_type)
     int addr, pn = struct_ret, sn = 0; /* pn=core, sn=stack */
 
 #ifdef TCC_ARM_HARDFLOAT
+    func_vc += nf * 4;
     avregs = AVAIL_REGS_INITIALIZER;
 #endif
     while ((sym = sym->next)) {