7 Matching Annotations
  1. Feb 2022
    1. The %rip register on x86-64 is a special-purpose register that always holds the memory address of the next instruction to execute in the program's code segment.

      %rip 有什么作用?

    1. • %rax: return value• %rsp: stack pointer• %rdi: 1st argument• %rsi: 2nd argument• %rdx: 3rd argument• %rcx: 4th argument• %r8: 5th argument• %r9: 6th argument

      有那几个常用且重要的 register?

  2. Jan 2022
    1. If one of those two expressions couldpossibly generate an error condition or a side effect, this could lead to invalidbehavior. Such is the case for our earlier example

      有什么情况下必须使用 branching 方式,而不能使用 conditional move?

  3. Nov 2021
    1. The destination operand must be a register.

      load effective address 的 destination 需要是什么?

    2. The ability of the leaq instruction to perform addition and limited forms ofmultiplication proves useful when compiling simple arithmetic expressions suchas this example.

      leaq 在什么情况下有用?

    3. local variables such as x are often kept in registers rather thanstored in memory locations. Register access is much faster than memory access.

      local variables 通过会存在哪里,为什么?

    4. we see that whatwe call “pointers” in C are simply addresses. Dereferencing a pointer involvescopying that pointer into a register, and then using this register in a memoryreference.

      dereference pointer 在 assembly code 中如何实现?