All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamil Dudka <kdudka@redhat.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Christopher Li <sparse@chrisli.org>,
	Sparse Mailing-list <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH] compile-i386: do not generate an infinite loop
Date: Wed, 22 Jul 2009 19:02:48 +0200	[thread overview]
Message-ID: <200907221902.49184.kdudka@redhat.com> (raw)
In-Reply-To: <4A674382.9090807@garzik.org>

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

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

[-- Attachment #2: 0001-compile-i386-do-not-generate-infinite-loop.patch --]
[-- Type: text/x-diff, Size: 1296 bytes --]

From 984e2612d2174390a54a36a805051c3f66cf6250 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Sat, 18 Jul 2009 23:16:53 +0200
Subject: [PATCH] compile-i386: do not generate infinite loop

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
 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


  reply	other threads:[~2009-07-22 17:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-18 21:34 [PATCH] compile-i386: do not generate an infinite loop Kamil Dudka
2009-07-22  8:38 ` Christopher Li
2009-07-22  9:24   ` Kamil Dudka
2009-07-22 16:34     ` Christopher Li
2009-07-22 17:21       ` Kamil Dudka
2009-07-22 19:30         ` Christopher Li
2009-07-22 12:45   ` Jeff Garzik
2009-07-22 16:39 ` Christopher Li
2009-07-22 16:51   ` Jeff Garzik
2009-07-22 17:02     ` Kamil Dudka [this message]
2009-07-22 19:18     ` Christopher Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200907221902.49184.kdudka@redhat.com \
    --to=kdudka@redhat.com \
    --cc=jeff@garzik.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.