for floats (currently only). On x86_64 uses built-in fp constants (in libtcc1.c) to avoid multiple anonymous instances. Also: win32/i386: use __alloca for big struct stack store - use new function int tok_alloc_const(const char*); - change alloca86.S to preserve EDX tccelf.c: fix a warning with 'roinf_use'
Showing the changes to lib (2 of 11 files). Show all
Unified · Split
| @@ -7,30 +7,30 @@ · 6 unmodified lines | ||
| 7 | 7 | # define _(s) s |
| 8 | 8 | #endif |
| 9 | 9 | |
| 10 | −.globl _(alloca) | |
| 10 | +.globl _(alloca), _(__alloca) | |
| 11 | 11 | _(alloca): |
| 12 | − pop %edx | |
| 13 | − pop %eax | |
| 12 | +_(__alloca): | |
| 13 | + push %ebp | |
| 14 | + mov %esp,%ebp | |
| 15 | + mov 8(%ebp),%eax | |
| 14 | 16 | add $3,%eax |
| 15 | 17 | and $-4,%eax |
| 16 | − jz p3 | |
| 17 | − | |
| 18 | 18 | #ifdef _WIN32 |
| 19 | + jmp .+16 #p2 | |
| 19 | 20 | p1: |
| 20 | − cmp $4096,%eax | |
| 21 | − jbe p2 | |
| 22 | − test %eax,-4096(%esp) | |
| 23 | 21 | sub $4096,%esp |
| 24 | 22 | sub $4096,%eax |
| 25 | − jmp p1 | |
| 23 | + test %eax,(%esp) | |
| 26 | 24 | p2: |
| 25 | + cmp $4096,%eax | |
| 26 | + jae p1 | |
| 27 | 27 | #endif |
| 28 | − | |
| 29 | 28 | sub %eax,%esp |
| 30 | − mov %esp,%eax | |
| 31 | −p3: | |
| 32 | − push %edx | |
| 33 | − push %edx | |
| 29 | + mov 4(%ebp),%eax | |
| 30 | + mov 0(%ebp),%ebp | |
| 31 | + add $8,%esp | |
| 32 | + push %eax | |
| 33 | + lea 8(%esp),%eax | |
| 34 | 34 | ret |
| 35 | 35 | |
| 36 | 36 | /* ---------------------------------------------- */ |
| @@ -625,3 +625,9 @@ long long __fixxfdi (long double a1) · 624 unmodified lines | ||
| 625 | 625 | return s ? ret : -ret; |
| 626 | 626 | } |
| 627 | 627 | #endif /* !ARM */ |
| 628 | + | |
| 629 | +#if defined __x86_64__ | |
| 630 | +/* float constants used for unary minus operation */ | |
| 631 | +const float __mzerosf = -0.0; | |
| 632 | +const double __mzerodf = -0.0; | |
| 633 | +#endif | |