Re: [PATCH v3 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-11 Thread Peter Zijlstra
On Sun, Jun 10, 2018 at 07:19:11AM -0700, Nadav Amit wrote: > static __always_inline bool arch_static_branch(struct static_key *key, bool > branch) > { > + asm_volatile_goto("STATIC_BRANCH_GOTO l_yes=\"%l[l_yes]\" key=\"%c0\" " > + "branch=\"%c1\"" > +

Re: [PATCH v3 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-11 Thread Peter Zijlstra
On Sun, Jun 10, 2018 at 07:19:11AM -0700, Nadav Amit wrote: > static __always_inline bool arch_static_branch(struct static_key *key, bool > branch) > { > + asm_volatile_goto("STATIC_BRANCH_GOTO l_yes=\"%l[l_yes]\" key=\"%c0\" " > + "branch=\"%c1\"" > +

Re: [PATCH v3 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-10 Thread Nadav Amit
at 6:29 PM, h...@zytor.com wrote: > On June 10, 2018 7:19:11 AM PDT, Nadav Amit wrote: >> Use assembly macros for jump-labels and call them from inline assembly. >> This not only makes the code more readable, but also improves >> compilation decision, specifically inline decisions which GCC base

Re: [PATCH v3 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-10 Thread Nadav Amit
at 6:29 PM, h...@zytor.com wrote: > On June 10, 2018 7:19:11 AM PDT, Nadav Amit wrote: >> Use assembly macros for jump-labels and call them from inline assembly. >> This not only makes the code more readable, but also improves >> compilation decision, specifically inline decisions which GCC base

Re: [PATCH v3 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-10 Thread hpa
On June 10, 2018 7:19:11 AM PDT, Nadav Amit wrote: >Use assembly macros for jump-labels and call them from inline assembly. >This not only makes the code more readable, but also improves >compilation decision, specifically inline decisions which GCC base on >the number of new lines in inline

Re: [PATCH v3 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-10 Thread hpa
On June 10, 2018 7:19:11 AM PDT, Nadav Amit wrote: >Use assembly macros for jump-labels and call them from inline assembly. >This not only makes the code more readable, but also improves >compilation decision, specifically inline decisions which GCC base on >the number of new lines in inline

[PATCH v3 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-10 Thread Nadav Amit
Use assembly macros for jump-labels and call them from inline assembly. This not only makes the code more readable, but also improves compilation decision, specifically inline decisions which GCC base on the number of new lines in inline assembly. As a result the code size is slightly increased.

[PATCH v3 9/9] x86: jump-labels: use macros instead of inline assembly

2018-06-10 Thread Nadav Amit
Use assembly macros for jump-labels and call them from inline assembly. This not only makes the code more readable, but also improves compilation decision, specifically inline decisions which GCC base on the number of new lines in inline assembly. As a result the code size is slightly increased.