mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-31 06:20:06 +08:00
c8ca64d28b
this is a bit complicated: for i386 and x86-64 we really need to extend return values ourself, as the common code now does. For arm64 this at least preserves old behaviour. For riscv64 we don't have to extend ourself but can expect things to be extended up to int (this matters for var-args tests, when the sign-extension to int64 needs to happen explicitely). As the extensions are useless, don't do them. And for arm32 we actually can't express GCC behaviour: the callee side expects the return value to be correctly extended to int32, but remembers the original type. In case the ultimate target type for the call result is only int, no further extension is done. But in case the target type is e.g. int64 an extension happens, but not from int32 but from the original type. We don't know the ultimate target type, so we have to choose a type to put into vtop: * original type (plus VT_MUSTCAST) - this looses when the ultimate target is int (GCC: no cast, TCC: a cast) * int (without MUSTCAST) - this looses when the ultimate target is int64 (GCC: cast from original type, TCC: cast from int) This difference can only be seen with undefined sources, like the testcases, so it doesn't seem worthwhile to try an make it work, just disable the test on arm and choose the second variant as that generates less code. |
||
---|---|---|
.. | ||
pp | ||
tests2 | ||
42test.h | ||
abitest.c | ||
asm-c-connect-1.c | ||
asm-c-connect-2.c | ||
asmtest.S | ||
boundtest.c | ||
gcctestsuite.sh | ||
libtcc_test_mt.c | ||
libtcc_test.c | ||
Makefile | ||
tcctest.c | ||
tcctest.h | ||
testfp.c | ||
vla_test.c |