X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=deps%2Flightrec%2Flightrec.h;h=bd878c86e83db487048bb33e9d03d8c653b9bb58;hb=cb72ea130a5ef1b2f47691ed586ad48bb0c39269;hp=9613da3618830b5de02d994557dc8ed25aead2e5;hpb=ba3814c189d3bd2332b66fb6c633a7d028e618fe;p=pcsx_rearmed.git diff --git a/deps/lightrec/lightrec.h b/deps/lightrec/lightrec.h index 9613da36..bd878c86 100644 --- a/deps/lightrec/lightrec.h +++ b/deps/lightrec/lightrec.h @@ -28,6 +28,21 @@ extern "C" { # define __api #endif +#ifndef __cnst +# ifdef __GNUC__ +# define __cnst __attribute__((const)) +# else +# define __cnst +# endif +#endif +#ifndef __pure +# ifdef __GNUC__ +# define __pure __attribute__((pure)) +# else +# define __pure +# endif +#endif + typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; @@ -85,9 +100,11 @@ struct lightrec_mem_map { }; struct lightrec_ops { + void (*cop2_notify)(struct lightrec_state *state, u32 op, u32 data); void (*cop2_op)(struct lightrec_state *state, u32 op); void (*enable_ram)(struct lightrec_state *state, _Bool enable); _Bool (*hw_direct)(u32 kaddr, _Bool is_write, u8 size); + void (*code_inv)(void *addr, u32 len); }; struct lightrec_registers { @@ -117,7 +134,8 @@ __api void lightrec_set_invalidate_mode(struct lightrec_state *state, __api void lightrec_set_exit_flags(struct lightrec_state *state, u32 flags); __api u32 lightrec_exit_flags(struct lightrec_state *state); -__api struct lightrec_registers * lightrec_get_registers(struct lightrec_state *state); +__api __cnst struct lightrec_registers * +lightrec_get_registers(struct lightrec_state *state); __api u32 lightrec_current_cycle_count(const struct lightrec_state *state); __api void lightrec_reset_cycle_count(struct lightrec_state *state, u32 cycles);