Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Apr 2015 20:50:54 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Alan Cox <alc@rice.edu>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans <brde@optusnet.com.au>, John Baldwin <jhb@freebsd.org>
Subject:   Re: svn commit: r280279 - head/sys/sys
Message-ID:  <20150413175054.GY2390@kib.kiev.ua>
In-Reply-To: <552BFEB2.8040407@rice.edu>
References:  <201503201027.t2KAR6Ze053047@svn.freebsd.org> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.org> <17035816.lxyzYKiOWV@ralph.baldwin.cx> <552BFEB2.8040407@rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 13, 2015 at 12:36:50PM -0500, Alan Cox wrote:
> However, in the popcnt case, we are spilling the bit map to memory in
> order to popcnt it.  That's rather silly:
> 
>     3570:       48 8b 48 18             mov    0x18(%rax),%rcx
>     3574:       f6 04 25 00 00 00 00    testb  $0x80,0x0
>     357b:       80
>     357c:       74 42                   je     35c0
> <pmap_demote_pde_locked+0x2f0>
>     357e:       48 89 4d b8             mov    %rcx,-0x48(%rbp)
>     3582:       31 c9                   xor    %ecx,%ecx
>     3584:       f3 48 0f b8 4d b8       popcnt -0x48(%rbp),%rcx
>     358a:       48 8b 50 20             mov    0x20(%rax),%rdx
>     358e:       48 89 55 b0             mov    %rdx,-0x50(%rbp)
>     3592:       31 d2                   xor    %edx,%edx
>     3594:       f3 48 0f b8 55 b0       popcnt -0x50(%rbp),%rdx
>     359a:       01 ca                   add    %ecx,%edx
>     359c:       48 8b 48 28             mov    0x28(%rax),%rcx
>     35a0:       48 89 4d a8             mov    %rcx,-0x58(%rbp)
>     35a4:       31 c9                   xor    %ecx,%ecx
>     35a6:       f3 48 0f b8 4d a8       popcnt -0x58(%rbp),%rcx
>     35ac:       01 d1                   add    %edx,%ecx
>     35ae:       e9 12 01 00 00          jmpq   36c5
> <pmap_demote_pde_locked+0x3f5>
> 
> Caveat: I'm still using clang 3.5.  Maybe the newer clang doesn't spill?

3.6.0 generates similar code.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150413175054.GY2390>