9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cinap_lenrek@gmx.de
To: 9fans@9fans.net
Subject: Re: [9fans] 5l bug
Date: Mon, 29 Apr 2013 20:53:34 +0200	[thread overview]
Message-ID: <5ba07285c54fa7e0fde7a02e3a09bdbc@rei2.9hal> (raw)
In-Reply-To: <1367214858.517e0b0a4dbc3@www.imp.polymtl.ca>

following up, theres my naive fix for this. instead of
emiting conditional division instruction by 5c... dont and
keep the branch. does this make any sense?

term% hg diff -r 1777 peep.c
diff -r 5eeb36d3ddd0 sys/src/cmd/5c/peep.c
--- a/sys/src/cmd/5c/peep.c	Mon Jul 30 19:11:16 2012 +0200
+++ b/sys/src/cmd/5c/peep.c	Mon Apr 29 20:51:12 2013 +0200
@@ -1354,6 +1354,15 @@
 			j->end = r->s2;
 			return Branch;
 		}
+		switch(r->prog->as){
+		case ADIV:
+		case ADIVU:
+		case AMOD:
+		case AMODU:
+			/* emulated by 5l, doesnt handle conditionals */
+			j->end = r->s1;
+			return Toolong;
+		}
 		if (modifiescpsr(r->prog)) {
 			j->end = r->s1;
 			return Setcond;

--
cinap



  reply	other threads:[~2013-04-29 18:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-29  5:54 Paul Patience
2013-04-29 18:53 ` cinap_lenrek [this message]
2013-04-29 18:57   ` erik quanstrom
2013-04-29 19:06     ` cinap_lenrek
2013-04-29 19:08       ` erik quanstrom
2013-04-29 19:34   ` Richard Miller
2013-04-30 10:15     ` kernel panic
2013-04-30  9:07 ` zephyr.pellerin
2013-04-30 10:58   ` kernel panic

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=5ba07285c54fa7e0fde7a02e3a09bdbc@rei2.9hal \
    --to=cinap_lenrek@gmx.de \
    --cc=9fans@9fans.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).