aboutsummaryrefslogtreecommitdiff
path: root/c67-gen.c
diff options
context:
space:
mode:
authorJames Lyon <jamesly0n@hotmail.com>2013-04-19 00:40:48 +0100
committerJames Lyon <jamesly0n@hotmail.com>2013-04-19 00:46:49 +0100
commit55ea6d3fc175b0e01e2e946ca9b319c1fbe8aa67 (patch)
tree7f541d052ececf742853561cd1d8099635ee5ae8 /c67-gen.c
parent3f1d9000071eeebe315795079c3adbe4022d6d19 (diff)
downloadtinycc-55ea6d3fc175b0e01e2e946ca9b319c1fbe8aa67.tar.gz
tinycc-55ea6d3fc175b0e01e2e946ca9b319c1fbe8aa67.tar.bz2
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.
Diffstat (limited to 'c67-gen.c')
-rw-r--r--c67-gen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/c67-gen.c b/c67-gen.c
index abf25df..7d559c8 100644
--- a/c67-gen.c
+++ b/c67-gen.c
@@ -1879,6 +1879,12 @@ static void gcall_or_jmp(int is_jmp)
}
}
+/* Return 1 if this function returns via an sret pointer, 0 otherwise */
+ST_FUNC int gfunc_sret(CType *vt, CType *ret, int *ret_align) {
+ *ret_align = 1; // Never have to re-align return values for x86-64
+ return 1;
+}
+
/* generate function call with address in (vtop->t, vtop->c) and free function
context. Stack entry is popped */
void gfunc_call(int nb_args)