x86 汇编助记符是否标准化? [英] Are x86 Assembly Mnemonic standarized?

查看:31
本文介绍了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 风格的汇编程序将 bwlq 后缀应用于所有助记符表示操作数大小.Intel 风格的汇编程序通常用关键字 byteworddwordqword
  • 表示这一点
  • AT&T 风格的汇编器识别 cbtwcwtlcltqcqto 而英特尔风格的汇编程序识别与 cbwcwdcdqcqo
  • 相同的指令
  • AT&T 风格的汇编程序识别 movz??movs?? 其中 ?? 是 Intel 风格的两个大小后缀汇编程序调用 movzxmovsxmovsxd
  • 一些 Intel 风格的汇编程序只将 63/r 识别为 movsxd 而其他人也将 movsx 识别为该指令的变体立>
  • Plan 9 风格的汇编器(例如在 Go 中使用的)非常奇怪,并且在很多方面都不同,例如使用摩托罗拉风格的助记符进行条件跳转
  • 从历史上看,为 8086 的 NEC V20 克隆提供的 NEC 汇编程序带有几乎完全不同的助记符.例如,int 被称为 brk.
  • AT&T-style assemblers apply b, w, l, and q suffixes to all mnemonics to indicate operand size. Intel-style assemblers typically indicate this with the keywords byte, word, dword, and qword
  • AT&T-style assemblers recognise cbtw, cwtl, cltq, and cqto while Intel-style assemblers recognise the same instructions as cbw, cwd, cdq, and cqo
  • AT&T-style assemblers recognise movz?? and movs?? where ?? are two size suffixes for what Intel-style assemblers call movzx, movsx, and movsxd
  • some Intel-style assemblers only recognise 63 /r as movsxd while others recognise movsx 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 called brk.

这篇关于x86 汇编助记符是否标准化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆