diff options
author | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2010-03-13 11:03:40 +0100 |
---|---|---|
committer | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2010-03-13 11:03:40 +0100 |
commit | 406bee985de85229e0ba54a9efa767c194262d0c (patch) | |
tree | 2dee8785db170e33b235771ebdf7d43985b80c31 /lib/alloca86.S | |
parent | fa3f0c7c00c4e5da92e4e4f1a06f193507d56261 (diff) |
Imported Upstream version 0.9.25
Diffstat (limited to 'lib/alloca86.S')
-rw-r--r-- | lib/alloca86.S | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/alloca86.S b/lib/alloca86.S new file mode 100644 index 0000000..fb208a0 --- /dev/null +++ b/lib/alloca86.S @@ -0,0 +1,33 @@ +/* ---------------------------------------------- */ +/* alloca86.S */ + +#include "../config.h" + +.globl alloca + +alloca: + pop %edx + pop %eax + add $3,%eax + and $-4,%eax + jz p3 + +#ifdef TCC_TARGET_PE +p1: + cmp $4096,%eax + jle p2 + sub $4096,%esp + sub $4096,%eax + test %eax,(%esp) + jmp p1 +p2: +#endif + + sub %eax,%esp + mov %esp,%eax +p3: + push %edx + push %edx + ret + +/* ---------------------------------------------- */ |