From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdiJq-0000n3-9w for qemu-devel@nongnu.org; Thu, 02 Apr 2015 12:50:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdiJn-000113-K4 for qemu-devel@nongnu.org; Thu, 02 Apr 2015 12:50:14 -0400 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]:36172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdiJn-00010U-Az for qemu-devel@nongnu.org; Thu, 02 Apr 2015 12:50:11 -0400 Received: by wgra20 with SMTP id a20so91124648wgr.3 for ; Thu, 02 Apr 2015 09:50:10 -0700 (PDT) From: Hesham ALMatary Date: Thu, 2 Apr 2015 17:50:06 +0100 Message-Id: <1427993406-21323-1-git-send-email-heshamelmatary@gmail.com> Subject: [Qemu-devel] [PATCH] openrisc: terminate qemu process upon receiving a halt signal. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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