[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1456958139.648.116.camel@edumazet-ThinkPad-T530>
Date: Wed, 02 Mar 2016 14:35:39 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Tom Herbert <tom@...bertland.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
torvalds@...ux-foundation.org, tglx@...utronix.de,
mingo@...hat.com, hpa@...or.com, x86@...nel.org, kernel-team@...com
Subject: Re: [PATCH v5 net-next] net: Implement fast csum_partial for x86_64
On mer., 2016-03-02 at 14:18 -0800, Tom Herbert wrote:
\
> + asm("lea 0f(, %[slen], 4), %%r11\n\t"
> + "clc\n\t"
> + "jmpq *%%r11\n\t"
> + "adcq 7*8(%[src]),%[res]\n\t"
> + "adcq 6*8(%[src]),%[res]\n\t"
> + "adcq 5*8(%[src]),%[res]\n\t"
> + "adcq 4*8(%[src]),%[res]\n\t"
> + "adcq 3*8(%[src]),%[res]\n\t"
> + "adcq 2*8(%[src]),%[res]\n\t"
> + "adcq 1*8(%[src]),%[res]\n\t"
> + "adcq 0*8(%[src]),%[res]\n\t"
> + "nop\n\t"
> + "0: adcq $0,%[res]"
> + : [res] "=r" (result)
> + : [src] "r" (buff),
> + [slen] "r" (-(unsigned long)(len >> 3)), "[res]" (result)
> + : "r11");
>
hpa mentioned we could use adcq.d8 0*8(%[src]),%[res]
to avoid the mandatory 'nop'
Powered by blists - more mailing lists