From: Jens Freimann <jfrei@linux.vnet.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
Alexander Graf <agraf@suse.de>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>,
Jens Freimann <jfrei@linux.vnet.ibm.com>,
qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 1/5] s390x/gdb: don't touch the cc if tcg is not enabled
Date: Fri, 29 Aug 2014 15:52:14 +0200 [thread overview]
Message-ID: <1409320338-63098-2-git-send-email-jfrei@linux.vnet.ibm.com> (raw)
In-Reply-To: <1409320338-63098-1-git-send-email-jfrei@linux.vnet.ibm.com>
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
When reading/writing the psw mask, the condition code may only be touched if
running on tcg.
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
---
target-s390x/gdbstub.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/target-s390x/gdbstub.c b/target-s390x/gdbstub.c
index a129742..8d55006 100644
--- a/target-s390x/gdbstub.c
+++ b/target-s390x/gdbstub.c
@@ -31,9 +31,13 @@ int s390_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
switch (n) {
case S390_PSWM_REGNUM:
- cc_op = calc_cc(env, env->cc_op, env->cc_src, env->cc_dst, env->cc_vr);
- val = deposit64(env->psw.mask, 44, 2, cc_op);
- return gdb_get_regl(mem_buf, val);
+ if (tcg_enabled()) {
+ cc_op = calc_cc(env, env->cc_op, env->cc_src, env->cc_dst,
+ env->cc_vr);
+ val = deposit64(env->psw.mask, 44, 2, cc_op);
+ return gdb_get_regl(mem_buf, val);
+ }
+ return gdb_get_regl(mem_buf, env->psw.mask);
case S390_PSWA_REGNUM:
return gdb_get_regl(mem_buf, env->psw.addr);
case S390_R0_REGNUM ... S390_R15_REGNUM:
@@ -62,7 +66,9 @@ int s390_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n)
switch (n) {
case S390_PSWM_REGNUM:
env->psw.mask = tmpl;
- env->cc_op = extract64(tmpl, 44, 2);
+ if (tcg_enabled()) {
+ env->cc_op = extract64(tmpl, 44, 2);
+ }
break;
case S390_PSWA_REGNUM:
env->psw.addr = tmpl;
--
1.8.5.5
next prev parent reply other threads:[~2014-08-29 13:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 13:52 [Qemu-devel] [PATCH 0/5] s390x/gdb: various fixes Jens Freimann
2014-08-29 13:52 ` Jens Freimann [this message]
2014-09-01 22:39 ` [Qemu-devel] [PATCH 1/5] s390x/gdb: don't touch the cc if tcg is not enabled Alexander Graf
2014-09-02 7:07 ` Christian Borntraeger
2014-09-03 9:27 ` Alexander Graf
2014-09-05 7:29 ` Christian Borntraeger
2014-08-29 13:52 ` [Qemu-devel] [PATCH 2/5] s390x/gdb: add the feature xml files for s390x Jens Freimann
2014-08-29 13:52 ` [Qemu-devel] [PATCH 3/5] s390x/gdb: generate target.xml and handle fp/ac as coprocessors Jens Freimann
2014-08-29 13:52 ` [Qemu-devel] [PATCH 4/5] s390x/gdb: coding style fixes Jens Freimann
2014-08-29 13:52 ` [Qemu-devel] [PATCH 5/5] gdb: provide the name of the architecture in the target.xml Jens Freimann
2014-09-01 10:19 ` Peter Maydell
2014-09-01 10:25 ` Andreas Färber
2014-09-01 10:31 ` Christian Borntraeger
2014-09-01 10:32 ` Peter Maydell
2014-09-03 9:37 ` David Hildenbrand
2014-09-03 9:45 ` Edgar E. Iglesias
2014-09-03 9:59 ` David Hildenbrand
2014-09-03 10:00 ` Edgar E. Iglesias
2014-09-01 10:06 ` [Qemu-devel] [PATCH 0/5] s390x/gdb: various fixes Christian Borntraeger
2014-09-01 22:43 ` Alexander Graf
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=1409320338-63098-2-git-send-email-jfrei@linux.vnet.ibm.com \
--to=jfrei@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=dahi@linux.vnet.ibm.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).