Betrachten Sie diese x64 NASM-Syntax Montage:Warum wird dieser Maschinencode für "inc qword [rsp]" generiert?
inc qword [rax]
inc qword [rcx]
inc qword [rdx]
inc qword [rbx]
inc qword [rsp]
inc qword [rbp]
inc qword [rsi]
inc qword [rdi]
Nachdem mit nasm Montage (und Verknüpfung mit Gnu ld), objdump -d
berichtet folgendes:
4000b0: 48 ff 00 incq (%rax)
4000b3: 48 ff 01 incq (%rcx)
4000b6: 48 ff 02 incq (%rdx)
4000b9: 48 ff 03 incq (%rbx)
4000bc: 48 ff 04 24 incq (%rsp)
4000c0: 48 ff 45 00 incq 0x0(%rbp)
4000c4: 48 ff 06 incq (%rsi)
4000c7: 48 ff 07 incq (%rdi)
Der Code für inc qword [rbp]
erzeugt macht, da der Sinn Mod-Feld ist eingestellt. Allerdings kann ich nicht herausfinden, woher die 24
stammt, wenn Sie inc qword [rsp]
montieren. Ich habe mir coder64 #xFF angesehen und nichts deutet darauf hin, dass die 24 erzeugt werden sollte. Offensichtlich fehlt mir etwas auf einer höheren Ebene.
Perfekt, danke! – jli