aboutsummaryrefslogtreecommitdiff
path: root/arm-gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'arm-gen.c')
-rw-r--r--arm-gen.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/arm-gen.c b/arm-gen.c
index 03262aa..0f70062 100644
--- a/arm-gen.c
+++ b/arm-gen.c
@@ -801,16 +801,21 @@ int assign_fpreg(struct avail_regs *avregs, int align, int size)
#endif
/* Return 1 if this function returns via an sret pointer, 0 otherwise */
-ST_FUNC int gfunc_sret(CType *vt, CType *ret, int *align) {
+ST_FUNC int gfunc_sret(CType *vt, CType *ret, int *ret_align) {
+#if TCC_ARM_EABI
+ int size, align;
size = type_size(vt, &align);
if (size > 4) {
return 1;
} else {
- *align = 4;
+ *ret_align = 4;
ret->ref = NULL;
ret->t = VT_INT;
+ return 0;
}
- return 0;
+#else
+ return 1;
+#endif
}
/* Generate function call. The function address is pushed first, then