X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flightrec%2Foptimizer.h;h=c829028623a93aee469004bfd24fa7ef7a924e6d;hb=437b1e617808119c3a24a72c77cd2fa86a5d3220;hp=84a8fc9d10658ebf035a68ac515d081a762df495;hpb=70575e81838e2c8d842dd28c3fc7fbb91b395061;p=pcsx_rearmed.git diff --git a/deps/lightrec/optimizer.h b/deps/lightrec/optimizer.h index 84a8fc9d..c8290286 100644 --- a/deps/lightrec/optimizer.h +++ b/deps/lightrec/optimizer.h @@ -1,15 +1,6 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* - * Copyright (C) 2014-2020 Paul Cercueil - * - * 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 */ #ifndef __OPTIMIZER_H__ @@ -18,12 +9,18 @@ #include "disassembler.h" struct block; +struct opcode; _Bool opcode_reads_register(union code op, u8 reg); _Bool opcode_writes_register(union code op, u8 reg); _Bool has_delay_slot(union code op); _Bool load_in_delay_slot(union code op); +_Bool opcode_is_io(union code op); +_Bool is_unconditional_jump(union code c); +_Bool is_syscall(union code c); -int lightrec_optimize(struct block *block); +_Bool should_emulate(const struct opcode *op); + +int lightrec_optimize(struct lightrec_state *state, struct block *block); #endif /* __OPTIMIZER_H__ */