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 | # define _(s) s | 7 | # define _(s) s |
| 8 | #endif | 8 | #endif |
| 9 | 9 | ||
| 10 | .globl _(alloca) | 10 | .globl _(alloca), _(__alloca) |
| 11 | _(alloca): | 11 | _(alloca): |
| 12 | pop %edx | 12 | _(__alloca): |
| 13 | pop %eax | 13 | push %ebp |
| 14 | mov %esp,%ebp | ||
| 15 | mov 8(%ebp),%eax | ||
| 14 | add $3,%eax | 16 | add $3,%eax |
| 15 | and $-4,%eax | 17 | and $-4,%eax |
| 16 | jz p3 | ||
| 17 | |||
| 18 | #ifdef _WIN32 | 18 | #ifdef _WIN32 |
| 19 | jmp .+16 #p2 | ||
| 19 | p1: | 20 | p1: |
| 20 | cmp $4096,%eax | ||
| 21 | jbe p2 | ||
| 22 | test %eax,-4096(%esp) | ||
| 23 | sub $4096,%esp | 21 | sub $4096,%esp |
| 24 | sub $4096,%eax | 22 | sub $4096,%eax |
| 25 | jmp p1 | 23 | test %eax,(%esp) |
| 26 | p2: | 24 | p2: |
| 25 | cmp $4096,%eax | ||
| 26 | jae p1 | ||
| 27 | #endif | 27 | #endif |
| 28 | |||
| 29 | sub %eax,%esp | 28 | sub %eax,%esp |
| 30 | mov %esp,%eax | 29 | mov 4(%ebp),%eax |
| 31 | p3: | 30 | mov 0(%ebp),%ebp |
| 32 | push %edx | 31 | add $8,%esp |
| 33 | push %edx | 32 | push %eax |
| 33 | lea 8(%esp),%eax | ||
| 34 | ret | 34 | ret |
| 35 | 35 | ||
| 36 | /* ---------------------------------------------- */ | 36 | /* ---------------------------------------------- */ |
| @@ -625,3 +625,9 @@ long long __fixxfdi (long double a1) · 624 unmodified lines | |||
| 625 | return s ? ret : -ret; | 625 | return s ? ret : -ret; |
| 626 | } | 626 | } |
| 627 | #endif /* !ARM */ | 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 | ||