Где я могу найти наборы инструкций для микропроцессоров Intel или AMD?

8639
Bum Kim

Извините, если это глупые вопросы или они не относятся к этому сайту. Я действительно не знаю, где еще я мог бы спросить это.

Хорошо, во-первых, я не очень понимаю, как работают наборы команд на микропроцессорах. Они реализованы через ассемблер? Использует ли Intel одинаковые наборы инструкций для всех микропроцессоров линейки процессоров, таких как Haswell или Ivy Bridge, или каждый конкретный микропроцессор отличается? Я всегда думал, что микроархитектура - это то же самое, что и набор инструкций, но, очевидно, это не так. Может ли кто-нибудь объяснить мне это? И последнее: есть ли место, где можно просматривать наборы инструкций микропроцессоров Intel или AMD?

Заранее большое спасибо.

0
Я ожидаю, что это будет скоро закрыто повторно: FAQ. Нет голоса от меня. Xavierjazz 10 лет назад 1
Я очень озадачен причиной закрытия. В этом вопросе я не вижу ничего, что спрашивало бы об «ошибках в предварительной версии / бета-версии программного обеспечения или прототипа оборудования». Или любой из вышеперечисленных индивидуально в этом отношении. Jamie Hanrahan 7 лет назад 0

1 ответ на вопрос

4
LawrenceC

If you want a list of instructions for any CPU, generally you want that CPU's instruction set reference or programmers reference guide.

Intel: http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html

AMD: http://developer.amd.com/resources/documentation-articles/developer-guides-manuals/ (Architecture Programmer's Manuals is what you want)

Intel has several processor architectures, x86 being its (and the) most popular. x86 has been (and continues to be) extended over time, generally later revisions are backward compatible with earlier revisions. For example, Intel's first x86 architecture processor was the 8088. Then the 80286 came out. It extends the 8088 instruction set. 80286 understands all 8088 assembly. And so forth throughout 80386, 80486, Pentium, the Core series, and the i series.

I always thought that microarchitecture was the same thing as the instruction set

No. The microarchitecture is "beneath" and implements the main architecture. In this case, Intel has many microarchitectures that implement various revisions x86 instruction set. The microarchitecture is not something you need to worry about for the purposes of learning assembly language programming. You do need to know which x86 revision (or architecture, not micro architecture) you are using, as e.g. Pentium has instructions that 80386 processors don't. You might want to start with a book or something teaching you how to program an 8088 as it will be simpler and later architecture revisions (286, 386, etc.) build upon it.

Okay first of all, I don't really understand how instruction sets on microprocessors work. Are they implemented through an assembly language?

Assembly language allows you, the programmer, to write machine language using something resembling human readable text, and will typically let you use labels instead of remembering raw RAM or I/O addresses. The alternative would be to enter the opcodes of each instruction manually, a very tedious task given the number of instructions and addressing modes x86 has.

Each instruction is represented by a mnemonic, and translates to a single machine language instruction. An assembler will take your assembly code (in a text file) and assemble (NOT compile) it to a binary image that the CPU can run.

AMD copied Intel's instruction set, but started to diverge with SSE instructions, VMM instructions and possibly other things. Most of what you learn for Intel assembly will apply, though.

Похожие вопросы