[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-m68k
Subject:    Re: [RFC PATCH 1/2] arch/m68k/lib/mulsi3.S: Optimize]
From:       "George Spelvin" <linux () horizon ! com>
Date:       2016-05-13 9:02:10
Message-ID: 20160513090210.15223.qmail () ns ! horizon ! com
[Download RAW message or body]

>> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic