[英]Why nasm and yasm yield 67 opcode for mov r16, word [r64 - 3] instruction?
In x86-64 assembly I have following instruction 在x86-64汇编中,我有以下说明
mov dx, word [esi-5]
Nasm 2.13.03
generates: Nasm
2.13.03
生成:
66 67 8B 56 FB
yasm 1.3.0
generates: yasm
1.3.0
生成:
67 66 8B 56 FB
The 66 67
opcodes are modifiers so 8B 56 FB
on its own is: 66 67
操作码是修饰符,因此8B 56 FB
本身是:
mov edx, dword [rsi-5]
I noticed that: 我注意到:
66 8B 56 FB
also evaluates to: 还评估为:
mov dx, word [rsi-5]
I have two questions: 我有两个问题:
1) Why nasm
& yasm
emit this 67
opcode byte padding? 1)为什么
nasm
和yasm
发出这67
操作码字节填充? ( 67
on it's own is not enough to reduce edx
to dx
, it needs to include 66
) (
67
本身不足以将edx
缩减为dx
,它需要包含66
)
2) Is there a way to emit a shorter 4 byte instruction without 67
in nasm / yasm? 2)有没有办法在nasm / yasm中发出没有
67
的较短的4字节指令?
The question made false assumption 66 8B 56 FB
问题做出了错误的假设
66 8B 56 FB
mov dx, word [rsi-5]
is equivalent to 相当于
`66 67 8B 56 FB` or `67 66 8B 56 FB`
mov dx, word [esi-5]
66
reduces edx
to dx
66
将edx
为dx
67
reduces [rsi-5]
to [esi-5]
67
将[rsi-5]
降低为[esi-5]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.