From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53225 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Po1kL-0007kk-3K for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:45:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Po1kK-0007Aw-1J for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:45:48 -0500 Received: from mail.serverraum.org ([78.47.150.89]:46982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Po1kJ-0007As-Rk for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:45:47 -0500 From: Michael Walle Subject: Re: [Qemu-devel] [PATCH 14/17] lm32: todo and documentation Date: Fri, 11 Feb 2011 23:45:45 +0100 References: <1297379530-23487-1-git-send-email-michael@walle.cc> <1297379530-23487-15-git-send-email-michael@walle.cc> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201102112345.45323.michael@walle.cc> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: "Edgar E. Iglesias" , Richard Henderson , qemu-devel@nongnu.org, Alexander Graf Am Freitag 11 Februar 2011, 21:41:14 schrieb Blue Swirl: > > +Special instructions > > +-------------------- > > +The translation recognizes one special instruction to halt the cpu: > > + and r0, r0, r0 > > +On real hardware this instruction is a nop. It is not used by GCC and > > +should (hopefully) not be used within hand-crafted assembly. > > +Insert this instruction in your idle loop to reduce the cpu load on the > > +host. > > It would be better to use MMIO or privileged instruction for this > instead of changing an unprivileged instruction. MMIO can't be used as that would have an impact on real hardware? The idea is to use this instruction for both the real hardware and QEMU. -- Michael