From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG9xd-00081i-Mt for qemu-devel@nongnu.org; Thu, 23 Jun 2016 15:06:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG9xb-0000cD-Li for qemu-devel@nongnu.org; Thu, 23 Jun 2016 15:06:44 -0400 Sender: Richard Henderson References: <1466599029-3388432-1-git-send-email-afarallax@yandex.ru> <5d86b8ba-16e8-e94d-ba7f-e865cbcc938e@twiddle.net> <1793281466613020@web5h.yandex.ru> <6c24c820-4a26-848c-e62d-88ebce59125d@twiddle.net> <201241466676212@web21j.yandex.ru> <458f40bb-cb58-4e10-2237-a08cb35155bd@twiddle.net> <200981466691221@web14m.yandex.ru> <804691466706062@web16g.yandex.ru> From: Richard Henderson Message-ID: Date: Thu, 23 Jun 2016 12:06:35 -0700 MIME-Version: 1.0 In-Reply-To: <804691466706062@web16g.yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] Improve the alignment check infrastructure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sergey Sorokin , "qemu-devel@nongnu.org" Cc: Paolo Bonzini , Peter Crosthwaite , Alexander Graf , "qemu-arm@nongnu.org" , Claudio Fontana , Vassili Karpov On 06/23/2016 11:21 AM, Sergey Sorokin wrote: > Yes, I thought about it. tcg_canonicalize_memop() is good place too. > But do you think that get_alignment_bits() is not good enough? I think the earlier a target-* translator problem is diagnosed the better. Leaving things in get_alignment_bits is ok, so long as we then invoke get_alignment bits in tcg_canonicalize_memop. Perhaps static inline TCGMemOp tcg_canonicalize_memop(TCGMemOp op, bool is64, bool st) { /* Trigger the asserts within sooner rather than later. */ (void)get_alignment_bits(op); ... } r~