x86 汇编助记符是否标准化? [英] Are x86 Assembly Mnemonic standarized?
本文介绍了x86 汇编助记符是否标准化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
x86 标准是否包含助记符或仅定义操作码?
Does the x86 standard include Mnemonics or does it just define the opcodes?
如果不包括它们,是否有针对不同汇编器的其他标准?
If it does not include them, is there another standard for the different assemblers?
推荐答案
助记符不是标准化的,不同的汇编程序使用不同的助记符.一些例子:
Mnemonics are not standardised and different assemblers use different mnemonics. Some examples:
- AT&T 风格的汇编程序将
b
、w
、l
和q
后缀应用于所有助记符表示操作数大小.Intel 风格的汇编程序通常用关键字byte
、word
、dword
和qword
表示这一点 - AT&T 风格的汇编器识别
cbtw
、cwtl
、cltq
和cqto
而英特尔风格的汇编程序识别与cbw
、cwd
、cdq
和cqo
相同的指令 - AT&T 风格的汇编程序识别
movz??
和movs??
其中??
是 Intel 风格的两个大小后缀汇编程序调用movzx
、movsx
和movsxd
- 一些 Intel 风格的汇编程序只将
63/r
识别为movsxd
而其他人也将movsx
识别为该指令的变体立> - Plan 9 风格的汇编器(例如在 Go 中使用的)非常奇怪,并且在很多方面都不同,例如使用摩托罗拉风格的助记符进行条件跳转
- 从历史上看,为 8086 的 NEC V20 克隆提供的 NEC 汇编程序带有几乎完全不同的助记符.例如,
int
被称为brk
.
- AT&T-style assemblers apply
b
,w
,l
, andq
suffixes to all mnemonics to indicate operand size. Intel-style assemblers typically indicate this with the keywordsbyte
,word
,dword
, andqword
- AT&T-style assemblers recognise
cbtw
,cwtl
,cltq
, andcqto
while Intel-style assemblers recognise the same instructions ascbw
,cwd
,cdq
, andcqo
- AT&T-style assemblers recognise
movz??
andmovs??
where??
are two size suffixes for what Intel-style assemblers callmovzx
,movsx
, andmovsxd
- some Intel-style assemblers only recognise
63 /r
asmovsxd
while others recognisemovsx
as a variant of this instruction, too - Plan 9-style assemblers (such as used in Go) are just plain weird and differ in a whole lot of ways, such as using Motorola-style mnemonics for conditional jumps
- historically, the NEC assembler provided for the NEC V20 clone of the 8086 came with almost entirely different mnemonics. For example,
int
was calledbrk
.
这篇关于x86 汇编助记符是否标准化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文