title: Is syscall an instruction on x86_64?
body: <p>I wanted to check the code for performing system calls in glibc. I found something like this:</p>
  <pre><code>ENTRY (syscall)
      movq %rdi, %rax     /* Syscall number -&gt; rax.  */
      movq %rsi, %rdi     /* shift arg1 - arg5.  */
      movq %rdx, %rsi
      movq %rcx, %rdx
      movq %r8, %r10
      movq %r9, %r8
      movq 8(%rsp),%r9    /* arg6 is on the stack.  */
      syscall         /* Do the system call.  */
      cmpq $-4095, %rax   /* Check %rax for error.  */
      jae SYSCALL_ERROR_LABEL /* Jump to error handler if error.  */
  L(pseudo_end):
      ret         /* Return to caller.  */
  </code></pre>
  <p>Now my questions are:</p>
  <ol>
  <li>Is <code>syscall</code> (before the <code>cmpq</code> instruction) an instruction?</li>
  <li>If it is an instruction, what is the meaning of <code>ENTRY (syscall)</code>? The same name for an ENTRY (I don't know what an ENTRY is) and instruction?</li>
  <li>What is <code>L(pseudo_end)</code>?</li>
  </ol>