From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfA8f-0001P5-73 for qemu-devel@nongnu.org; Thu, 14 Jun 2012 09:31:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfA8c-0003w3-G1 for qemu-devel@nongnu.org; Thu, 14 Jun 2012 09:31:04 -0400 Received: from ra.se.axis.com ([195.60.68.13]:43809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfA8c-0003vP-9b for qemu-devel@nongnu.org; Thu, 14 Jun 2012 09:31:02 -0400 Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id B78AC1672C5 for ; Thu, 14 Jun 2012 15:30:59 +0200 (CEST) Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bVNpHR-F2A3I for ; Thu, 14 Jun 2012 15:30:58 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by ra.se.axis.com (Postfix) with ESMTP id EB97911E65 for ; Thu, 14 Jun 2012 15:30:58 +0200 (CEST) Received: from localhost (edgar.se.axis.com [10.93.151.1]) by thoth.se.axis.com (Postfix) with ESMTP id DB12234197 for ; Thu, 14 Jun 2012 15:30:58 +0200 (CEST) Date: Thu, 14 Jun 2012 15:30:58 +0200 From: "Edgar E. Iglesias" Message-ID: <20120614133058.GJ1111@edde.se.axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] cris: Add break support for v10 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I seem to have missed to push this upstream... commit f756c7a723faa3a21dcb6bb6806e77f1628019f5 Author: Edgar E. Iglesias Date: Tue Jul 5 12:56:41 2011 +0200 cris: Add break support for v10. Still no retb Signed-off-by: Edgar E. Iglesias diff --git a/target-cris/cpu.h b/target-cris/cpu.h index a760367..73004af 100644 --- a/target-cris/cpu.h +++ b/target-cris/cpu.h @@ -64,6 +64,7 @@ #define PR_NRP 12 #define PR_CCS 13 #define PR_USP 14 +#define PRV10_BRP 14 #define PR_SPC 15 /* CPU flags. */ diff --git a/target-cris/helper.c b/target-cris/helper.c index 8680f43..dcc19ef 100644 --- a/target-cris/helper.c +++ b/target-cris/helper.c @@ -121,14 +121,14 @@ static void do_interruptv10(CPUCRISState *env) /* These exceptions are genereated by the core itself. ERP should point to the insn following the brk. */ ex_vec = env->trap_vector; - env->pregs[PR_ERP] = env->pc; + env->pregs[PRV10_BRP] = env->pc; break; case EXCP_NMI: /* NMI is hardwired to vector zero. */ ex_vec = 0; env->pregs[PR_CCS] &= ~M_FLAG; - env->pregs[PR_NRP] = env->pc; + env->pregs[PRV10_BRP] = env->pc; break; case EXCP_BUSFAULT: diff --git a/target-cris/translate_v10.c b/target-cris/translate_v10.c index 4ada3ed..3629629 100644 --- a/target-cris/translate_v10.c +++ b/target-cris/translate_v10.c @@ -1132,6 +1132,7 @@ static unsigned int dec10_ind(DisasContext *dc) LOG_DIS("break %d\n", dc->src); cris_evaluate_flags(dc); tcg_gen_movi_tl(env_pc, dc->pc + 2); + t_gen_mov_env_TN(trap_vector, tcg_const_tl(dc->src + 2)); t_gen_raise_exception(EXCP_BREAK); dc->is_jmp = DISAS_UPDATE; return insn_len;