From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51066) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsCGW-0002Ow-Hv for qemu-devel@nongnu.org; Tue, 12 May 2015 11:38:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsCGQ-0006gA-SN for qemu-devel@nongnu.org; Tue, 12 May 2015 11:38:40 -0400 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:36743) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsCGQ-0006g3-Ou for qemu-devel@nongnu.org; Tue, 12 May 2015 11:38:34 -0400 Received: by qku63 with SMTP id 63so8217692qku.3 for ; Tue, 12 May 2015 08:38:34 -0700 (PDT) Sender: Richard Henderson Message-ID: <55521E76.7090408@twiddle.net> Date: Tue, 12 May 2015 08:38:30 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1431343850-46198-1-git-send-email-yongbok.kim@imgtec.com> <1431343850-46198-3-git-send-email-yongbok.kim@imgtec.com> <5550AB66.5010503@imgtec.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/2] target-mips: Misaligned memory accesses for MSA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Yongbok Kim Cc: Leon Alrae , QEMU Developers On 05/12/2015 02:54 AM, Peter Maydell wrote: > Ideally it would be nice to have support in TCG so that a frontend > could output a TCG load/store op with a flag for "unaligned access > OK" or not. ARM also has this issue of some load/stores wanting to > do alignment traps and some not. Yes, that would be ideal. As I was looking at softmmu_template.h for Peter C this morning, I was wondering about that possibility, since he would be needing to hook cpu_unaligned_access and the #ifdef ALIGNED_ONLY would need to go away. What we can't afford is yet another parameter to the helpers. So I turn my eye to the mmu_idx parameter, of which we're only using a couple of bits. What if we merge mmu_idx with TCGMemOp as a parameter, at the tcg-op.h interface? Save a tiny bit o space within the tcg opcode buffer. We'd have to teach each backend to pull them apart when generating code, but that's trivial. But in the end, the helpers have all the info that the code generator did wrt the access. Then we add an "aligned" bit to TCGMemOp and use it instead of ifdef ALIGNED_ONLY. Thoughts? r~