[strace/strace] printsiginfo: decode si_pkey field (PR #210)
Dmitry V. Levin
notifications at github.com
Sun Feb 6 19:13:40 UTC 2022
On Sun, Feb 06, 2022 at 07:49:14AM -0800, Slava wrote:
> Hey, I've replaced:
>
> ```
> if (*p)
> __asm__ volatile("":::"memory");
> ```
>
> with
>
> ```
> __asm__ volatile("":: "r" (*p));
> ```
>
> which is IMHO a bit simpler and generates a single `mov` instruction (in x86 assembly), unlike trick with if (which produces 2 instructions).
Thanks.
It's clarity that's more important in the test than the number of instructions.
--
Reply to this email directly or view it on GitHub:
https://github.com/strace/strace/pull/210#issuecomment-1030895266
You are receiving this because you are subscribed to this thread.
Message ID: <strace/strace/pull/210/c1030895266 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20220206/490b04f3/attachment.htm>
More information about the Strace-devel
mailing list