From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlyJY-00077T-TV for qemu-devel@nongnu.org; Thu, 28 Nov 2013 04:55:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlyJT-0001ZC-Nh for qemu-devel@nongnu.org; Thu, 28 Nov 2013 04:55:16 -0500 Received: from host-82-135-62-35.customer.m-online.net ([82.135.62.35]:49515 helo=mail.embedded-brains.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlyJT-0001Z5-GK for qemu-devel@nongnu.org; Thu, 28 Nov 2013 04:55:11 -0500 Received: from [192.168.96.64] (eb0024.eb.z [192.168.96.64]) by mail.embedded-brains.de (Postfix) with ESMTP id 5B981652CFD for ; Thu, 28 Nov 2013 10:55:06 +0100 (CET) Message-ID: <529712FA.2070906@embedded-brains.de> Date: Thu, 28 Nov 2013 10:55:06 +0100 From: Sebastian Huber MIME-Version: 1.0 References: <1385474661-8717-1-git-send-email-sebastian.huber@embedded-brains.de> In-Reply-To: <1385474661-8717-1-git-send-email-sebastian.huber@embedded-brains.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] SPARC: Add and use CPU_FEATURE_CASA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello, On 2013-11-26 15:04, Sebastian Huber wrote: > The LEON3 processor has support for the CASA instruction which is > normally only available for SPARC V9 processors. Binutils 2.24 > and GCC 4.9 will support this instruction for LEON3. GCC uses it to > generate C11 atomic operations. > --- > target-sparc/cpu.c | 3 +- > target-sparc/cpu.h | 4 ++- > target-sparc/helper.h | 4 ++- > target-sparc/ldst_helper.c | 26 +++++++++++++----------- > target-sparc/translate.c | 47 ++++++++++++++++++++++++++++-------= -------- > 5 files changed, 52 insertions(+), 32 deletions(-) [...] this patch doesn't work since the ASI 0x80 used for the synthetic CAS=20 instruction is not implemented in helper_ld_asi() for !TARGET_SPARC64. I tried to add a case 0x80: /* Primary */ { switch (size) { case 1: ret =3D ldub_raw(addr); break; case 2: ret =3D lduw_raw(addr); break; case 4: ret =3D ldl_raw(addr); break; default: case 8: ret =3D ldq_raw(addr); break; } } break; but this results in a Qemu segmentation fault. --=20 Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine gesch=E4ftliche Mitteilung im Sinne des EHUG.