From: "Philippe De Muyter" <phdm@macqel.be>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Dave Jones <davej@codemonkey.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: sundance DFE-580TX DL10050B patch
Date: Tue, 18 Mar 2003 15:27:26 +0100 (CET) [thread overview]
Message-ID: <200303181427.h2IERQ110701@mail.macqel.be> (raw)
In-Reply-To: <20030317174920.GC9667@gtf.org> from Jeff Garzik at "Mar 17, 2003 12:49:20 pm"
Jeff Garzik wrote :
> On Mon, Mar 17, 2003 at 06:40:36PM +0100, Philippe De Muyter wrote:
> > Dave Jones wrote :
> > > On Mon, Mar 17, 2003 at 02:56:09PM +0100, Philippe De Muyter wrote:
> > >
> > > > + writew((dev->dev_addr[i + 1] << 8) + dev->dev_addr[i],
> > >
> > > Don't you want to OR those together instead of add them ?
> > >
> > > Dave
> > >
> > You're right.
>
> No.
>
> Adding and or'ing are exactly equivalent for the above case, where you
> shift an 8-bit value left 8 bits, then add it to another 8-bit value.
That was implied in Dave's remark and in my answer.
>
> The final answer may be obtained from examining the compiler's assembly
> output, and see which combination ('or' or 'add') produces the best
> code.
We can't do that as that should be done for all the supported processors.
Furthermore, it is the compiler's job to produce the best machine code.
The only thing we can do to help the compiler is write simple code. From
a logical point of view, oring is what is needed here, and from a hardware
point of view oring is cheaper than adding.
> Jeff
Now, back to the real problem :) . Will you apply my patch ?
Philippe
Philippe De Muyter phdm@macqel.be Tel +32 27029044
Macq Electronique SA rue de l'Aeronef 2 B-1140 Bruxelles Fax +32 27029077
prev parent reply other threads:[~2003-03-18 14:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-17 13:56 Philippe De Muyter
2003-03-17 17:24 ` Dave Jones
2003-03-17 17:40 ` Philippe De Muyter
2003-03-17 17:49 ` Jeff Garzik
2003-03-18 14:27 ` Philippe De Muyter [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=200303181427.h2IERQ110701@mail.macqel.be \
--to=phdm@macqel.be \
--cc=davej@codemonkey.org.uk \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®