Sign in to follow this  
coding_ambition

Modern CPU Architectures

Recommended Posts

Hi, Can anyone give me a list of the CPU Architectures used in today's PCs. I know x86 is the main one but am sure a few others must be around. This is to do with assembly programming. Hope what I said makes sense. P.S. I've heard that programs written in assembly for a specific architecture may work on one CPU but not another of the same architecture (e.g. x86 assembly running on x86 based Intel but not x86 based AMD). Can some one tell me why? It says there is a way around this at http://www.gamedev.net/reference/articles/article789.asp in the third paragraph under "Why Assembly Language?". Anyone know how? Thanks

Share this post


Link to post
Share on other sites
Apart from x86 and off the top of my head:

ARM
MIPS
PowerPC
SPARC

As for why some programs may not work on different CPUs of the same architecture, it's a result of different instruction sets. The Pentium4 for example has a lot of instructions that simply didn't exist on a 486, even though they're from the same family. Another factor is endianess, even if 2 CPUs have exactly the same instruction set but are configured to use a different endianness (one is big-endian, the other little-endian) then the binary programs will be incompatible. However, if you have the sources you can re-assemble the binary for the other endianness (assuming the program itself doesn't make any assumptions about the system's endianness).

Share this post


Link to post
Share on other sites
Honestly there aren't many architectures in widespread use today. We have x86 and its derived architectures (x64 and IA64 are the most important). For Macs we have the PowerPC archiecture, but apart from those I don't think there are any significant architectures.

Quote:
Can some one tell me why?

You may be using vendor-specific extensions (stuff like 3DNow!) or behavior (I'm not experienced enough with x86 to give an example of this). The x86 architecture is very complicated and as you may know it can be in several modes (real and protected are the most important) which may not be compatible. So if you have programmed an assembly program for MS-DOS which used interrupts and the BIOS for a number of tasks it may not work on Windows because you aren't allowed to do that kind of thing. Of course you may also rely on platform-specific details, for example many DOS-programs just wrote directly to video memory, but the video memory address might change on other platforms.

Share this post


Link to post
Share on other sites
Well, x64 is the "new" 64-bit architecture for Intel, called AMD64 for AMD. I believe the general register sets are almost idendical now between AMD and Intel but on standard x86 (in most common processors) there is a difference in AMD and Intel parallel arithmetic operations. Primarily, AMD used the 3DNow! instructions with the 64-bit MMX registers, and Intel used SSE, SSE2, and SSE3 with dedicated 128-bit XMM registers. I may be wrong, but I believe Intels and AMDs newer CPUs fully support both instruction sets (my processor doesn't though :(, I have to port my 3DNow to SSE and select a specialized DLL during program installation).

As for normal integer/fpu x86 code, while using a macro assembler like MASM32, I don't think you'll run into any problems between Intel and AMD architectures. I really haven't used assembly for much other than parallel math operations, so I'll leave it to someone more knowledgable to verify this.

Share this post


Link to post
Share on other sites
Quote:
Original post by CTar
Honestly there aren't many architectures in widespread use today. We have x86 and its derived architectures (x64 and IA64 are the most important). For Macs we have the PowerPC archiecture, but apart from those I don't think there are any significant architectures.

Macs are using x86 chips now.

Share this post


Link to post
Share on other sites
Quote:
Original post by OrangyTang
Quote:
Original post by CTar
Honestly there aren't many architectures in widespread use today. We have x86 and its derived architectures (x64 and IA64 are the most important). For Macs we have the PowerPC archiecture, but apart from those I don't think there are any significant architectures.

Macs are using x86 chips now.


Yes, but there are still many PowerPC chips in use because the transition to x86 is fairly recent. I also seem to recall that a console used the PowerPC architecture.

Share this post


Link to post
Share on other sites
Quote:
Original post by CTar
Yes, but there are still many PowerPC chips in use because the transition to x86 is fairly recent. I also seem to recall that a console used the PowerPC architecture.


Only the Xbox 360....nothing too important [smile]

ARM is also very prevelant, being the architecture of choice for many embedded systems (read: mobile phones and PDAs). I believe MIPS still has some presence in embedded systems and apparently new UltraSPARC processors are still being made, although what they're being used for I've no idea.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this