Fix struct ret in variadic fct with ARM hardfloat
commit8efaa711904b897f9a4821656ac10f980c5ae9fe
authorThomas Preud'homme <robotux@celest.fr>
Mon, 6 Jan 2014 14:27:39 +0000 (6 22:27 +0800)
committerThomas Preud'homme <robotux@celest.fr>
Mon, 6 Jan 2014 14:57:05 +0000 (6 22:57 +0800)
treeca8a2805bec48ebcedb68553753f238a6b6df71b
parentbcc1904f9c950cbf5aae8711d1dcdcfe422fb456
Fix struct ret in variadic fct with ARM hardfloat

The procedure calling standard for ARM architecture mandate the use of
the base standard for variadic function. Therefore, hgen float aggregate
must be returned via stack when greater than 4 bytes and via core
registers else in case of variadic function.

This patch improve gfunc_sret() to take into account whether the
function is variadic or not and make use of gfunc_sret() return value to
determine whether to pass a structure via stack in gfunc_prolog(). It
also take advantage of knowing if a function is variadic or not move
float result value from VFP register to core register in gfunc_epilog().
arm-gen.c
c67-gen.c
i386-gen.c
il-gen.c
tcc.h
tccgen.c
x86_64-gen.c