mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Philippe De Muyter <phdm@macqel.be>
Cc: Dave Jones <davej@codemonkey.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: sundance DFE-580TX DL10050B patch
Date: Mon, 17 Mar 2003 12:49:20 -0500	[thread overview]
Message-ID: <20030317174920.GC9667@gtf.org> (raw)
In-Reply-To: <200303171740.h2HHebY01003@mail.macqel.be>

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.

The final answer may be obtained from examining the compiler's assembly
output, and see which combination ('or' or 'add') produces the best
code.

	Jeff




  reply	other threads:[~2003-03-17 17:38 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 [this message]
2003-03-18 14:27       ` Philippe De Muyter

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=20030317174920.GC9667@gtf.org \
    --to=jgarzik@pobox.com \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phdm@macqel.be \
    /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®