From: "Edgar E. Iglesias" <edgar.iglesias@axis.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] cris: Add break support for v10
Date: Thu, 14 Jun 2012 15:30:58 +0200 [thread overview]
Message-ID: <20120614133058.GJ1111@edde.se.axis.com> (raw)
I seem to have missed to push this upstream...
commit f756c7a723faa3a21dcb6bb6806e77f1628019f5
Author: Edgar E. Iglesias <edgar@axis.com>
Date: Tue Jul 5 12:56:41 2011 +0200
cris: Add break support for v10.
Still no retb
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
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;
reply other threads:[~2012-06-14 13:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120614133058.GJ1111@edde.se.axis.com \
--to=edgar.iglesias@axis.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.