What does an asterisk * before an address mean in x86-64 AT&T assembly?

前端 未结 7 1370
故里飘歌
故里飘歌 2020-12-15 17:11

What does the following line mean:

...
401147: ff 24 c5 80 26 40 00    jmpq   *0x402680(,%rax,8)
...

What does the asterisk in front of the

7条回答
  •  有刺的猬
    2020-12-15 17:22

    As Necrolis wrote, Intel syntax makes it a bit more obvious, but RTN is really clearer. The line

    jmpq   *0x402680(,%rax,8)
    

    would be described in RTN by:

    RIP <- M[0x402680 + (8 * RAX)]
    

    where M is the system memory.

    As such, we can write the general form jmpq *c(r1, r2, k), where c is an immediate constant, r1 and r2 are general purpose registers and k is either 1 (default), 2, 4 or 8:

    RIP <- M[c + r1 + (k * r2)]
    

提交回复
热议问题