| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
On ARM with hardfloat calling convention, structure containing 4 fields
or less of the same float type are returned via float registers. This
means that a structure can be returned in up to 4 double registers in a
structure is composed of 4 doubles. This commit adds support for return
of structures in several registers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use runtime function for conversion
- Also initialize fp with tcc -run on windows
This fixes a bug where
double x = 1.0;
double y = 1.0000000000000001;
double z = x < y ? 0 : sqrt (x*x - y*y);
caused a bad sqrt because rounding precision for the x < y comparison
was different to the one used within the sqrt function.
This also fixes a bug where
printf("%d, %d", (int)pow(10, 2), (int)pow(10, 2));
would print
100, 99
Unrelated:
win32: document relative include & lib lookup
win32: normalize_slashes: do not mirror silly gcc behavior
This reverts part of commit 8a81f9e1036637e21a47e14fb56bf64133546890
winapi: add missing WINAPI decl. for some functions
|
| |
|
|
|
| |
Add support for loading _Bool value in i386, x86_64 and arm as well as
support for storing _Bool value on arm.
|
| |
|
|
| |
for compiling tcc with msc
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VLA storage is now freed when it goes out of scope. This makes it
possible to use a VLA inside a loop without consuming an unlimited
amount of memory.
Combining VLAs with alloca() should work as in GCC - when a VLA is
freed, memory allocated by alloca() after the VLA was created is also
freed. There are some exceptions to this rule when using goto: if a VLA
is in scope at the goto, jumping to a label will reset the stack pointer
to where it was immediately after the last VLA was created prior to the
label, or to what it was before the first VLA was created if the label
is outside the scope of any VLA. This means that in some cases combining
alloca() and VLAs will free alloca() memory where GCC would not.
|
| |
|
|
|
| |
The i386 calling convention expects the callee to pop 1 word of the
stack when performing a struct ret.
|
| |
|
|
|
|
|
| |
I expect that Linux-x86 is probably fine. All other architectures
except ARM are definitely broken since I haven't yet implemented
gfunc_sret for these, although replicating the current behaviour
should be straightforward.
|
| |
|
|
|
|
|
| |
avoid c++/c99 style comments in preprocessor directives
avoid leadings whitespaces in preprocessor directives
mention implemented variable length arrays in documentation
fixed ambiguous option in texi2html call (Austin English)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because that mov is 1 byte shorter, look:
int *func()
{
return __builtin_frame_address(0);
}
before patch:
00000000 <func>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 81 ec 00 00 00 00 sub $0x0,%esp
9: 8d 45 00 lea 0x0(%ebp),%eax // <- here
c: e9 00 00 00 00 jmp 11 <func+0x11>
11: c9 leave
12: c3 ret
after patch:
00000000 <func>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 81 ec 00 00 00 00 sub $0x0,%esp
9: 89 e8 mov %ebp,%eax // <- here
b: e9 00 00 00 00 jmp 10 <func+0x10>
10: c9 leave
11: c3 ret
|
| |
|
|
| |
These loads clobbered ebx as TinyCC wanted to load the address into st0.
|
| | |
|
| | |
|
| |
|
|
| |
No need to keep executable bit on plain C source.
|
| | |
|
| | |
|
| |
|
|
| |
If you want that, run: make NOTALLINONE=1
|
| |
|
|
| |
exception handler borrowed from k1w1. Thanks.
|
| | |
|
| | |
|
| |
|
|
|
| |
Also, disable 16bit support for now as it causes bugs
in 32bit mode. #define I386_ASM_16 if you want it.
|
| | |
|
| |
|
|
|
| |
We need 32bit relocations for code and 64bit for debug info.
Introduce a new macro R_DATA_PTR to distinguish the two usages.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
bits at runtime (Dave Dodge)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
ARM (Daniel Glockner) - fixed small ld script support (Daniel Glockner)
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
time dump in bench
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|