什么是指令集架构?
What Is an Instruction Set Architecture?
指令集体系结构(ISA)是计算机抽象模型的一部分,用于定义软件如何控制CPU。ISA 充当硬件和软件之间的接口,指定处理器能够执行的操作以及如何完成。(就是说,ISA给定了可以在目标机器上执行的指令的集合)
An Instruction Set Architecture (ISA) is part of the abstract model of a computer that defines how the CPU is controlled by the software. The ISA acts as an interface between the hardware and the software, specifying both what the processor is capable of doing as well as how it gets done.
ISA 提供了用户能够与硬件交互的唯一方法。它可以被视为程序员的开发指南,因为它是汇编语言程序员,编译器编写者和应用程序程序员针对一个新的开发平台上进行开发前必然会参考的资料。(要向机器发布指令,总得看看支持哪些指令叭)
The ISA provides the only way through which a user is able to interact with the hardware. It can be viewed as a programmer’s manual because it’s the portion of the machine that’s visible to the assembly language programmer, the compiler writer, and the application programmer.
从内容上来看,ISA 定义了支持的数据类型、寄存器、硬件如何管理主内存、关键功能(如虚拟内存)、微处理器可以执行哪些指令以及多个 ISA 实现的输入/输出模型。可以通过添加指令或其他功能,或者通过添加对较大地址和数据值的支持来扩展 ISA。(这个用法类似于拓展地址空间?大概是,我也不清楚这方面的内容哈)
。
The ISA defines the supported data types, the registers, how the hardware manages main memory, key features (such as virtual memory), which instructions a microprocessor can execute, and the input/output model of multiple ISA implementations. The ISA can be extended by adding instructions or other capabilities, or by adding support for larger addresses and data values.
为什么说指令集架构很重要?
Why the ISA Is Important?
了解指令集可以做什么以及编译器如何使用这些指令可以帮助开发人员编写更有效的代码。它还可以帮助他们理解编译器的输出(比如编译器生成的结果应该是什么,或者反过来,编译器为什么输出这些结果),这有助于软件调试(比如看反汇编,检查寄存器级别的操作是不是符合预期)。
Understanding what the instruction set can do and how the compiler makes use of those instructions can help developers write more efficient code. It can also help them understand the output of the compiler which can be useful for debugging.
Arm 正在准备开放 Cortex M 内核指令集架构。通过允许被许可方构建自己的自定义指令,开发人员能够对特定的工作负载进行加速。Arm ISA 系列允许开发人员编写符合 Arm 规范的软件和固件。符合规范的固件能够运行在任何基于 Arm 的处理器上。
Arm is opening its instruction set architecture for Cortex M cores. By allowing licensees to build their own custom instructions, developers are able to accelerate specialized workloads. The Arm ISA family allows developers to write software and firmware that conforms to the Arm specifications, secure in the knowledge that any Arm-based processor will execute it in the same way.