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.
This commit is contained in:
parent
8257829623
commit
f2ee6b1759
3 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ __bound_alloca:
|
||||||
#ifdef TCC_TARGET_PE
|
#ifdef TCC_TARGET_PE
|
||||||
p4:
|
p4:
|
||||||
cmp $4096,%eax
|
cmp $4096,%eax
|
||||||
jb p5
|
jbe p5
|
||||||
test %eax,-4096(%esp)
|
test %eax,-4096(%esp)
|
||||||
sub $4096,%esp
|
sub $4096,%esp
|
||||||
sub $4096,%eax
|
sub $4096,%eax
|
||||||
|
|
|
@ -13,7 +13,7 @@ alloca:
|
||||||
#ifdef TCC_TARGET_PE
|
#ifdef TCC_TARGET_PE
|
||||||
p1:
|
p1:
|
||||||
cmp $4096,%eax
|
cmp $4096,%eax
|
||||||
jb p2
|
jbe p2
|
||||||
test %eax,-4096(%esp)
|
test %eax,-4096(%esp)
|
||||||
sub $4096,%esp
|
sub $4096,%esp
|
||||||
sub $4096,%eax
|
sub $4096,%eax
|
||||||
|
|
|
@ -17,7 +17,7 @@ alloca:
|
||||||
#ifdef TCC_TARGET_PE
|
#ifdef TCC_TARGET_PE
|
||||||
p1:
|
p1:
|
||||||
cmp $4096,%rax
|
cmp $4096,%rax
|
||||||
jb p2
|
jbe p2
|
||||||
test %rax,-4096(%rsp)
|
test %rax,-4096(%rsp)
|
||||||
sub $4096,%rsp
|
sub $4096,%rsp
|
||||||
sub $4096,%rax
|
sub $4096,%rax
|
||||||
|
|
Loading…
Reference in a new issue