From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eb8bw-0006Gv-PK for qemu-devel@nongnu.org; Mon, 15 Jan 2018 12:31:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eb8bs-00005q-NE for qemu-devel@nongnu.org; Mon, 15 Jan 2018 12:31:52 -0500 Received: from mail-pl0-x232.google.com ([2607:f8b0:400e:c01::232]:42784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eb8bs-0008W5-GX for qemu-devel@nongnu.org; Mon, 15 Jan 2018 12:31:48 -0500 Received: by mail-pl0-x232.google.com with SMTP id bd8so4183775plb.9 for ; Mon, 15 Jan 2018 09:31:48 -0800 (PST) References: <1515562748-32287-1-git-send-email-rth@twiddle.net> From: Richard Henderson Message-ID: <2706dc83-cf36-31e9-71d7-ec7ca0cecff0@linaro.org> Date: Mon, 15 Jan 2018 09:31:43 -0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tcg/arm: Fix double-word comparisons List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Richard Henderson Cc: Michael Roth , Paolo Bonzini , QEMU Developers , David Gibson On 01/15/2018 06:27 AM, Peter Maydell wrote: > We could avoid the annoying "load LE/GE immediates to tempreg" > extra code by having tcg_out_cmp2() return a flag to tell > the caller which way round to put the conditions for its two > conditional ARITH_MOV insns (for setcond2) or which condition > to use for the branch (brcond2), right? No. We do return a condition to use for the user. When we do the LE/GT load immediates to temp path, we do apply tcg_cond_swap(cond), which converts the condition as for swapped arguments, i.e. to GE/LT. But we can't *not* swap the arguments to the generated comparison. Otherwise we're computing the wrong thing. r~