# 指令集架构

指令集架构（ISA）是对处理器向软件暴露的机器级指令、寄存器、寻址模式、数据类型和执行模型的形式化规范<sup>[1](https://maloneuniversity.org/library/encyclopedia/computer-science/computer-architecture/instruction-set-architecture)</sup>。它是硬件与软件之间的契约：应用程序、编译器和操作系统都针对ISA编写，而每一个实现该ISA的物理处理器都必须执行规范所定义的任何内容<sup>[2](https://cs315-f25.cs.usfca.edu/lectures/11-cs315-2025-10-28-processor-components/)</sup><sup> • </sup><sup>[3](https://www.cs.umd.edu/users/meesh/411/CA-online/chapter/instruction-set-architecture/index.html)</sup>。

| 要点 | 详情 |
|---|---|
| 定义 | 对软件可见的指令、寄存器、寻址模式、数据类型和执行模型的规范<sup>[1](https://maloneuniversity.org/library/encyclopedia/computer-science/computer-architecture/instruction-set-architecture)</sup> |
| 区分 | 微架构是实现ISA的处理器内部设计；两者被有意保持分离<sup>[2](https://cs315-f25.cs.usfca.edu/lectures/11-cs315-2025-10-28-processor-components/)</sup> |
| 主要家族 | 截至2024年，最突出的两大CPU ISA家族是x86-64（也称amd64）和ARM<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup> |
| 开放标准 | RISC-V是一种基于精简指令集计算机（RISC）原则的开放标准ISA，定义为基本整数ISA加可选扩展<sup>[5](https://docs.riscv.org/)</sup> |
| 寄存器数量 | CPU ISA中的程序寄存器通常为16或32个<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup> |
| 兼容性回报 | 实现同一ISA的一代代处理器主要通过微架构改进带来了数量级的性能提升<sup>[6](https://technav.ieee.org/topic/microarchitecture/)</sup> |

## ISA与微架构

计算机体系结构中最重要的区分是ISA与微架构之间的区分<sup>[2](https://cs315-f25.cs.usfca.edu/lectures/11-cs315-2025-10-28-processor-components/)</sup>。ISA是机器语言，是汇编语言程序员和编译后程序所看到的接口；微架构是机器本身的设计，是其功能单元和数据通路，为实现该ISA而构建<sup>[7](https://cseweb.ucsd.edu/classes/fa96/cse30/lec1/)</sup>。ISA定义了处理器能做什么，而不规定其内部电路如何执行每个操作<sup>[8](https://technav.ieee.org/topic/instruction-sets/)</sup>。

**为何这种分离重要。** 由于契约是固定的，硬件厂商可以随时间改进处理器实现，同时保持软件兼容性<sup>[1](https://maloneuniversity.org/library/encyclopedia/computer-science/computer-architecture/instruction-set-architecture)</sup>。实现同一ISA的一代代处理器主要通过流水线和乱序执行等微架构改进带来了数量级的性能提升<sup>[6](https://technav.ieee.org/topic/microarchitecture/)</sup>。这一原则在RISC-V规范中公开表述：ISA的定义将实现细节保持在最低限度，应被理解为软件在许多不同实现中所看到的接口，而不是任何单一硬件的蓝图。<sup>[9](https://docs.riscv.org/reference/isa/v20240411/unpriv/intro.html)</sup>

## ISA规定的内容

从软件侧看，ISA是一组指令，具有两种表示形式：机器码，一种紧凑的二进制编码；以及汇编，同一信息的较不紧凑的文本表示。将汇编转换为机器码是完全可逆的，因此这两个术语常被非正式地当作同义词使用<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup>。

每条指令由一个操作定义，通常还有几个操作数。三种操作数形式常见：嵌入指令本身的立即数值、程序寄存器（通常为16或32个）以及内存地址<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup>。大多数指令属于少数几种类型：从内存加载值到寄存器、从寄存器存储值到内存、从寄存器值计算值，以及跳转到新位置<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup>。ISA还规定条件行为，通常通过由计算指令更新并由后续条件指令检查的标志或条件码寄存器来实现，现代ISA包含少量原子操作，这些操作加载、计算和存储，并保证在此期间没有其他处理器可以修改内存<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup>。

ISA还定义超出单条指令的执行模型。例如，英特尔64和IA-32架构识别四个特权级，编号0到3，其中0级是最高特权，用于最关键的代码，通常是操作系统内核；较低特权的代码只能通过称为门的受控接口访问较高特权的服务<sup>[10](https://cdrdv2-public.intel.com/671436/253665-sdm-vol-1.pdf)</sup>。

## RISC与CISC

CISC（复杂指令集计算机）和RISC（精简指令集计算机）这两个术语起源于一位大学教授提出当时占主导地位的x86 ISA的替代方案，并将x86风格的设计称为CISC，同时倡导RISC；这些名称保留了下来，大多数非x86 ISA都宣称自己是RISC<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup>。像x86这样的CISC ISA使用可变长度指令和更丰富的寻址模式，而RISC设计倾向于更简单、固定长度的指令，这些指令更容易解码，从而带来更短的周期时间<sup>[7](https://cseweb.ucsd.edu/classes/fa96/cse30/lec1/)</sup>。

在实践中，边界在实现层面已经模糊。对于像x86这样的复杂指令集设计，微架构可以将ISA的可变长度指令分解为更简单的[微操作](https://www.edgepedia.org/zh/micro-operation)（uops），然后通过乱序流水线进行处理。<sup>[6](https://technav.ieee.org/topic/microarchitecture/)</sup>现代x86实现从而通过在解码时将CISC指令翻译为微操作，馈入类似RISC的执行核心，实际上是在CISC ISA表面之下采用了RISC微架构，从而实现与RISC设计相当的性能<sup>[8](https://technav.ieee.org/topic/instruction-sets/)</sup>。

## 主要ISA家族

自1978年以来，x86-64在保持向后兼容的同时不断发展，广泛存在于英特尔和AMD制造的设备中，用作服务器、工作站、台式机和笔记本电脑。<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup>英特尔在其多卷软件开发者手册中记录了该架构：第1卷描述架构和编程环境，第2卷提供从A到Z的完整指令集参考，第3卷和第4卷涵盖系统编程和型号专用寄存器<sup>[11](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html?wapkw=intel+64)</sup>。

**Arm。** 高通、三星和苹果经常围绕Arm构建手机、嵌入式系统和低功耗笔记本电脑，Arm实际上由多个ISA组成，彼此之间联系松散；其中，aarch64被广泛使用<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup>。Arm每年发布其A-Profile架构的更新以及完整的指令集和系统寄存器文档；2024年更新为Armv9.6-A，2026年更新为Armv9.8-A<sup>[12](https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2024)</sup><sup> • </sup><sup>[13](https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2026)</sup>。A64指令集保持32位指令大小，同时增加64位能力，通过寄存器X0到X7传递最多8个参数，并生成比32位等效代码小约6%的64位Dalvik JIT代码<sup>[14](https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/the-a64-isa-and-compilers)</sup>。

**RISC-V。** RISC-V（发音为“risk-five”）是一种基于既定RISC原则的开放标准ISA<sup>[5](https://docs.riscv.org/)</sup>。RISC-V ISA由一个基本整数ISA——每个实现中必需——以及可选扩展组成；其两个主要基本变体RV32I和RV64I分别提供32位和64位地址空间，XLEN给出整数寄存器的位宽。<sup>[9](https://docs.riscv.org/reference/isa/v20240411/unpriv/intro.html)</sup>标准扩展添加整数乘除法（M）、原子操作（A）、单精度和双精度浮点（F和D）以及压缩16位指令（C），命名约定将基本前缀与扩展字母连接，如RV64IMAFD<sup>[9](https://docs.riscv.org/reference/isa/v20240411/unpriv/intro.html)</sup><sup> • </sup><sup>[15](https://docs.riscv.org/reference/isa/unpriv/naming.html)</sup>。基本RV32I ISA使用不到32位指令字编码空间的1/8，故意为自定义和非标准扩展留出空间<sup>[9](https://docs.riscv.org/reference/isa/v20240411/unpriv/intro.html)</sup>。

## ISA、编译器与ABI

编译器是ISA级代码的主要生产者：它们将高级源代码翻译为目标ISA的机器指令，被告知目标实现哪些扩展的编译器将仅从这些集合生成指令字<sup>[4](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)</sup>。ISA是应用程序二进制接口（ABI）的语言组件，ABI还包括库和描述为ABI编写的程序高级特性的约定<sup>[16](https://fileserver-az.core.ac.uk/download/pdf/19879480.pdf)</sup>。

**跨ISA变更的兼容性。** 由于如此多的软件与ISA绑定，转换代价高昂，通常是被管理而非强制。英特尔于1999年与惠普共同宣布了IA-64（Itanium）项目，旨在为工作站和服务器提供64位ISA，同时通过在硬件中与英特尔的IA-32处理器兼容以及通过软件翻译与惠普的PA-RISC指令兼容来保护客户软件投资<sup>[17](https://www.intel.com/pressroom/archive/releases/1999/Sp052699.htm)</sup>。最近，英特尔发表了一篇论文和规范草案，探索一种简化的、仅64位模式的未来架构，同时声明将继续维持其对软件兼容性的长期承诺<sup>[18](https://www.intel.com/content/www/us/en/developer/articles/technical/envisioning-future-simplified-architecture.html)</sup>。关于自动CISC到RISC翻译的研究，包括与苹果Rosetta 2比较的语言模型引导转译，显示在跨越x86到ARM鸿沟移动代码方面的活跃工作<sup>[19](https://arxiv.org/abs/2506.14606)</sup>。

## References

1. [Instruction Set Architecture, MGU Encyclopedia](https://maloneuniversity.org/library/encyclopedia/computer-science/computer-architecture/instruction-set-architecture)
2. [Processor Components, CS 315 Computer Architecture, University of San Francisco](https://cs315-f25.cs.usfca.edu/lectures/11-cs315-2025-10-28-processor-components/)
3. [Instruction Set Architecture, CMSC 411 Computer Architecture, University of Maryland](https://www.cs.umd.edu/users/meesh/411/CA-online/chapter/instruction-set-architecture/index.html)
4. [ISAs and Assembly, CS 340, University of Illinois Grainger College of Engineering](https://courses.grainger.illinois.edu/cs340/sp2025/text/isa.html)
5. [risc-v ratified specifications library::risc-v ratified specifications library](https://docs.riscv.org/)
6. [Microarchitecture, IEEE Technology Navigator](https://technav.ieee.org/topic/microarchitecture/)
7. [CSE 30 Lecture 1, UC San Diego](https://cseweb.ucsd.edu/classes/fa96/cse30/lec1/)
8. [Instruction sets, IEEE Technology Navigator](https://technav.ieee.org/topic/instruction-sets/)
9. [RISC-V Ratified Specifications Library, Unprivileged ISA introduction](https://docs.riscv.org/reference/isa/v20240411/unpriv/intro.html)
10. [Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1: Basic Architecture](https://cdrdv2-public.intel.com/671436/253665-sdm-vol-1.pdf)
11. [Manuals for Intel 64 and IA-32 Architectures, Intel Developer Zone](https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html?wapkw=intel+64)
12. [Arm A-Profile Architecture Developments 2024, Arm Community](https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2024)
13. [Arm A-Profile Architecture Developments 2026, Arm Community](https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2026)
14. [The A64 ISA and compilers, Arm Community](https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/the-a64-isa-and-compilers)
15. [ISA Extension Naming Conventions, RISC-V Ratified Specifications Library](https://docs.riscv.org/reference/isa/unpriv/naming.html)
16. [Execution Model and Optimizing Compilation for the EM 2 Core ISA, CORE](https://fileserver-az.core.ac.uk/download/pdf/19879480.pdf)
17. [Intel, HP Reveal IA-64 Instruction Set Architecture, Intel press release (1999)](https://www.intel.com/pressroom/archive/releases/1999/Sp052699.htm)
18. [Envisioning a Simplified Intel Architecture, Intel Developer Zone](https://www.intel.com/content/www/us/en/developer/articles/technical/envisioning-future-simplified-architecture.html)
19. [Guaranteed Guess: A Language Modeling Approach for CISC-to-RISC Transpilation with Testing Guarantees, arXiv](https://arxiv.org/abs/2506.14606)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Sep 30, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Processors & processor engineering › Instruction set architectures

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/instruction-set-architecture

English original: https://www.edgepedia.org/instruction-set-architecture
