Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-14 Thread Richard Henderson
Michael Walle and Jia Liu, see below wrt minor lm32 and openrisc mistakes. On 09/14/2013 02:51 AM, Peter Maydell wrote: >> I had a look on libffi now and don't see how it could solve my problem. >> As far as I could see, libffi must be ported to new architectures, so >> its use would restrict the

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-14 Thread Peter Maydell
On 14 September 2013 08:18, Stefan Weil wrote: > Am 12.09.2013 22:35, schrieb Peter Maydell: >> You're not a native assembly backend, you can't rely on this >> to be sufficient. Use libffi or call the target function with >> the exact correct prototype. > I had a look on libffi now and don't see

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-14 Thread Stefan Weil
Am 12.09.2013 22:35, schrieb Peter Maydell: > On 12 September 2013 20:45, Stefan Weil wrote: >> +else >> + >> + # Cross compilation, so we cannot launch a program. Require configure >> argument. >> + error_exit "Unknown function argument alignment" \ >> + "The TCG interpreter must k

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-12 Thread Richard Henderson
On 09/12/2013 01:40 PM, Stefan Weil wrote: > Am 12.09.2013 22:29, schrieb Richard Henderson: >> On 09/12/2013 12:45 PM, Stefan Weil wrote: >>> +cat > $TMPC << EOF >>> +#include >>> +#include >>> +#include >>> +#include >>> +static bool call_align_args(uint32_t arg1, uint64_t arg2) { >>> + if (

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-12 Thread Richard Henderson
On 09/12/2013 12:45 PM, Stefan Weil wrote: > +cat > $TMPC << EOF > +#include > +#include > +#include > +#include > +static bool call_align_args(uint32_t arg1, uint64_t arg2) { > + if (arg2 == 0x0003004ULL || arg2 == 0x00040003ULL) { > +return true; > + } else if (arg2 == 2

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-12 Thread Peter Maydell
On 12 September 2013 20:45, Stefan Weil wrote: > +else > + > + # Cross compilation, so we cannot launch a program. Require configure > argument. > + error_exit "Unknown function argument alignment" \ > + "The TCG interpreter must know the alignment of function > arguments." \ > +

Re: [Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-12 Thread Stefan Weil
Am 12.09.2013 22:29, schrieb Richard Henderson: > On 09/12/2013 12:45 PM, Stefan Weil wrote: >> +cat > $TMPC << EOF >> +#include >> +#include >> +#include >> +#include >> +static bool call_align_args(uint32_t arg1, uint64_t arg2) { >> + if (arg2 == 0x0003004ULL || arg2 == 0x0004000

[Qemu-devel] [PATCH] tci: Detect function argument alignment

2013-09-12 Thread Stefan Weil
This fixes TCI on ARM hosts (tested with Debian's busybox-static running in linux-user emulation). Signed-off-by: Stefan Weil --- configure| 63 ++ tcg/tci/tcg-target.h |6 - 2 files changed, 68 insertions(+), 1 deletion(-) d