This report makes the case that a well-designed Reduced Instruction Set Computer (RISC) can match, and even exceed, the performance and code density of existing commercial Complex Instruction Set Computers (CISC) while maintaining the simplicity and cost-effectiveness that underpins the original RISC goals.
We begin by comparing the dynamic instruction counts and dynamic instruction bytes fetched for the popular proprietary ARMv7, ARMv8, IA-32, and x86-64 Instruction Set Architectures (ISAs) against the free and open RISC-V RV64G and RV64GC ISAs when running the SPEC CINT2006 benchmark suite. RISC-V was designed as a very small ISA to support a wide range of implementations, and has a less mature compiler toolchain. However, we observe that on SPEC CINT2006 RV64G executes on average 16% more instructions than x86-64, 3% more instructions than IA-32, 9% more instructions than ARMv8, but 4% fewer instructions than ARMv7.
CISC x86 implementations break up complex instructions into smaller internal RISC-like micro-ops, and the RV64G instruction count is within 2% of the x86-64 retired micro-op count. RV64GC, the compressed variant of RV64G, is the densest ISA studied, fetching 8% fewer dynamic instruction bytes than x86-64. We observed that much of the increased RISC-V instruction count is due to a small set of common multi-instruction idioms.
Exploiting this fact, the RV64G and RV64GC effective instruction count can be reduced by 5.4% on average by leveraging macro-op fusion. Combining the compressed RISC-V ISA extension with macro-op fusion provides both the densest ISA and the fewest dynamic operations retired per program, reducing the motivation to add more instructions to the ISA. This approach retains a single simple ISA suitable for both low-end and high-end implementations, where high-end implementations can boost performance through microarchitectural techniques.
随着RISC-V(一种开源ISA)的广泛普及,针对特定国防需求的定制硬件安全解决方案越来越受欢迎。这些解决方案通常需要专门的编译器,可以将元数据(称为标签)插入到生成的二进制文件中,和/或使用新指令扩展RISC-V ISA。开发这样的编译器可能是一个冗长而耗时的过程。在本文中,我们提出了COGENT,一个通用的指令标记生成器的RISC-V架构。COGENT能够将可配置和可变宽度(1到20位)的标记与每个指令相关联。它还能够发出对控制流完整性(CFI)解决方案的实现至关重要的标签。COGENT将所有标记和标签编码为nop指令,从而提供完全的向后兼容性。我们在SPEC CPU 2017基准测试套件的一个程序子集上评估了COGENT,并报告了最低和最高标签覆盖水平的二进制大小分别增加了29.3%和18.27%。此外,我们在COTS RISC-V未修改的硬件上执行标记程序,发现最低和最高覆盖级别的执行时间开销(相对于向后兼容性)分别为13.4%和5.72%。最后,使用案例研究,我们提出了可能的用例场景,COGENT可以应用。
National Institute of Science Education and Research(国家科学教育与研究所);Sri Sri University(斯里斯里大学);Gandhi Institute of Engineering and Technology University(甘地工程技术学院大学);Homi Bhabha National Institute(霍米·巴巴国家研究所)