aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorgrischka <grischka>2009-07-18 22:06:54 +0200
committergrischka <grischka>2009-07-18 22:06:54 +0200
commitfc977d56c90b6c6a54b7e831b5c88e37f54a5cae (patch)
tree51d2b865b88ba820373d8240377926bca63f857d /lib
parentc0fc0fa0c4276debb7d0fd24f91e3af38128ad28 (diff)
downloadtinycc-fc977d56c90b6c6a54b7e831b5c88e37f54a5cae.tar.gz
tinycc-fc977d56c90b6c6a54b7e831b5c88e37f54a5cae.tar.bz2
x86-64: chkstk, alloca
Diffstat (limited to 'lib')
-rw-r--r--lib/alloca86-bt.S2
-rw-r--r--lib/alloca86_64.S9
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/alloca86-bt.S b/lib/alloca86-bt.S
index 994da20..c5d5f4d 100644
--- a/lib/alloca86-bt.S
+++ b/lib/alloca86-bt.S
@@ -1,5 +1,5 @@
/* ---------------------------------------------- */
-/* alloca86b.S */
+/* alloca86-bt.S */
#include "../config.h"
diff --git a/lib/alloca86_64.S b/lib/alloca86_64.S
index 684a3e9..13c4672 100644
--- a/lib/alloca86_64.S
+++ b/lib/alloca86_64.S
@@ -7,13 +7,16 @@
alloca:
pop %rdx
+#ifdef TCC_TARGET_PE
+ mov %rcx,%rax
+#else
mov %rdi,%rax
+#endif
add $15,%rax
and $-16,%rax
jz p3
#ifdef TCC_TARGET_PE
- /* XXX: not tested */
p1:
cmp $4096,%rax
jle p2
@@ -26,6 +29,10 @@ p2:
sub %rax,%rsp
mov %rsp,%rax
+#ifdef TCC_TARGET_PE
+ add $32,%rax
+#endif
+
p3:
push %rdx
ret