From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULFJB-0004wT-Hp for qemu-devel@nongnu.org; Thu, 28 Mar 2013 12:04:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULFJ8-0005xh-Ji for qemu-devel@nongnu.org; Thu, 28 Mar 2013 12:04:09 -0400 Received: from mail-ob0-x229.google.com ([2607:f8b0:4003:c01::229]:37252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULFJ8-0005xZ-Fe for qemu-devel@nongnu.org; Thu, 28 Mar 2013 12:04:06 -0400 Received: by mail-ob0-f169.google.com with SMTP id oi10so8223586obb.14 for ; Thu, 28 Mar 2013 09:04:05 -0700 (PDT) Sender: Richard Henderson Message-ID: <515469F1.2020204@twiddle.net> Date: Thu, 28 Mar 2013 09:04:01 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1364484781-15561-1-git-send-email-rth@twiddle.net> <1364484781-15561-6-git-send-email-rth@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 05/20] tcg-arm: Handle constant arguments to add2/sub2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, Aurelien Jarno On 03/28/2013 08:56 AM, Peter Maydell wrote: >> +#define TO_CPSR (1 << 20) > > This is the S bit; I think it would be helpful if our #define > had a name that made that clearer... Suggestions? I thought "TO_CPSR" was clear... >> + ARITH_TST = 0x8 << 21 | TO_CPSR, >> + ARITH_CMP = 0xa << 21 | TO_CPSR, >> + ARITH_CMN = 0xb << 21 | TO_CPSR, >> + ARITH_ORR = 0xc << 21, >> + ARITH_MOV = 0xd << 21, >> + ARITH_BIC = 0xe << 21, >> + ARITH_MVN = 0xf << 21, >> }; > > It feels a little ugly to OR in the S bit in this enum, but I guess > it works. I think it actually makes everything a lot cleaner myself. Especially given the previous definition that required runtime checks for TST et al. > Maybe we should add ARITH_TEQ at some point? Given that it's the only one left out, sure. I can't imagine what context it would be useful within tcg though -- it's main use seems to be doing an equality comparison while preserving the C flag. r~