From: Carlos Montiers Date: Fri, 11 Jul 2014 00:41:51 +0000 (-0400) Subject: Fix mistake. Change jb by jbe. tiny c round (INT_MAX = 0x7FFFFFFF) to a DWORD boundar... X-Git-Tag: release_0_9_27~869 X-Git-Url: https://repo.or.cz/w/tinycc.git/commitdiff_plain/f2ee6b1759af005a060d638676a3e12ab8e42f9d Fix mistake. Change jb by jbe. tiny c round (INT_MAX = 0x7FFFFFFF) to a DWORD boundary and it becomes 0x80000000. Jle treats as -214783648, but Jbe treats as 214783648. Thanks to Jason Hood for explain me this. --- diff --git a/lib/alloca86-bt.S b/lib/alloca86-bt.S index ff07bbbc..52155053 100644 --- a/lib/alloca86-bt.S +++ b/lib/alloca86-bt.S @@ -14,7 +14,7 @@ __bound_alloca: #ifdef TCC_TARGET_PE p4: cmp $4096,%eax - jb p5 + jbe p5 test %eax,-4096(%esp) sub $4096,%esp sub $4096,%eax diff --git a/lib/alloca86.S b/lib/alloca86.S index 5bb38b1f..a17e07f2 100644 --- a/lib/alloca86.S +++ b/lib/alloca86.S @@ -13,7 +13,7 @@ alloca: #ifdef TCC_TARGET_PE p1: cmp $4096,%eax - jb p2 + jbe p2 test %eax,-4096(%esp) sub $4096,%esp sub $4096,%eax diff --git a/lib/alloca86_64.S b/lib/alloca86_64.S index 51acd424..4a741047 100644 --- a/lib/alloca86_64.S +++ b/lib/alloca86_64.S @@ -17,7 +17,7 @@ alloca: #ifdef TCC_TARGET_PE p1: cmp $4096,%rax - jb p2 + jbe p2 test %rax,-4096(%rsp) sub $4096,%rsp sub $4096,%rax