5
考虑这个64 NASM语法组件:为什么此机器代码为“inc qword [rsp]”生成?
inc qword [rax]
inc qword [rcx]
inc qword [rdx]
inc qword [rbx]
inc qword [rsp]
inc qword [rbp]
inc qword [rsi]
inc qword [rdi]
与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)
为inc qword [rbp]
生成的代码是有道理的,因为mod字段被设置。然而,我不知道24
来自何时组装inc qword [rsp]
。我一直在寻找coder64 #xFF,没有任何迹象表明应该生成24。我明显错过了更高层次的东西。
完美,谢谢! – jli