汇编:为什么某些x86操作码在x64中无效? [英] Assembly: why some x86 opcodes are invalid in x64?

查看:333
本文介绍了汇编:为什么某些x86操作码在x64中无效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题来自一个简单的好奇心:

My question arises from a simple curiosity:

为什么在x64中某些操作码无效(例如06、07),而在x86中却用于相当基本的指令(06和07为推入式和弹出式)?尽管这些最简单的说明在两种体系结构中都能很好地实现.

Why in x64 some of the opcodes are invalid (06, 07 for example), whereas in x86 are used for fairly basic instructions (06 and 07 being push and pop)? I though that those simplest instructions would do nicely in both architectures.

为什么他们在x64中禁用了一些简单的指令?他们为什么不工作? 为什么当他们可以将它们分配给x64版本的指令时,为什么禁用某些操作码,从而在操作码列表中创建漏洞?

Why they disabled some of those simple instructions in x64? Why wouldn't they work? Why they disabled some opcodes, creating holes in opcode list, when they could instead assign them to x64 versions of instructions?

参考:

http://ref.x86asm.net/coder32.html

http://ref.x86asm.net/coder64.html

推荐答案

32位模式下的06和07操作码是指令PUSH ESPOP ES.在64位模式下,段寄存器CS,DS,ES和SS不再用于确定内存地址:处理器假定基址为0,并且没有大小限制.由于现在通常没有应用程序(操作系统本身除外)访问这些寄存器的原因,因此,用于更改和访问它们的操作码被删除了.

The 06 and 07 opcodes in 32-bit mode are the instructions PUSH ES and POP ES. In 64-bit mode, the segment registers CS, DS, ES, and SS are no longer used to determine memory addresses: the processor assumes a base address of 0 and no size limits. As there now usually no reason for applications (other than the operating system itself) to access these registers, the opcodes for changing and accessing them were removed.

FS和GS段寄存器仍可以在64位模式下设置基地址,因此尚未删除与它们相关的操作码.

The FS and GS segment registers can still set the base address in 64-bit mode, so the opcodes related to them have not been removed.

这篇关于汇编:为什么某些x86操作码在x64中无效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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