From patchwork Wed Jul 22 17:02:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamil Dudka X-Patchwork-Id: 36865 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6MH4ib4031672 for ; Wed, 22 Jul 2009 17:04:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752969AbZGVREJ (ORCPT ); Wed, 22 Jul 2009 13:04:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753864AbZGVREJ (ORCPT ); Wed, 22 Jul 2009 13:04:09 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59084 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752969AbZGVREI (ORCPT ); Wed, 22 Jul 2009 13:04:08 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6MH34U7025563; Wed, 22 Jul 2009 13:03:05 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6MH34ZP025969; Wed, 22 Jul 2009 13:03:04 -0400 Received: from vpn-10-71.str.redhat.com (vpn-10-71.str.redhat.com [10.32.10.71]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6MH32hh014503; Wed, 22 Jul 2009 13:03:03 -0400 From: Kamil Dudka To: Jeff Garzik Subject: Re: [PATCH] compile-i386: do not generate an infinite loop Date: Wed, 22 Jul 2009 19:02:48 +0200 User-Agent: KMail/1.9.7 Cc: Christopher Li , Sparse Mailing-list References: <200907182334.10900.kdudka@redhat.com> <70318cbf0907220939s48bcfd3fi20ae9fda1edd290@mail.gmail.com> <4A674382.9090807@garzik.org> In-Reply-To: <4A674382.9090807@garzik.org> MIME-Version: 1.0 X-Length: 3302 X-UID: 34361 Message-Id: <200907221902.49184.kdudka@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org On Wednesday 22 of July 2009 18:51:14 Jeff Garzik wrote: > Christopher Li wrote: > > Oh one last thing. I need a signed-off line from you. > > I think sparse needs some text document, describing what Signed-off-by > means. I did this in one of my own projects by copying the relevant > "DCO" from kernel tree's Documentation/SubmittingPatches. Thanks! I was just looking for some info about "Signed-off-by"... The signed-off patch is attached. Kamil From 984e2612d2174390a54a36a805051c3f66cf6250 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Sat, 18 Jul 2009 23:16:53 +0200 Subject: [PATCH] compile-i386: do not generate infinite loop Signed-off-by: Kamil Dudka --- compile-i386.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compile-i386.c b/compile-i386.c index 37ea52e..abe9313 100644 --- a/compile-i386.c +++ b/compile-i386.c @@ -1913,6 +1913,10 @@ static void emit_loop(struct statement *stmt) x86_symbol_decl(stmt->iterator_syms); x86_statement(pre_statement); + if (!post_condition || post_condition->type != EXPR_VALUE || post_condition->value) { + loop_top = new_label(); + emit_label(loop_top, "loop top"); + } if (pre_condition) { if (pre_condition->type == EXPR_VALUE) { if (!pre_condition->value) { @@ -1936,10 +1940,6 @@ static void emit_loop(struct statement *stmt) insn("jz", lbv, NULL, NULL); } } - if (!post_condition || post_condition->type != EXPR_VALUE || post_condition->value) { - loop_top = new_label(); - emit_label(loop_top, "loop top"); - } x86_statement(statement); if (stmt->iterator_continue->used) emit_label(loop_continue, "'continue' iterator"); -- 1.6.3.3