jli*_*jli 5 64-bit assembly nasm machine-code
考虑一下这个x64 NASM语法程序集:
inc qword [rax]
inc qword [rcx]
inc qword [rdx]
inc qword [rbx]
inc qword [rsp]
inc qword [rbp]
inc qword [rsi]
inc qword [rdi]
Run Code Online (Sandbox Code Playgroud)
与nasm组装(并与gnu ld链接)后,objdump -d报告以下内容:
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)
Run Code Online (Sandbox Code Playgroud)
生成的代码inc qword [rbp]有意义,因为设置了mod字段.但是,我无法弄清楚24装配时的来源inc qword [rsp].我一直在看coder64 #xFF,没有任何迹象告诉我应该生成24.我显然错过了更高层次的东西.
| 归档时间: |
|
| 查看次数: |
292 次 |
| 最近记录: |