From: Phil Carmody <carmody@cpd.ntc.nokia.com>
To: axp-list@redhat.com
Subject: Re: patch_v2: (on Alpha) emulating missing instructions
Date: Mon, 25 Oct 1999 10:47:42 +0100 (WET DST) [thread overview]
Message-ID: <Pine.GSO.4.10.9910251037330.17972-100000@scooby.uk.ntc.nokia.com> (raw)
In-Reply-To: <2906e107.u10t12e.d9cd7-axp@amazing.ch>
On Sun, 24 Oct 1999, EXT axp@amazing.ch (Christoph Dworzak) wrote:
> Hi
>
> On Oct 23 Richard Henderson (rth@twiddle.net) wrote:
> > On Mon, Oct 18, 1999 at 04:31:25PM +0100, Phil Carmody wrote:
> > > D = (A & M) | (B & ~M);
>
> I used the same sequence twice to exchange bits between two
> variables depending on a mask:
>
> t = (A & M) | (B & ~M);
> B = (B & M) | (A & ~M);
> A = t;
>
> > > can be turned into
> > > D = A ^ ((A ^ B) & M);
> >
> > I'll note that the former expression, given an andnot operation,
> > has 3 ops and a tree height of 2. The later expression has 3 ops
> > and a tree height of 3. I.e. the former expression takes better
> > advantage of instruction-level parallelism.
Accepted, yes. However, with registers coming out of your ears there
should be plenty of other things that can fill the gaps. (and OOOE
goes a long way to filling the gaps anyway).
I merely wanted people to have to tool in their toolkit, should it be
needed (as it was for Cristoph).
> In my App the later is faster (4 ops instead of 6):
>
> t = (A ^ B) & M;
> A ^= t;
> B ^= t;
>
> Can it get any better?
Yes, get a TI DSP processor (the MVP/MP will do) which can do 'insert bit
string' operations in a single processor cycle.
t=A
A=A with bits from B
B=B with bits from t
three ticks.
Phil
--
Phil Carmody
Not speaking for or on behalf of Nokia Telecommunications
Resistrance : Peaceful and passive resistance
next prev parent reply other threads:[~1999-10-25 12:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-12 3:55 rpcc Christoph Dworzak
1999-01-12 3:20 ` rpcc Peter Petrakis
1999-01-12 4:59 ` rpcc Richard Henderson
[not found] ` <rth@twiddle.net>
1999-01-12 16:59 ` rpcc Christoph Dworzak
1999-01-12 19:27 ` rpcc Richard Henderson
1999-01-12 21:06 ` rpcc Wes Bauske
1999-01-13 2:16 ` rpcc Richard Henderson
1999-01-14 16:17 ` Alpha 21264 Christoph Dworzak
1999-01-14 15:46 ` Greg Lindahl
1999-01-14 17:27 ` Richard Henderson
1999-10-24 15:04 ` patch_v2: (on Alpha) emulating missing instructions Christoph Dworzak
1999-10-25 9:47 ` Phil Carmody [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-01-13 14:10 Alpha 21264 Andy Almond
1999-01-13 16:36 ` Jeff Sturm
1999-01-14 6:50 ` Richard Henderson
1999-10-15 9:30 PATCH: (on Alpha) emulating missing instructions Luke Deller
1999-10-16 9:13 ` patch_v2: " Luke Deller
1999-10-18 13:05 Robert Harley
1999-10-18 14:46 Robert Harley
1999-10-18 15:31 ` Phil Carmody
1999-10-23 20:39 ` Richard Henderson
1999-10-21 16:23 ` patch_v3: emulating missing instructions on Alpha Luke Deller
1999-10-23 20:55 ` Richard Henderson
1999-10-24 0:28 ` Daniel Potts
1999-10-25 1:22 ` Luke Deller
1999-10-28 23:34 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox