Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1399666

Re: [PATCH -v2] x86/hweight: Get rid of the special calling convention

From "H. Peter Anvin" <hpa@zytor.com>
Newsgroups linux.kernel
Subject Re: [PATCH -v2] x86/hweight: Get rid of the special calling convention
Date 2016-05-12 07:00 +0200
Message-ID <rxQT8-6Eh-3@gated-at.bofh.it> (permalink)
References (6 earlier) <rxlmh-zy-13@gated-at.bofh.it> <rxotQ-3v7-13@gated-at.bofh.it> <rxtMR-Fp-1@gated-at.bofh.it> <rxAlk-7bN-27@gated-at.bofh.it> <rxAv0-7hb-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On May 11, 2016 4:24:09 AM PDT, Peter Zijlstra <peterz@infradead.org> wrote:
>On Wed, May 11, 2016 at 07:15:19AM -0400, Brian Gerst wrote:
>
>> I think he meant the out of line version would be asm, so you could
>> control what registers were clobbered.
>
>Yeah, it might save a few cycles on the call, but given that most
>machines should have popcnt these days is it worth the hassle/cost of
>duplicating the lib/hweight.c magic in asm (and remember, twice, once
>for 32bit and once for 64bit) ?

I was thinking it isn't really very complex code even in assembly as it is super-regular; you can even crib the gcc-generated code if you wish.
-- 
Sent from my Android device with K-9 Mail. Please excuse brevity and formatting.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH] x86/hweight: Get rid of the special calling convention Borislav Petkov <bp@suse.de> - 2016-05-04 20:50 +0200
  Re: [RFC PATCH] x86/hweight: Get rid of the special calling convention Brian Gerst <brgerst@gmail.com> - 2016-05-04 21:40 +0200
    Re: [RFC PATCH] x86/hweight: Get rid of the special calling  convention "H. Peter Anvin" <hpa@zytor.com> - 2016-05-04 21:40 +0200
      Re: [RFC PATCH] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-04 21:50 +0200
        Re: [RFC PATCH] x86/hweight: Get rid of the special calling  convention "H. Peter Anvin" <hpa@zytor.com> - 2016-05-04 22:00 +0200
          Re: [RFC PATCH] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-04 22:30 +0200
            Re: [RFC PATCH] x86/hweight: Get rid of the special calling  convention "H. Peter Anvin" <hpa@zytor.com> - 2016-05-04 23:00 +0200
            Re: [RFC PATCH] x86/hweight: Get rid of the special calling  convention Andi Kleen <andi@firstfloor.org> - 2016-05-04 23:20 +0200
            Re: [RFC PATCH] x86/hweight: Get rid of the special calling convention Denys Vlasenko <dvlasenk@redhat.com> - 2016-05-05 15:10 +0200
              Re: [RFC PATCH] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-05 16:10 +0200
                [PATCH -v2] x86/hweight: Get rid of the special calling convention Borislav Petkov <bp@suse.de> - 2016-05-10 19:00 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Peter Zijlstra <peterz@infradead.org> - 2016-05-10 19:30 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling convention "H. Peter Anvin" <hpa@zytor.com> - 2016-05-10 21:10 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-10 21:20 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention "H. Peter Anvin" <hpa@zytor.com> - 2016-05-11 00:40 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-11 06:20 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling convention Brian Gerst <brgerst@gmail.com> - 2016-05-11 13:20 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Peter Zijlstra <peterz@infradead.org> - 2016-05-11 13:30 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-11 14:50 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling convention "H. Peter Anvin" <hpa@zytor.com> - 2016-05-12 07:00 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-12 14:00 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Peter Zijlstra <peterz@infradead.org> - 2016-05-12 14:20 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-12 15:10 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-18 12:40 +0200
                Re: [PATCH -v2] x86/hweight: Get rid of the special calling  convention Borislav Petkov <bp@suse.de> - 2016-05-10 21:10 +0200

csiph-web