qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] openrisc: terminate qemu process upon receiving a halt signal.
@ 2015-04-02 16:13 Hesham ALMatary
  0 siblings, 0 replies; 3+ messages in thread
From: Hesham ALMatary @ 2015-04-02 16:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hesham ALMatary

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..b024f11 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH] openrisc: terminate qemu process upon receiving a halt signal.
@ 2015-04-02 16:50 Hesham ALMatary
  2015-04-03 20:41 ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Hesham ALMatary @ 2015-04-02 16:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hesham ALMatary

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-03 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-02 16:13 [Qemu-devel] [PATCH] openrisc: terminate qemu process upon receiving a halt signal Hesham ALMatary
  -- strict thread matches above, loose matches on Subject: below --
2015-04-02 16:50 Hesham ALMatary
2015-04-03 20:41 ` Richard Henderson

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).