libretro: adjust psxclock description
[pcsx_rearmed.git] / deps / lightrec / blockcache.h
CommitLineData
98fa08a5 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
d16005f8 2/*
98fa08a5 3 * Copyright (C) 2014-2021 Paul Cercueil <paul@crapouillou.net>
d16005f8
PC
4 */
5
6#ifndef __BLOCKCACHE_H__
7#define __BLOCKCACHE_H__
8
9#include "lightrec.h"
10
11struct blockcache;
12
13struct block * lightrec_find_block(struct blockcache *cache, u32 pc);
98fa08a5
PC
14struct block * lightrec_find_block_from_lut(struct blockcache *cache,
15 u16 lut_entry, u32 addr_in_block);
16u16 lightrec_get_lut_entry(const struct block *block);
17
d16005f8
PC
18void lightrec_register_block(struct blockcache *cache, struct block *block);
19void lightrec_unregister_block(struct blockcache *cache, struct block *block);
20
21struct blockcache * lightrec_blockcache_init(struct lightrec_state *state);
22void lightrec_free_block_cache(struct blockcache *cache);
23
24u32 lightrec_calculate_block_hash(const struct block *block);
98fa08a5 25_Bool lightrec_block_is_outdated(struct lightrec_state *state, struct block *block);
d16005f8 26
d8b04acd
PC
27void lightrec_remove_outdated_blocks(struct blockcache *cache,
28 const struct block *except);
29
d16005f8 30#endif /* __BLOCKCACHE_H__ */