Skip to content

Commit 5549d79

Browse files
committed
Improve JIT compiler description
1 parent 8265e6a commit 5549d79

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

src/rv32_template.c

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@
33
* specification version 20191213.
44
*/
55

6-
/* This file is intended to serve as a template for both interpreter and JIT
7-
* code generation. To achieve this purpose, a domain-specific language (DSL)
8-
* is introduced, complemented by a C macro named 'RVOP'. Additionally,
9-
* a Python script efficiently traces code templates and automatically
10-
* generates the JIT code generator, thereby eliminating the need for manually
11-
* writing duplicated code.
6+
/* This file establishes a low-level instruction execution abstraction layer,
7+
* crucial for both the interpreter's instruction dispatching and the
8+
* execution of native functions written to memory. The JIT compiler currently
9+
* supports only x86-64 (x64) and Aarch64 (Arm64) architectures, which
10+
* simplifies the process due to their abundant registers and register-based
11+
* calling conventions. It effectively navigates the limitations associated
12+
* with self-modifying code.
13+
*
14+
* To accommodate the specific needs of these platforms, a highly selective
15+
* approach in practices and design is adopted. The file is designed as a
16+
* foundational template for code generation in both the interpreter and JIT
17+
* contexts. To facilitate this, a domain-specific language (DSL) is utilized,
18+
* augmented by a C macro named 'RVOP'. Furthermore, a Python script is employed
19+
* to convert code templates efficiently, enabling automatic generation of the
20+
* JIT code generator and thus eliminating the need for repetitive manual
21+
* coding.
1222
*
1323
* Example:
1424
*

0 commit comments

Comments
 (0)