From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLwfO-0003oU-De for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:54:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLwfG-0005ra-0Q for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:54:14 -0400 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]:42446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLwfF-0005rU-Ou for qemu-devel@nongnu.org; Tue, 17 Sep 2013 10:54:05 -0400 Received: by mail-pa0-f51.google.com with SMTP id lf1so6953375pab.10 for ; Tue, 17 Sep 2013 07:54:04 -0700 (PDT) Sender: Richard Henderson Message-ID: <52386D08.8090307@twiddle.net> Date: Tue, 17 Sep 2013 07:54:00 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1379195690-6509-1-git-send-email-rth@twiddle.net> <1379195690-6509-9-git-send-email-rth@twiddle.net> <5236C44C.7060405@huawei.com> <52372479.3080807@twiddle.net> <52381167.9020800@huawei.com> In-Reply-To: <52381167.9020800@huawei.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 08/33] tcg-aarch64: Introduce tcg_fmt_Rdnm and tcg_fmt_Rdnm_lsl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Claudio Fontana Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org On 09/17/2013 01:23 AM, Claudio Fontana wrote: >> It would have been handy if ARM had officially assigned identifiers to the >> formats, like Power, S390, and ia64 do. Then one can build in the format ids >> into both the function and enumeration names and use the preprocessor for >> typechecking (c.f. the tcg_out_insn macro in tcg/s390/tcg-target.c). > > No need to do force explicit typechecking like that. > That kind of use of the preprocessor really hurts. Why do you believe this? Have you browsed through the s390 backend? I think it's a remarkably clean solution -- one we ought to have used in the ia64 backend, which has even more format codes. >> Therefore I think adding LSR, ASR and ROR shifts is both a waste of time and >> bloats the backend. > > I agree, lets just keep only left shift and right shift. > Distinguishing the two costs one comparison per call, I think we can survive it. I don't understand you at all. You agree that removing the unused shift from cmp is sensible. You agree that not adding unused asr/ror shifts is sensible. But you insist that the unused lsr shift should be retained? You complain about wasting Y space in my positioning of comments. But you insist on wasting X space, and allowing the possibility of mismatch, by requiring format names to be duplicated? r~