From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJVaf-0005JQ-Ve for qemu-devel@nongnu.org; Tue, 10 Sep 2013 17:35:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJVaY-00057R-Eo for qemu-devel@nongnu.org; Tue, 10 Sep 2013 17:35:17 -0400 Received: from v220110690675601.yourvserver.net ([37.221.199.173]:34348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJVaY-00057E-9L for qemu-devel@nongnu.org; Tue, 10 Sep 2013 17:35:10 -0400 Message-ID: <522F907F.4090600@weilnetz.de> Date: Tue, 10 Sep 2013 23:34:55 +0200 From: Stefan Weil MIME-Version: 1.0 References: <5217BC5F.4060306@twiddle.net> <5217C94F.6010607@weilnetz.de> <5217D1A7.6000003@twiddle.net> In-Reply-To: <5217D1A7.6000003@twiddle.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC] TCI for ARM and other hosts with aligned args (was: Re: [RFC] TCG unit testing) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel , Aurelien Jarno 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. > > 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~ For native compilations, TCG_TARGET_CALL_ALIGN_ARGS can be set from configure. Cross compilations cannot set that macro automatically (or is there some way to do this?), so a configure option is needed if the cross target is unknown. Should we use this mechanism for all hosts (and move the definitions in tcg-target.h to a conditional definition in tcg.h), or should we use it only for TCI? TCI on ARM works for most architectures when I set TCG_TARGET_CALL_ALIGN_ARGS. It only fails for qemu-alpha. The alpha disassembler does not work on 32 bit hosts, therefore debugging is difficult. Regards, Stefan