qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hesham ALMatary <heshamelmatary@gmail.com>
To: qemu-devel@nongnu.org
Cc: Hesham ALMatary <heshamelmatary@gmail.com>
Subject: [Qemu-devel] [PATCH] openrisc: terminate qemu process upon receiving a halt signal.
Date: Thu,  2 Apr 2015 17:50:06 +0100	[thread overview]
Message-ID: <1427993406-21323-1-git-send-email-heshamelmatary@gmail.com> (raw)

or1ksim simulator currently handles "l.nop 0xC" instruction as
a halt signal. Do the same for QEMU.

Signed-off-by: Hesham ALMatary  <heshamelmatary@gmail.com>
---
 target-openrisc/translate.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c
index dc76789..5fa8ede 100644
--- a/target-openrisc/translate.c
+++ b/target-openrisc/translate.c
@@ -750,6 +750,11 @@ static void dec_misc(DisasContext *dc, uint32_t insn)
         switch (op1) {
         case 0x01:    /* l.nop */
             LOG_DIS("l.nop %d\n", I16);
+
+            if(I16 == 0xC) {
+                exit(0);
+            }
+
             break;
 
         default:
-- 
2.1.0

             reply	other threads:[~2015-04-02 16:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 16:50 Hesham ALMatary [this message]
2015-04-03 20:41 ` [Qemu-devel] [PATCH] openrisc: terminate qemu process upon receiving a halt signal Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2015-04-02 16:13 Hesham ALMatary

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=1427993406-21323-1-git-send-email-heshamelmatary@gmail.com \
    --to=heshamelmatary@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).