After eight years of development, my patch implementing a RISC-V JIT backend for PyPy was merged upstream in 2024. This work is now included in the PyPy v7.3.17 release in this August. To share my journey and my insights, I decided to write this article.
Tag | compiler
-
-
Count Trailing Zeros
How to count the number of trailing zeros of an integer? The simplest way is to use the built-in function
__builtin_ctz()
:uint64_t count(uint64_t n) { return __builtin_ctz(n); }
What will happen if we don't have
__builtin_ctz()
? If we have another built-in function__popcount()
, which can compute the Hamming weight (the … -
RISC-V Microprocessor
RISC-V is an instruction set architecture (ISA) released by UC Berkeley. Besides, a high performance, power efficient, and royalty-free open source implementation Rocket Chip is available.
RISC-V was developed by Krste Asanović and David A. Patterson. In their technical report, they claimed that an open instruction set can benefit both …