gpt4 book ai didi

disassembly - 汇编代码中的 MOVABS 操作码

转载 作者:行者123 更新时间:2023-12-03 09:38:03 24 4
gpt4 key购买 nike

在调试其中一个汇编代码示例时,我发现了以下信息:

   (gdb) x /10i 0x4005c4
0x4005c4: push %rbp
0x4005c5: mov %rsp,%rbp
0x4005c8: sub $0xa0,%rsp
0x4005cf: mov %fs:0x28,%rax
0x4005d8: mov %rax,-0x8(%rbp)
0x4005dc: xor %eax,%eax
0x4005de: movabs $0x6673646c6a6b3432,%rax
0x4005e8: mov %rax,-0x40(%rbp)
0x4005ec: movl $0x323339,-0x38(%rbp)
0x4005f3: movl $0x553059,-0x90(%rbp)

根据我的理解,不应使用 movabs,它似乎是故意引入的。我的理解正确吗?

替换它的等效 MOV 命令应该是什么?

最佳答案

作为这个问题的直接副本:https://reverseengineering.stackexchange.com/questions/2627/what-is-the-meaning-of-movabs-in-gas-x86-att-syntax

[...] The movabs instruction to load arbitrary 64-bit constant into register and to load/store integer register from/to arbitrary constant 64-bit address is available.



http://www.ucw.cz/~hubicka/papers/amd64/node1.html

它完全符合您的期望 - 它将立即数放入寄存器中。

关于disassembly - 汇编代码中的 MOVABS 操作码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46594389/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com