|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH 2/7] target/openrisc: add shutdown logic |
Date: | Tue, 18 Apr 2017 00:52:52 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 04/16/2017 04:23 PM, Stafford Horne wrote:
In openrisc simulators we use hooks like 'l.nop 1' to cause the simulator to exit. Implement that for qemu too. Reported-by: Waldemar Brodkorb <address@hidden> Signed-off-by: Stafford Horne <address@hidden>
As I said the first time this was posted: This is horrible.If you want to do something like this, it needs to be buried under a special run mode like -semihosting.
case 0x01: /* l.nop */ LOG_DIS("l.nop %d\n", I16); + { + TCGv_i32 arg = tcg_const_i32(I16); + gen_helper_nop(arg); + }
You also really really must special-case l.nop 0 so that it doesn't generate a function call. Just think of all the extra calls you're adding for every delay slot that couldn't be filled.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |