Skip to content

Commit 37daa23

Browse files
committed
Add comments
1 parent 2056e02 commit 37daa23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/jit.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ typedef void (*exec_block_func_t)(riscv_t *rv, uintptr_t);
5353
#if RV32_HAS(T2C)
5454
void t2c_compile(riscv_t *, block_t *);
5555
typedef void (*exec_t2c_func_t)(riscv_t *);
56-
#endif
5756

5857
#if RV32_HAS(JIT_CACHE)
58+
/* The jit-cache records the program counters and the entries of executable
59+
* instructions generated by T2C. Like hardware cache, the old jit-cache will be
60+
* overridden by the new one which uses the same slot.
61+
*/
5962
#define MAX_JIT_CACHE_TABLE_ENTRIES (1 << 12)
6063

6164
struct jit_cache {
@@ -68,3 +71,4 @@ void jit_cache_exit(struct jit_cache *cache);
6871
void jit_cache_update(struct jit_cache *cache, uint32_t pc, void *entry);
6972
void jit_cache_clear(struct jit_cache *cache);
7073
#endif
74+
#endif

0 commit comments

Comments
 (0)