Hi,
On Mon, 9 Mar 2015, Edmund Grimley Evans wrote:
Michael Matz <matz....@frakked.de>:
And some more fixes for more tests in 73_arm64, namely stdarg
passing of structs passed in purely integer registers. structs
passed in fp regs or mixed int/fp regs are unfortunately not
consecutive in the reg_save_area, and hence need temporary memory,
but this requires some more involved changes in libtcc1.
On arm64 a struct is sometimes not consecutive in memory. Code is
generated in gen_va_arg() in arm64-gen.c to rearrange the data. I get
more stack space using the global variable "loc".
Yes, I know. I just wanted to avoid having to open-code a va_arg in
x86-64, it currently uses a C implementation from libtcc1. With that
approach I can't allocate stack in the calling routine, of course, and
would have to resort to a static buffer, which in turn would break
multi-threaded use, or use malloc which would create a leak, or use malloc
with reuse, which requires a global list, again creating multi-threaded
problems :-/ Over that set of stones and hard places I went to bed. (I
now think the only realistic option is indeed to generate va_arg from the
backend).
Ciao,
Michael.
_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel