This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

x64 instruction scheduling.


Hi All,

Does someone knows about the x86_64 instruction scheduling, and tell
me why we see some various nop in function prologs. This is just
general culture, curiosity.

I see prolog like this in some linux kernel functions

0xffffffff8102fba0         pushq  %rbp
0xffffffff8102fba1         movq   %rsp,%rbp
0xffffffff8102fba4         nopl   0x0(%rax,%rax,1)  <==
0xffffffff8102fba9         movl   %edi,%edi            <==
0xffffffff8102fbab         movl   %esi,-0xa05000(%rdi)


0xffffffff81176db0         pushq  %rbp
0xffffffff81176db1         movq   %rsp,%rbp
0xffffffff81176db4         subq   $0x40,%rsp
0xffffffff81176db8         movq   %rbx,-0x18(%rbp)
0xffffffff81176dbc         movq   %r12,-0x10(%rbp)
0xffffffff81176dc0         movq   %r13,-0x8(%rbp)
0xffffffff81176dc4         nopl   0x0(%rax,%rax,1) <==
0xffffffff81176dc9         movq   %rsi,%r12

At first I thought this NOP could be to fill some NULL instruction to
reach some cache line boundaries, but the addrs here sugest this is
not for that reason. (I am a newbe in the x86 architecture)


Thanx in advance.
Cheers,
Phi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]