Received: from eggs.gnu.org ([2001:4830:134:3::10]:60300) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgUkg-0006P1-4x for qemu-devel@nongnu.org; Sat, 12 Aug 2017 07:38:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgUkf-000270-0I for qemu-devel@nongnu.org; Sat, 12 Aug 2017 07:38:46 -0400 Date: Sat, 12 Aug 2017 13:38:26 +0200 From: "Edgar E. Iglesias" Message-ID: <20170812113826.GX12347@toto> References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v1 1/3] target/arm: Update the memops for exclusive load List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org, alistair23@gmail.com, edgar.iglesias@gmail.com, qemu-arm@nongnu.org On Fri, Aug 11, 2017 at 03:17:36PM -0700, Alistair Francis wrote: > Acording to the ARM ARM exclusive loads require the same allignment as > exclusive stores. Let's update the memops used for the load to match > that of the store. This adds the alignment requirement to the memops. > > Signed-off-by: Alistair Francis > Reviewed-by: Richard Henderson Reviewed-by: Edgar E. Iglesias > --- > > target/arm/translate-a64.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c > index 58ed4c6d05..245175e2f1 100644 > --- a/target/arm/translate-a64.c > +++ b/target/arm/translate-a64.c > @@ -1854,7 +1854,7 @@ static void gen_load_exclusive(DisasContext *s, int rt, int rt2, > TCGv_i64 addr, int size, bool is_pair) > { > TCGv_i64 tmp = tcg_temp_new_i64(); > - TCGMemOp memop = s->be_data + size; > + TCGMemOp memop = size | MO_ALIGN | s->be_data; > > g_assert(size <= 3); > tcg_gen_qemu_ld_i64(tmp, addr, get_mem_index(s), memop); > -- > 2.11.0 >