MOVZBL 指令在 IA-32 AT&T 语法中有什么作用? [英] What does the MOVZBL instruction do in IA-32 AT&T syntax?
问题描述
这个指令到底是做什么的?
What exactly does this instruction do?
movzbl 0x01(%eax,%ecx), %eax
推荐答案
AT&T 语法拆分 movzx
Intel 指令助记符用于不同源代码的不同助记符(movzb
vs. movzw
).在英特尔语法中,它是:
AT&T syntax splits the movzx
Intel instruction mnemonic into different mnemonics for different source sizes (movzb
vs. movzw
). In Intel syntax, it's:
movzx eax, byte ptr [eax+ecx+1]
即从内存中的 eax+ecx+1 加载一个字节并零扩展到完整寄存器.
i.e. load a byte from memory at eax+ecx+1 and zero-extend to full register.
顺便说一句,大多数 GNU 工具现在都有一个开关或配置选项来首选 Intel 语法.(例如 objdump -Mintel
或 gcc -S -masm=intel
,尽管后者会影响编译 inline-asm 时使用的语法).如果您不以 AT&T 组装为生,我当然会建议您研究一下.另请参阅 x86 标签维基以获取更多文档和指南.
BTW, most GNU tools now have a switch or a config option to prefer Intel syntax. (Such as objdump -Mintel
or gcc -S -masm=intel
, although the latter affects the syntax used when compiling inline-asm). I would certainly recommend to look into it, if you don't do AT&T assembly for living. See also the x86 tag wiki for more docs and guides.
这篇关于MOVZBL 指令在 IA-32 AT&T 语法中有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!