From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpeD0-0005Zu-Hc for qemu-devel@nongnu.org; Tue, 05 May 2015 10:52:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpeCu-0002ws-TZ for qemu-devel@nongnu.org; Tue, 05 May 2015 10:52:30 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:8573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpeCu-0002wK-Oq for qemu-devel@nongnu.org; Tue, 05 May 2015 10:52:24 -0400 Message-ID: <5548D8E4.7000504@imgtec.com> Date: Tue, 5 May 2015 15:51:16 +0100 From: Leon Alrae MIME-Version: 1.0 References: <1430493868-21452-1-git-send-email-yongbok.kim@imgtec.com> <1430493868-21452-4-git-send-email-yongbok.kim@imgtec.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/3] 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: QEMU Developers On 01/05/2015 16:43, Peter Maydell wrote: >> +#if !defined(CONFIG_USER_ONLY) >> +static bool cpu_mips_validate_msa_block_access(CPUMIPSState *env, >> + target_ulong address, int df,= int rw) >> +{ >> + int i; >> + for (i =3D 0; i < DF_ELEMENTS(df); i++) { >> + if (!cpu_mips_validate_access(env, address + (i << df), >> + address, (1 << df), rw)) { >> + CPUState *cs =3D CPU(mips_env_get_cpu(env)); >> + helper_raise_exception_err(env, cs->exception_index, >> + env->error_code); >=20 > I was wondering if this would get the correct PC in the exception > case, but we always call save_cpu_state() before calling the > msa_ld/st_df helpers, so it will. FYI, quite recently Richard suggested a clean-up for this (and all other MIPS load/store instructions using helpers), so save_cpu_state() wouldn=E2=80=99t be required. I haven=E2=80=99t got round to it yet but s= ounds like a nice improvement. Leon