From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJQC6-0008KF-3f for qemu-devel@nongnu.org; Fri, 28 Feb 2014 11:21:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJQBt-0000EF-DZ for qemu-devel@nongnu.org; Fri, 28 Feb 2014 11:21:50 -0500 Received: from mail-qa0-x232.google.com ([2607:f8b0:400d:c00::232]:47949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJQBt-0000EB-93 for qemu-devel@nongnu.org; Fri, 28 Feb 2014 11:21:37 -0500 Received: by mail-qa0-f50.google.com with SMTP id cm18so836085qab.23 for ; Fri, 28 Feb 2014 08:21:36 -0800 (PST) Sender: Richard Henderson Message-ID: <5310B78C.4050202@twiddle.net> Date: Fri, 28 Feb 2014 08:21:32 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1391797050-20847-1-git-send-email-claudio.fontana@huawei.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tcg/aarch64: refactoring, remove inline magic insn numbers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Claudio Fontana , QEMU Developers Cc: Peter Maydell , Claudio Fontana , Claudio Fontana On 02/28/2014 12:33 AM, Claudio Fontana wrote: > ping? > > Richard, do you prefer to spin your polishing from last year instead? I do prefer my patch set over this. >> + INSN_IMM = 0x10000000, /* 3.4.1, 3.4.4 - add/sub and logical */ >> + INSN_SHIFT = 0x1ac02000, /* 3.5.8 - Data proc (2 source) */ ... >> +enum a64_insn_arith { >> + ARITH_ADD = 0x01 << 24, >> + ARITH_ADDS = 0x21 << 24, >> + ARITH_SUB = 0x41 << 24, >> + ARITH_SUBS = 0x61 << 24, >> + >> + ARITH_AND = 0x00 << 24, >> + ARITH_OR = 0x20 << 24, >> + ARITH_XOR = 0x40 << 24, >> + ARITH_ANDS = 0x60 << 24, >> }; ... >> +enum a64_insn_imm_arith { /* 3.4.1 */ >> + IMM_ADD = 0x01 << 24, >> + IMM_ADDS = 0x21 << 24, >> + IMM_SUB = 0x41 << 24, >> + IMM_SUBS = 0x61 << 24 ... >> +enum a64_insn_imm_log { /* 3.4.4 */ >> + IMM_AND = 0x02 << 24, >> + IMM_OR = 0x22 << 24, >> + IMM_XOR = 0x42 << 24, >> + IMM_ANDS = 0x62 << 24, >> +}; In particular, I'm not keen on these opcode / subopcode splits. They just make the source more confusing to read, and in my experience aren't helpful in practice. It's just as easy to put them together into e.g. a single "ADDI" symbol. r~