aboutsummaryrefslogtreecommitdiff
path: root/tccrun.c
diff options
context:
space:
mode:
authorgrischka <grischka>2009-12-19 22:40:28 +0100
committergrischka <grischka>2009-12-20 01:54:37 +0100
commit50b040ef83252730d75463bdeea589294e698532 (patch)
tree92e82f58787576e018858939f97361b486d6bb6f /tccrun.c
parent88a3ccab9f3c877e2ffb8fecc3303006e0640907 (diff)
downloadtinycc-50b040ef83252730d75463bdeea589294e698532.tar.gz
tinycc-50b040ef83252730d75463bdeea589294e698532.tar.bz2
win64: add tiny unwind data for setjmp/longjmp
This enables native unwind semantics with longjmp on win64 by putting an entry into the .pdata section for each compiled fuction. Also, the function now use a fixed stack and store arguments into X(%rsp) rather than using push.
Diffstat (limited to 'tccrun.c')
-rw-r--r--tccrun.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tccrun.c b/tccrun.c
index e88f87e..52855a7 100644
--- a/tccrun.c
+++ b/tccrun.c
@@ -78,6 +78,13 @@ int tcc_run(TCCState *s1, int argc, char **argv)
return ret;
}
#endif
+
+#ifdef TCC_TARGET_PE
+ {
+ unsigned char *p = tcc_get_symbol(s1, "tinyc_no_getbp");
+ if (p) *p = 0;
+ }
+#endif
return (*prog_main)(argc, argv);
}