From: Paul Brook <paul@nowt.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] qemu/target-sparc translate.c
Date: Sun, 18 Jun 2006 19:36:58 +0000 [thread overview]
Message-ID: <E1Fs34s-0006Vv-DL@savannah.gnu.org> (raw)
CVSROOT: /sources/qemu
Module name: qemu
Changes by: Paul Brook <pbrook> 06/06/18 19:36:58
Modified files:
target-sparc : translate.c
Log message:
Sparc64 insn fixes (Blue Swirl).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-sparc/translate.c?cvsroot=qemu&r1=1.26&r2=1.27
Patches:
Index: translate.c
===================================================================
RCS file: /sources/qemu/qemu/target-sparc/translate.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- translate.c 14 Jun 2006 12:37:58 -0000 1.26
+++ translate.c 18 Jun 2006 19:36:58 -0000 1.27
@@ -1123,7 +1123,11 @@
gen_movl_T0_reg(rd);
break;
case 0x5: /* V9 rdpc */
+ if (dc->pc == (uint32_t)dc->pc) {
gen_op_movl_T0_im(dc->pc);
+ } else {
+ gen_op_movq_T0_im64(dc->pc >> 32, dc->pc);
+ }
gen_movl_T0_reg(rd);
break;
case 0x6: /* V9 rdfprs */
@@ -1765,6 +1769,11 @@
else
gen_op_addx_T1_T0();
break;
+#ifdef TARGET_SPARC64
+ case 0x9: /* V9 mulx */
+ gen_op_mulx_T1_T0();
+ break;
+#endif
case 0xa:
gen_op_umul_T1_T0();
if (xop & 0x10)
@@ -1781,6 +1790,11 @@
else
gen_op_subx_T1_T0();
break;
+#ifdef TARGET_SPARC64
+ case 0xd: /* V9 udivx */
+ gen_op_udivx_T1_T0();
+ break;
+#endif
case 0xe:
gen_op_udiv_T1_T0();
if (xop & 0x10)
@@ -1797,16 +1811,6 @@
gen_movl_T0_reg(rd);
} else {
switch (xop) {
-#ifdef TARGET_SPARC64
- case 0x9: /* V9 mulx */
- gen_op_mulx_T1_T0();
- gen_movl_T0_reg(rd);
- break;
- case 0xd: /* V9 udivx */
- gen_op_udivx_T1_T0();
- gen_movl_T0_reg(rd);
- break;
-#endif
case 0x20: /* taddcc */
case 0x21: /* tsubcc */
case 0x22: /* taddcctv */
@@ -1942,6 +1946,11 @@
break;
case 6: // pstate
gen_op_wrpstate();
+ save_state(dc);
+ gen_op_next_insn();
+ gen_op_movl_T0_0();
+ gen_op_exit_tb();
+ dc->is_br = 1;
break;
case 7: // tl
gen_op_movl_env_T0(offsetof(CPUSPARCState, tl));
@@ -2121,7 +2130,15 @@
case 0x38: /* jmpl */
{
if (rd != 0) {
+#ifdef TARGET_SPARC64
+ if (dc->pc == (uint32_t)dc->pc) {
+ gen_op_movl_T1_im(dc->pc);
+ } else {
+ gen_op_movq_T1_im64(dc->pc >> 32, dc->pc);
+ }
+#else
gen_op_movl_T1_im(dc->pc);
+#endif
gen_movl_T1_reg(rd);
}
gen_mov_pc_npc(dc);
@@ -2721,11 +2738,19 @@
if ((i & 3) == 3)
cpu_fprintf(f, "\n");
}
+#ifdef TARGET_SPARC64
+ cpu_fprintf(f, "pstate: 0x%08x ccr: 0x%02x asi: 0x%02x tl: %d\n",
+ env->pstate, GET_CCR(env), env->asi, env->tl);
+ cpu_fprintf(f, "cansave: %d canrestore: %d otherwin: %d wstate %d cleanwin %d cwp %d\n",
+ env->cansave, env->canrestore, env->otherwin, env->wstate,
+ env->cleanwin, NWINDOWS - 1 - env->cwp);
+#else
cpu_fprintf(f, "psr: 0x%08x -> %c%c%c%c %c%c%c wim: 0x%08x\n", GET_PSR(env),
GET_FLAG(PSR_ZERO, 'Z'), GET_FLAG(PSR_OVF, 'V'),
GET_FLAG(PSR_NEG, 'N'), GET_FLAG(PSR_CARRY, 'C'),
env->psrs?'S':'-', env->psrps?'P':'-',
env->psret?'E':'-', env->wim);
+#endif
cpu_fprintf(f, "fsr: 0x%08x\n", GET_FSR32(env));
}
next reply other threads:[~2006-06-18 19:37 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-18 19:36 Paul Brook [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-03-30 16:49 [Qemu-devel] qemu/target-sparc translate.c Blue Swirl
2008-03-29 20:39 Blue Swirl
2008-03-29 20:38 Blue Swirl
2008-03-29 9:09 Blue Swirl
2008-03-29 9:03 Blue Swirl
2008-03-29 8:59 Blue Swirl
2008-03-26 20:47 Blue Swirl
2008-03-26 20:45 Blue Swirl
2008-03-26 20:45 Blue Swirl
2008-03-24 17:47 Blue Swirl
2008-03-23 11:50 Blue Swirl
2008-03-22 8:40 Blue Swirl
2008-03-18 18:09 Blue Swirl
2008-03-16 19:23 Blue Swirl
2008-03-16 19:18 Blue Swirl
2008-03-15 18:12 Blue Swirl
2008-03-14 21:09 Blue Swirl
2008-03-14 17:35 Blue Swirl
2008-03-13 20:47 Blue Swirl
2008-03-11 20:59 Blue Swirl
2008-03-06 16:13 Blue Swirl
2008-03-04 19:56 Blue Swirl
2007-11-25 20:27 Blue Swirl
2007-11-10 9:32 Blue Swirl
2007-11-09 19:08 Blue Swirl
2007-10-17 17:34 Blue Swirl
2007-10-03 17:46 Blue Swirl
2007-09-30 16:37 Blue Swirl
2007-07-08 19:48 Blue Swirl
2007-07-04 20:22 Blue Swirl
2007-06-25 19:52 Blue Swirl
2007-06-10 20:26 Blue Swirl
2007-05-07 17:01 Blue Swirl
2007-04-29 19:54 Blue Swirl
2007-04-29 19:49 Blue Swirl
2007-04-22 12:45 Blue Swirl
2007-04-06 20:04 Blue Swirl
2007-04-05 18:10 Blue Swirl
2007-04-01 16:24 Blue Swirl
2007-04-01 16:51 ` Aurelien Jarno
2007-04-03 0:08 ` Aurelien Jarno
2007-04-01 15:18 Blue Swirl
2007-03-25 9:25 Blue Swirl
2006-06-25 15:33 Fabrice Bellard
2006-06-23 21:01 Fabrice Bellard
2006-06-21 18:26 Fabrice Bellard
2006-06-14 12:37 Fabrice Bellard
2005-11-21 23:33 Fabrice Bellard
2005-11-20 10:32 Fabrice Bellard
2005-04-10 14:40 Fabrice Bellard
2005-01-28 0:01 Fabrice Bellard
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=E1Fs34s-0006Vv-DL@savannah.gnu.org \
--to=paul@nowt.org \
--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).