aboutsummaryrefslogtreecommitdiff
path: root/deps/lightrec/blockcache.h
diff options
context:
space:
mode:
authorPaul Cercueil2020-01-30 12:34:17 -0300
committerPaul Cercueil2020-02-08 11:44:52 -0300
commitd16005f843cd28ae90f091bd4e39a90b355e1d45 (patch)
treeed765396a7abf5cf7cff244397c19d7b7b0a4dbe /deps/lightrec/blockcache.h
parent4a71579b757d3a2eb6902c84391f429838ad4912 (diff)
downloadpcsx_rearmed-d16005f843cd28ae90f091bd4e39a90b355e1d45.tar.gz
pcsx_rearmed-d16005f843cd28ae90f091bd4e39a90b355e1d45.tar.bz2
pcsx_rearmed-d16005f843cd28ae90f091bd4e39a90b355e1d45.zip
git subrepo clone https://github.com/pcercuei/lightrec.git deps/lightrec
subrepo: subdir: "deps/lightrec" merged: "6c69e10" upstream: origin: "https://github.com/pcercuei/lightrec.git" branch: "master" commit: "6c69e10" git-subrepo: version: "0.4.1" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "a04d8c2"
Diffstat (limited to 'deps/lightrec/blockcache.h')
-rw-r--r--deps/lightrec/blockcache.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/deps/lightrec/blockcache.h b/deps/lightrec/blockcache.h
new file mode 100644
index 0000000..0c57ffc
--- /dev/null
+++ b/deps/lightrec/blockcache.h
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+#ifndef __BLOCKCACHE_H__
+#define __BLOCKCACHE_H__
+
+#include "lightrec.h"
+
+struct blockcache;
+
+struct block * lightrec_find_block(struct blockcache *cache, u32 pc);
+void lightrec_register_block(struct blockcache *cache, struct block *block);
+void lightrec_unregister_block(struct blockcache *cache, struct block *block);
+
+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);
+
+void lightrec_mark_for_recompilation(struct blockcache *cache,
+ struct block *block);
+
+#endif /* __BLOCKCACHE_H__ */