qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] TCG unit testing


From: Stefan Weil
Subject: Re: [Qemu-devel] [RFC] TCG unit testing
Date: Sun, 25 Aug 2013 21:45:54 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

Am 23.08.2013 23:18, schrieb Richard Henderson:
>
> I don't see how TCI really comes into this except as Yet Another Backend to be
> tested.  Indeed, such unit testing could show that TCI is in fact broken wrt
> helpers, depending on the host abi.

TCI is special because it is the only TCG backend which works (more or less)
for all hosts, so it can be improved to be a reference implementation.

Then it will be possible to compare execution traces from TCI with other
TCG backends.

> E.g. tci never defines TCG_TARGET_CALL_ALIGN_ARGS.  Thus if one uses tci on an
> ARM host, a helper like
>
> DEF_HELPER_FLAGS_2(store_fpcr, TCG_CALL_NO_RWG, void, env, i64)
>
> will have its arguments loaded into TCI's R0, R1, R2, and thence into the ARM
> r0, r1, r2.  But the ARM abi requires the i64 input to be aligned, and thus it
> should be r0, r2, r3.
>
>
> r~

Yes, those possible alignment issues were already discussed earlier.
Up to now, nobody cared enough to fix them. I have run some very
limited tests on ARM hardware. My tests did not trigger those problems.

I don't think that fixing the argument passing to helper functions is
very difficult: we have a limited set of different helper function
prototypes and can generate different calls for each case. This
might even speed up TCI a little bit because only necessary parameters
would be passed instead of the maximum number like it is done today.

This and other known (or unknown) problems of the TCI backend will of
course be fixed as soon as there are TCG unit tests which detect
these problems. :-) That's why I am very interested in such unit tests
and other tests for TCG backends.

Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]