From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrJ6H-0007pS-4M for qemu-devel@nongnu.org; Tue, 07 Apr 2009 17:44:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrJ6F-0007oP-Ow for qemu-devel@nongnu.org; Tue, 07 Apr 2009 17:44:56 -0400 Received: from [199.232.76.173] (port=58100 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrJ6E-0007oD-Qu for qemu-devel@nongnu.org; Tue, 07 Apr 2009 17:44:54 -0400 Received: from hall.aurel32.net ([88.191.82.174]:43329) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LrJ6E-00031Y-99 for qemu-devel@nongnu.org; Tue, 07 Apr 2009 17:44:54 -0400 Date: Tue, 7 Apr 2009 23:44:50 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 06/19] Bug fix alpha: stop translation if too long Message-ID: <20090407214450.GD23682@volta.aurel32.net> References: <1238423794-25455-1-git-send-email-gingold@adacore.com> <1238423794-25455-2-git-send-email-gingold@adacore.com> <1238423794-25455-3-git-send-email-gingold@adacore.com> <1238423794-25455-4-git-send-email-gingold@adacore.com> <1238423794-25455-5-git-send-email-gingold@adacore.com> <1238423794-25455-6-git-send-email-gingold@adacore.com> <1238423794-25455-7-git-send-email-gingold@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1238423794-25455-7-git-send-email-gingold@adacore.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tristan Gingold Cc: qemu-devel@nongnu.org On Mon, Mar 30, 2009 at 04:36:21PM +0200, Tristan Gingold wrote: > Signed-off-by: Tristan Gingold > --- > target-alpha/translate.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) I have applied a slightly different patch to split the tests into different if for better readability. Thanks. > diff --git a/target-alpha/translate.c b/target-alpha/translate.c > index e9463ae..dad1686 100644 > --- a/target-alpha/translate.c > +++ b/target-alpha/translate.c > @@ -2401,10 +2401,10 @@ static always_inline void gen_intermediate_code_internal (CPUState *env, > ret = translate_one(ctxp, insn); > if (ret != 0) > break; > - /* if we reach a page boundary or are single stepping, stop > - * generation > - */ > + /* if we reach a page boundary, or translation is too long > + or are single stepping, stop generation. */ > if (((ctx.pc & (TARGET_PAGE_SIZE - 1)) == 0) || > + gen_opc_ptr >= gen_opc_end || > num_insns >= max_insns) { > break; > } > -- > 1.6.2 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net