1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 * Copyright (C) 2019-2021 Paul Cercueil <paul@crapouillou.net>
6 #ifndef __LIGHTREC_RECOMPILER_H__
7 #define __LIGHTREC_RECOMPILER_H__
10 struct lightrec_state;
13 struct recompiler *lightrec_recompiler_init(struct lightrec_state *state);
14 void lightrec_free_recompiler(struct recompiler *rec);
15 int lightrec_recompiler_add(struct recompiler *rec, struct block *block);
16 void lightrec_recompiler_remove(struct recompiler *rec, struct block *block);
18 void * lightrec_recompiler_run_first_pass(struct lightrec_state *state,
19 struct block *block, u32 *pc);
21 void lightrec_code_alloc_lock(struct lightrec_state *state);
22 void lightrec_code_alloc_unlock(struct lightrec_state *state);
24 #endif /* __LIGHTREC_RECOMPILER_H__ */