lightrec: Increase size of hw registers area
[pcsx_rearmed.git] / deps / lightrec / lightning-wrapper.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 /*
3  * Copyright (C) 2022 Paul Cercueil <paul@crapouillou.net>
4  */
5
6 #ifndef __LIGHTNING_WRAPPER_H__
7 #define __LIGHTNING_WRAPPER_H__
8
9 #include <lightning.h>
10
11 #if __WORDSIZE == 32
12
13 #define jit_ldxi_ui(u,v,w)      jit_ldxi_i(u,v,w)
14 #define jit_stxi_ui(u,v,w)      jit_stxi_i(u,v,w)
15 #define jit_extr_i(u,v)         jit_movr(u,v)
16 #define jit_extr_ui(u,v)        jit_movr(u,v)
17 #define jit_retval_ui(u)        jit_retval(u)
18 #define jit_getarg_ui(u,v)      jit_getarg_i(u,v)
19
20 #endif
21
22 #define jit_b()                 jit_beqr(0, 0)
23
24 #if defined(__sh__)
25 #define jit_add_state(u,v)                                              \
26         do {                                                            \
27                 jit_new_node_ww(jit_code_movr,_R0,LIGHTREC_REG_STATE);  \
28                 jit_new_node_www(jit_code_addr,u,v,_R0);                \
29         } while (0)
30 #else
31 #define jit_add_state(u,v)      jit_addr(u,v,LIGHTREC_REG_STATE)
32 #endif
33
34 #endif /* __LIGHTNING_WRAPPER_H__ */