From: erik quanstrom <quanstro@labs.coraid.com>
To: 9fans@9fans.net
Subject: Re: [9fans] 5l bug
Date: Mon, 29 Apr 2013 14:57:42 -0400 [thread overview]
Message-ID: <55d863d12c769379ce2cbf372d2f5160@coraid.com> (raw)
In-Reply-To: <5ba07285c54fa7e0fde7a02e3a09bdbc@rei2.9hal>
On Mon Apr 29 14:55:02 EDT 2013, cinap_lenrek@gmx.de wrote:
> 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;
it's possible to do in the linker, but without trying this,
it looks reasonable to me. what does the resulting asm
look like?
- erik
next prev parent reply other threads:[~2013-04-29 18:57 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
2013-04-29 18:57 ` erik quanstrom [this message]
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=55d863d12c769379ce2cbf372d2f5160@coraid.com \
--to=quanstro@labs.coraid.com \
--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).