libretro: adjust psxclock description
[pcsx_rearmed.git] / deps / lightrec / blockcache.h
index 0c57ffc..2e55ff6 100644 (file)
@@ -1,15 +1,6 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
- * Copyright (C) 2014 Paul Cercueil <paul@crapouillou.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
+ * Copyright (C) 2014-2021 Paul Cercueil <paul@crapouillou.net>
  */
 
 #ifndef __BLOCKCACHE_H__
 struct blockcache;
 
 struct block * lightrec_find_block(struct blockcache *cache, u32 pc);
+struct block * lightrec_find_block_from_lut(struct blockcache *cache,
+                                           u16 lut_entry, u32 addr_in_block);
+u16 lightrec_get_lut_entry(const struct block *block);
+
 void lightrec_register_block(struct blockcache *cache, struct block *block);
 void lightrec_unregister_block(struct blockcache *cache, struct block *block);
 
@@ -27,9 +22,9 @@ struct blockcache * lightrec_blockcache_init(struct lightrec_state *state);
 void lightrec_free_block_cache(struct blockcache *cache);
 
 u32 lightrec_calculate_block_hash(const struct block *block);
-_Bool lightrec_block_is_outdated(struct block *block);
+_Bool lightrec_block_is_outdated(struct lightrec_state *state, struct block *block);
 
-void lightrec_mark_for_recompilation(struct blockcache *cache,
-                                    struct block *block);
+void lightrec_remove_outdated_blocks(struct blockcache *cache,
+                                    const struct block *except);
 
 #endif /* __BLOCKCACHE_H__ */