|
From: | Fabien Chouteau |
Subject: | Re: [Qemu-devel] [PATCH 5/6] [RFC] Emulation of Leon3. |
Date: | Mon, 20 Dec 2010 10:25:15 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
On 12/17/2010 08:14 PM, Blue Swirl wrote:
On Wed, Dec 15, 2010 at 5:47 PM, Fabien Chouteau<address@hidden> wrote:On 12/13/2010 07:18 PM, Blue Swirl wrote:On Mon, Dec 13, 2010 at 3:51 PM, Fabien Chouteau<address@hidden> wrote:On 12/11/2010 10:56 AM, Blue Swirl wrote:On Tue, Dec 7, 2010 at 11:40 AM, Fabien Chouteau<address@hidden> wrote:On 12/06/2010 06:53 PM, Blue Swirl wrote:On Mon, Dec 6, 2010 at 9:26 AM, Fabien Chouteau<address@hidden> wrote:+#if !defined(CONFIG_USER_ONLY) + /* Leon3 shutdown */ + if (intno == 0x80&& env->version == 0xf3000000) { + leon3_shutdown(); + }This looks like a hack. Should a trap instruction initiate a shutdown?Yes, on Leon3 "ta 0x0" initiates a shutdown.Then this should be handled during translation. A Leon3 specific CPU feature should be added and used much like CHECK_IU_FEATURE (in translate.c). Then execution speed would not be affected for non-Leon3 CPUs.OK, but I don't see how to request a shutdown during translation.Just create a helper which calls shutdown, translator should insert a call to that.I think I understand what you mean, but I don't see why this would be faster than my solution.Shutdown is not performance critical, but interrupt handling is.
I understand that, but why is it faster to do it during translation?I don't see how one "if" statement in "do_interrupt" will even slightly impact the performances, and why it will be slower than the same "if' statement in the translation.
BTW, I didn't use the "unlikely" function, but this will even more reduce the impact...
-- Fabien Chouteau
[Prev in Thread] | Current Thread | [Next in Thread] |