lkml.org 
[lkml]   [2003]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sundance DFE-580TX DL10050B patch
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



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.046 / U:3.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site