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. _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"