File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1864,8 +1864,10 @@ static void code_cache_flush(struct jit_state *state, riscv_t *rv)
1864
1864
state -> offset = state -> org_size ;
1865
1865
state -> n_blocks = 0 ;
1866
1866
set_reset (& state -> set );
1867
- jit_cache_clear (rv -> jit_cache );
1868
1867
clear_cache_hot (rv -> block_cache , (clear_func_t ) clear_hot );
1868
+ #if RV32_HAS (T2C )
1869
+ jit_cache_clear (rv -> jit_cache );
1870
+ #endif
1869
1871
return ;
1870
1872
}
1871
1873
Original file line number Diff line number Diff line change @@ -290,11 +290,11 @@ riscv_t *rv_create(riscv_user_t rv_attr)
290
290
mpool_create (sizeof (chain_entry_t ) << BLOCK_IR_MAP_CAPACITY_BITS ,
291
291
sizeof (chain_entry_t ));
292
292
rv -> jit_state = jit_state_init (CODE_CACHE_SIZE );
293
- rv -> jit_cache = jit_cache_init ();
294
293
rv -> block_cache = cache_create (BLOCK_MAP_CAPACITY_BITS );
295
294
assert (rv -> block_cache );
296
295
#if RV32_HAS (T2C )
297
296
rv -> quit = false;
297
+ rv -> jit_cache = jit_cache_init ();
298
298
/* prepare wait queue. */
299
299
pthread_mutex_init (& rv -> wait_queue_lock , NULL );
300
300
INIT_LIST_HEAD (& rv -> wait_queue );
@@ -389,10 +389,10 @@ void rv_delete(riscv_t *rv)
389
389
rv -> quit = true;
390
390
pthread_join (t2c_thread , NULL );
391
391
pthread_mutex_destroy (& rv -> wait_queue_lock );
392
+ jit_cache_exit (rv -> jit_cache );
392
393
#endif
393
394
mpool_destroy (rv -> chain_entry_mp );
394
395
jit_state_exit (rv -> jit_state );
395
- jit_cache_exit (rv -> jit_cache );
396
396
cache_free (rv -> block_cache );
397
397
#endif
398
398
free (rv );
You can’t perform that action at this time.
0 commit comments