lkml.org 
[lkml]   [2003]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: transmeta cpu code question
Date
EDIT: Oops, meant to reply-all. Apologies Ben.

On Thu, 20 Nov 2003 12:53 pm, Ben Collins wrote:
> You are a bit confused. The cpu_rev is a 4 byte value, each byte is a
> decimal of the revision.
>
> And (0 & 1) makes 1, not 0. That's an AND, not an OR.

I'm willing to put some safe money on (0 & 1) equalling 0.

It has to, for your explanation below to work. :)

>
> Think about it this way. If cpu_rev == 0x01040801, then this would
> produce:
>
> (0x01040801 >> 24 & 0xff) -> (0x01 & 0xff) -> 0x01
>
> (0x01040801 >> 16 & 0xff) -> (0x0104 & 0xff) -> 0x04
>
> (0x01040801 >> 8 & 0xff) -> (0x010408 & 0xff) -> 0x08
>
> (0x01040801 & 0xff) -> 0x01

--
Ben

-
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:58    [W:0.224 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site