9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] mulgen botch
Date: Thu, 20 Mar 2014 17:54:17 -0400	[thread overview]
Message-ID: <9bd58033aac88896b877d16c0ffe37e3@ladd.quanstro.net> (raw)
In-Reply-To: <0cdb67fa9517d1a49a4161cd5ecba187@ladd.quanstro.net>

On Thu Mar 20 17:51:30 EDT 2014, quanstro@quanstro.net wrote:
> On Thu Mar 20 16:20:29 EDT 2014, cinap_lenrek@felloff.net wrote:
> > sorry... the code from the last mail contains an error...
> > theres a missing regfree() in the OASMUL and OASLMUL case when
> > hardleft is set. in any case, i'm unsure if it wouldnt be
> > better to handle this in mulgen() instead. as this case is
> > so rare, it is probably not worth trying to avoid useless
> > register moves here.
>
> i suppose you can make the test for a constant expression fail, by simply
> changing both instances of this
> 		if(r->op == OCONST && typechl[n->type->etype]) {
> to this
> 		if(r->op == OCONST && r->vconst != 0 && typechl[n->type->etype]) {
>
> i haven't thought too hard about this, or compiled it, so maybe too easy?

on second thought, better maching would be better.  only multplication by
0 is safe.

- erik



  reply	other threads:[~2014-03-20 21:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 19:45 cinap_lenrek
2014-03-20 20:19 ` cinap_lenrek
2014-03-20 21:50   ` erik quanstrom
2014-03-20 21:54     ` erik quanstrom [this message]
2014-03-20 23:10       ` cinap_lenrek

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=9bd58033aac88896b877d16c0ffe37e3@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --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).