aboutsummaryrefslogtreecommitdiff
path: root/tests/tests2/07_function.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2016-05-15 21:10:06 +0300
committerseyko <seyko2@gmail.com>2016-05-15 21:10:06 +0300
commita37f8cfc805025019c93ae3114295eff363168a0 (patch)
tree96886162ab128c6efca61bf3e3b91a3892a36389 /tests/tests2/07_function.c
parent9d679e391660e411d676b847ff4ce72beda60927 (diff)
downloadtinycc-a37f8cfc805025019c93ae3114295eff363168a0.tar.gz
tinycc-a37f8cfc805025019c93ae3114295eff363168a0.tar.bz2
short_call_convention patch from tcc bugzilla
BUGZILLA: interfacing with other compilers extend the return value to the whole register if necessary. visual studio and gcc do not always set the whole eax register when assigning the return value of a function. We've encountered wrong execution results on i386 platforms with an application that uses both code compiled with TCC and code compiled with other compilers (namely: Visual Studio on Windows, and GCC on Linux). When calling a function that returns an integer value shorter than 32 bits, TCC reads the return value from the whole EAX register, although the code generated by the other compilers can only sets AL for 8 bit values or AX for 16 bits values, and the rest of EAX can be anything. We worked around this with the attached patch on i386 for the version 0.9.26, but we did not look at other platforms to find if there are similar issues.
Diffstat (limited to 'tests/tests2/07_function.c')
0 files changed, 0 insertions, 0 deletions