难道Intel和AMD处理器具有相同的汇编? [英] Do Intel and AMD processor have the same assembler?

查看:753
本文介绍了难道Intel和AMD处理器具有相同的汇编?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C语言是用来编写UNIX实现的可移植性 - 使用不同的编译器产生不同的机器指令编译相同的C语言程序。为什么Windows操作系统能够在Intel和AMD的处理器上运行?

The C language was used to write UNIX to achieve portability -- the same C language program compiled using different compilers produces different machine instructions. How come Windows OS is able to run on both Intel and AMD processors?

推荐答案

AMD和Intel处理器(*)有一个大的一套共同的,所以这是可能的编译器或汇编程序二进制code这运行相同的两个。

AMD and Intel processors(*) have a large set of instructions in common, so it is possible for a compiler or assembler to write binary code which runs "the same" on both.

然而,即使从一个制造商不同处理器家族都有自己的指令集,通常被称为扩展名或什么。忽略的x87协处理器,第一次我记得这是一个营销的一点是,当一切都突然响起与MMX(TM)技术。二进制code预计在任何处理器上运行或者需要避免的扩展,或利用他们之前检测CPU的类型。

However, different processor families even from one manufacturer have their own sets of instructions, usually referred to as "extensions" or whatever. Ignoring the x87 co-processor, the first time I remember this being a marketing point was when everything suddenly went "with MMX(TM) technology". Binary code expected to run on any processor either needs to avoid extensions, or to detect the CPU type before using them.

Intel的Itanium 64位架构来自AMD的x86-64架构完全不同,等了一会儿自己的64位产品都是不兼容的(和Itanium没有像X86,X86-64而扩展指令通过添加64位指令集)。英特尔先示弱,并通过了X86-64,虽然仍有一些区别:<一href=\"http://en.wikipedia.org/wiki/X86-64#Differences_between_AMD64_and_Intel_64\">http://en.wikipedia.org/wiki/X86-64#Differences_between_AMD64_and_Intel_64

Intel's Itanium 64-bit architecture was completely different from AMD's x86-64 architecture, so for a while their 64bit offerings were non-compatible (and Itanium was nothing like x86, whereas x86-64 extended the instruction set by adding 64bit instructions). Intel blinked first and adopted x86-64, although there are still a few differences: http://en.wikipedia.org/wiki/X86-64#Differences_between_AMD64_and_Intel_64

的Windows可能使用普通x86或x86-64的指令集,几乎所有code。我也不会,如果各种驱动程序和codeCS被运往多个版本,并选择正确的,一旦CPU被审讯。

Windows probably uses the common x86 or x86-64 instruction set for almost all code. I wouldn't be surprised if various drivers and codecs are shipped in multiple versions, and the correct one selected once the CPU has been interrogated.

(*)其实,英特尔制定或作出各种处理器,包括ARM(英特尔的ARM处理器被称为XScale的,但我认为他们已经销售业务)。而AMD让其他处理器了。但是,我们知道你的意思,英特尔/ AMD处理器: - )

(*) Actually, Intel make or have made various kinds of processors, including ARM (Intel's ARM processors were called XScale, but I think they've sold that business). And AMD make other processors too. But we know which Intel/AMD processors you mean :-)

这篇关于难道Intel和AMD处理器具有相同的汇编?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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