Skip to content

Commit

Permalink
net: Change x86_64 add32_with_carry to allow memory operand
Browse files Browse the repository at this point in the history
Note add32_with_carry(a, b) is suboptimal, as it forces
a and b in registers.

b could be a memory or a register operand.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tom Herbert authored and David S. Miller committed May 5, 2014
1 parent a278534 commit 4405b4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/include/asm/checksum_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static inline unsigned add32_with_carry(unsigned a, unsigned b)
asm("addl %2,%0\n\t"
"adcl $0,%0"
: "=r" (a)
: "0" (a), "r" (b));
: "0" (a), "rm" (b));
return a;
}

Expand Down

0 comments on commit 4405b4d

Please sign in to comment.