x86-64 ABI fixes.

abitest now passes; however test1-3 fail in init_test. All other tests
pass. I need to re-test Win32 and Linux-x86.

I've added a dummy implementation of gfunc_sret to c67-gen.c so it
should now compile, and I think it should behave as before I created
gfunc_sret.
This commit is contained in:
James Lyon
2013-04-19 00:40:48 +01:00
parent 3f1d900007
commit 55ea6d3fc1
9 changed files with 334 additions and 75 deletions

View File

@ -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