Re: [PATCH] Multiple & vs. && and | vs. || bugs in 2.4.20

Roman Zippel (
Sun, 2 Mar 2003 19:25:43 +0100 (CET)


On Sun, 2 Mar 2003, Ulrich Drepper wrote:

> > - if (!urb->status & !acm->throttle) {
> > + if (!urb->status && !acm->throttle) {
> [...]
> Observe the extra 'jne' and the fact that the value of 'throttle'
> element cannot be loaded until after the conditional jump. Not even
> out of order execution can arrange that.

But speculative execution can arrange that (providing the cpu predicted
the jump target correctly).

> To summarize, I'd probably not be amused if you would change any of my
> code which takes advantage of such programming finess.

If that was really intentional, I would assume to see something like this:

if (!(urb->status | acm->throttle)) {

bye, Roman

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at