lkml.org 
[lkml]   [2007]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] Enable link power management for ata drivers
On Tue, 25 Sep 2007, roel wrote:

> > + if (!(ap->flags & ATA_FLAG_IPM) || !ata_dev_enabled(dev)) {
>
> if (!((ap->flags & ATA_FLAG_IPM) && ata_dev_enabled(dev))) {

int foo(int i, int j) {

return !(i & 8) || !j;
}

int moo(int i, int j) {

return !((i & 8) && j);
}


gcc -O2 -S:


.globl foo
.type foo, @function
foo:
shrl $3, %edi
xorl $1, %edi
testl %esi, %esi
sete %al
orl %eax, %edi
andl $1, %edi
movl %edi, %eax
ret
.globl moo
.type moo, @function
moo:
shrl $3, %edi
xorl $1, %edi
testl %esi, %esi
sete %al
orl %eax, %edi
andl $1, %edi
movl %edi, %eax
ret



- Davide


-
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: 2007-09-25 01:31    [W:0.079 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site