Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1356459
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/asm/entry/32: simplify pushes of zeroed pt_regs->REGs |
| Date | 2016-03-12 16:50 +0100 |
| Message-ID | <rbTXH-8jU-3@gated-at.bofh.it> (permalink) |
| References | <rbyzU-GR-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* Denys Vlasenko <dvlasenk@redhat.com> wrote:
> Use of a temporary R8 register here seems to be unnecessary.
>
> "push %r8" is a two-byte insn (it needs REX prefix to specify R8),
> "push $0" is two-byte too. It seems just using the latter would be
> no worse.
>
> Thus, code had an unnecessary "xorq %r8,%r8" insn.
> It probably costs nothing in execution time here since we are probably
> limited by store bandwidth at this point, but still.
Note that the 3 fewer instruction in the image also shrink the code by 16 bytes:
arch/x86/entry/entry_64_compat.o:
text data bss dec hex filename
380 0 0 380 17c entry_64_compat.o.before
364 0 0 364 16c entry_64_compat.o.after
because (at least in this defconfig build) one of these functions shrunk below a
16-byte boundary. So cache footprint got denser.
Thanks,
Ingo
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] x86/asm/entry/32: simplify pushes of zeroed pt_regs->REGs Denys Vlasenko <dvlasenk@redhat.com> - 2016-03-11 18:00 +0100
Re: [PATCH] x86/asm/entry/32: simplify pushes of zeroed pt_regs->REGs Ingo Molnar <mingo@kernel.org> - 2016-03-12 16:40 +0100
Re: [PATCH] x86/asm/entry/32: simplify pushes of zeroed pt_regs->REGs Denys Vlasenko <dvlasenk@redhat.com> - 2016-03-12 19:00 +0100
Re: [PATCH] x86/asm/entry/32: simplify pushes of zeroed pt_regs->REGs Andy Lutomirski <luto@amacapital.net> - 2016-03-12 19:10 +0100
Re: [PATCH] x86/asm/entry/32: simplify pushes of zeroed pt_regs->REGs Denys Vlasenko <dvlasenk@redhat.com> - 2016-03-12 22:50 +0100
Re: [PATCH] x86/asm/entry/32: simplify pushes of zeroed pt_regs->REGs Ingo Molnar <mingo@kernel.org> - 2016-03-12 16:50 +0100
csiph-web