From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5448] CRIS: Partial EXS reg support and fixes for SPC.
Date: Wed, 08 Oct 2008 14:22:18 +0000 [thread overview]
Message-ID: <E1KnZve-0001xz-GC@cvs.savannah.gnu.org> (raw)
Revision: 5448
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5448
Author: edgar_igl
Date: 2008-10-08 14:22:17 +0000 (Wed, 08 Oct 2008)
Log Message:
-----------
CRIS: Partial EXS reg support and fixes for SPC.
* Add partial support for the EXS (exception status) register.
* Update SPC after each singlestep exception.
* Remove special treatment of break 8.
Modified Paths:
--------------
trunk/target-cris/helper.c
trunk/target-cris/translate.c
Modified: trunk/target-cris/helper.c
===================================================================
--- trunk/target-cris/helper.c 2008-10-08 08:28:16 UTC (rev 5447)
+++ trunk/target-cris/helper.c 2008-10-08 14:22:17 UTC (rev 5448)
@@ -143,6 +143,9 @@
break;
}
+ /* Fill in the IDX field. */
+ env->pregs[PR_EXS] = (ex_vec & 0xff) << 8;
+
if (env->dslot) {
D(fprintf(logfile, "excp isr=%x PC=%x ds=%d SP=%x"
" ERP=%x pid=%x ccs=%x cc=%d %x\n",
Modified: trunk/target-cris/translate.c
===================================================================
--- trunk/target-cris/translate.c 2008-10-08 08:28:16 UTC (rev 5447)
+++ trunk/target-cris/translate.c 2008-10-08 14:22:17 UTC (rev 5448)
@@ -196,10 +196,6 @@
tcg_gen_mov_tl(tn, tcg_const_tl(0));
else if (r == PR_VR)
tcg_gen_mov_tl(tn, tcg_const_tl(32));
- else if (r == PR_EXS) {
- printf("read from EXS!\n");
- tcg_gen_mov_tl(tn, cpu_PR[r]);
- }
else if (r == PR_EDA) {
printf("read from EDA!\n");
tcg_gen_mov_tl(tn, cpu_PR[r]);
@@ -2811,12 +2807,7 @@
DIS(fprintf(logfile, "break %d\n", dc->op1));
cris_evaluate_flags (dc);
/* break. */
- if (dc->op1 == 8) {
- /* TODO: Find out whats special with brk8. */
- tcg_gen_movi_tl(env_pc, dc->pc);
- }
- else
- tcg_gen_movi_tl(env_pc, dc->pc + 2);
+ tcg_gen_movi_tl(env_pc, dc->pc + 2);
/* Breaks start at 16 in the exception vector. */
t_gen_mov_env_TN(trap_vector,
@@ -3005,6 +2996,7 @@
cris_evaluate_flags (dc);
t_gen_mov_env_TN(trap_vector, tcg_const_tl(3));
tcg_gen_movi_tl(env_pc, dc->pc + insn_len);
+ tcg_gen_movi_tl(cpu_PR[PR_SPC], dc->pc + insn_len);
t_gen_raise_exception(EXCP_BREAK);
gen_set_label(l1);
}
reply other threads:[~2008-10-08 14:22 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=E1KnZve-0001xz-GC@cvs.savannah.gnu.org \
--to=edgar.iglesias@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).