From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAzFV-0003yc-J0 for qemu-devel@nongnu.org; Wed, 05 Feb 2014 04:58:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WAzFL-0005AX-Mx for qemu-devel@nongnu.org; Wed, 05 Feb 2014 04:58:29 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:59390 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WAzFL-0005AS-HW for qemu-devel@nongnu.org; Wed, 05 Feb 2014 04:58:19 -0500 Message-ID: <52F20B39.9010104@adacore.com> Date: Wed, 05 Feb 2014 10:58:17 +0100 From: Fabien Chouteau MIME-Version: 1.0 References: <1385474661-8717-1-git-send-email-sebastian.huber@embedded-brains.de> <529712FA.2070906@embedded-brains.de> In-Reply-To: <529712FA.2070906@embedded-brains.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Sebastian Huber , qemu-devel@nongnu.org, Blue Swirl On 11/28/2013 10:55 AM, Sebastian Huber wrote: > 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 instruction is not implemented in helper_ld_asi() for !TARGET_SPARC64. > > I tried to add a > > case 0x80: /* Primary */ > { > switch (size) { > case 1: > ret = ldub_raw(addr); > break; > case 2: > ret = lduw_raw(addr); > break; > case 4: > ret = ldl_raw(addr); > break; > default: > case 8: > ret = ldq_raw(addr); > break; > } > } > break; > > but this results in a Qemu segmentation fault. > Hello Sebastian, I missed this email. It's easier for me to see you message if I'm in copy, also add Blue Swirl in copy for all SPARC patches. ASI 0x80 doesn't make sense in SPARC32 where does this value come from? I guess it's TCGv_i32 r_asi = tcg_const_i32(GET_FIELD(insn, 19, 26));, right?