From: "George Spelvin" <linux@horizon.com>
To: geert@linux-m68k.org, gerg@linux-m68k.org,
linux-m68k@lists.linux-m68k.org, linux@horizon.com
Subject: Re: [RFC PATCH 1/2] arch/m68k/lib/mulsi3.S: Optimize]
Date: 13 May 2016 05:02:10 -0400 [thread overview]
Message-ID: <20160513090210.15223.qmail@ns.horizon.com> (raw)
In-Reply-To: <57357809.1000308@linux-m68k.org>
>> I'll write it for you if you like.
> I was hoping you would write the code :-)
And then you beat it to me anyway.
> So is something like this what you had in mind?
I would probably have done it slightly differently,
but basically yes.
> That runs with no fails in qemu and on real ColdFire hardware.
Yay! Thank you very much.
> I guess it wouldn't hurt to specifically check the corner cases
> either (at MAX_INT, MIN_INT and 0 for example).
Not really necessary, as those aren't special-cased in the code
in any way. An error would be multiplying the wrong parts of
the inputs or summing the partial products wrong.
Which, like most math and crypto code, would result in immediate
massive errors. Just a handful of test cases is enough.
(Typical code coverage tests want to hit every execution path,
meaning both sides of every conditional branch. Since this is
straight-line code, it's very easy to test.)
FWIW, I've severly rethought that second patch, but don't have time
to write it up in the detail it needs just now.
prev parent reply other threads:[~2016-05-13 9:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 10:24 [RFC PATCH 1/2] arch/m68k/lib/mulsi3.S: Optimize] George Spelvin
2016-05-11 12:38 ` Greg Ungerer
2016-05-12 8:04 ` George Spelvin
2016-05-12 8:35 ` Andreas Schwab
2016-05-12 13:14 ` Greg Ungerer
2016-05-12 12:46 ` Greg Ungerer
2016-05-12 20:52 ` George Spelvin
2016-05-13 1:07 ` Greg Ungerer
2016-05-13 2:36 ` George Spelvin
2016-05-13 6:45 ` Greg Ungerer
2016-05-13 9:02 ` George Spelvin [this message]
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=20160513090210.15223.qmail@ns.horizon.com \
--to=linux@horizon.com \
--cc=geert@linux-m68k.org \
--cc=gerg@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox