File tree Expand file tree Collapse file tree 2 files changed +25
-25
lines changed Expand file tree Collapse file tree 2 files changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -2026,28 +2026,3 @@ void jit_state_exit(struct jit_state *state)
2026
2026
free (state -> jumps );
2027
2027
free (state );
2028
2028
}
2029
-
2030
- #if RV32_HAS (JIT_CACHE )
2031
- struct jit_cache * jit_cache_init ()
2032
- {
2033
- return calloc (MAX_JIT_CACHE_TABLE_ENTRIES , sizeof (struct jit_cache ));
2034
- }
2035
-
2036
- void jit_cache_exit (struct jit_cache * cache )
2037
- {
2038
- free (cache );
2039
- }
2040
-
2041
- void jit_cache_update (struct jit_cache * cache , uint32_t pc , void * entry )
2042
- {
2043
- uint32_t pos = pc & (MAX_JIT_CACHE_TABLE_ENTRIES - 1 );
2044
-
2045
- cache [pos ].pc = pc ;
2046
- cache [pos ].entry = entry ;
2047
- }
2048
-
2049
- void jit_cache_clear (struct jit_cache * cache )
2050
- {
2051
- memset (cache , 0 , MAX_JIT_CACHE_TABLE_ENTRIES * sizeof (struct jit_cache ));
2052
- }
2053
- #endif
Original file line number Diff line number Diff line change @@ -314,3 +314,28 @@ void t2c_compile(riscv_t *rv, block_t *block)
314
314
jit_cache_update (rv -> jit_cache , block -> pc_start , block -> func );
315
315
block -> hot2 = true;
316
316
}
317
+
318
+ #if RV32_HAS (JIT_CACHE )
319
+ struct jit_cache * jit_cache_init ()
320
+ {
321
+ return calloc (MAX_JIT_CACHE_TABLE_ENTRIES , sizeof (struct jit_cache ));
322
+ }
323
+
324
+ void jit_cache_exit (struct jit_cache * cache )
325
+ {
326
+ free (cache );
327
+ }
328
+
329
+ void jit_cache_update (struct jit_cache * cache , uint32_t pc , void * entry )
330
+ {
331
+ uint32_t pos = pc & (MAX_JIT_CACHE_TABLE_ENTRIES - 1 );
332
+
333
+ cache [pos ].pc = pc ;
334
+ cache [pos ].entry = entry ;
335
+ }
336
+
337
+ void jit_cache_clear (struct jit_cache * cache )
338
+ {
339
+ memset (cache , 0 , MAX_JIT_CACHE_TABLE_ENTRIES * sizeof (struct jit_cache ));
340
+ }
341
+ #endif
You can’t perform that action at this time.
0 commit comments