git subrepo pull (merge) --force deps/lightning
[pcsx_rearmed.git] / deps / lightning / include / lightning / jit_mips.h
index eb7d783..9791c29 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2019  Free Software Foundation, Inc.
+ * Copyright (C) 2012-2023  Free Software Foundation, Inc.
  *
  * This file is part of GNU lightning.
  *
@@ -25,6 +25,8 @@
 
 #if _MIPS_SIM != _ABIO32
 #    define NEW_ABI            1
+#else
+#    define NEW_ABI            0
 #endif
 
 /*
@@ -34,9 +36,9 @@
 typedef enum {
 #define jit_r(i)               (_V0 + (i))
 #if NEW_ABI
-#  define jit_r_num()          7
+#  define jit_r_num()          8
 #else
-#  define jit_r_num()          11
+#  define jit_r_num()          12
 #endif
 #define jit_v(i)               (_S0 + (i))
 #define jit_v_num()            8
@@ -55,6 +57,7 @@ typedef enum {
 #  define JIT_R4               _T6
 #  define JIT_R5               _T7
 #  define JIT_R6               _T8
+#  define JIT_R7               _T9
 #else
 #  define JIT_R2               _T0
 #  define JIT_R3               _T1
@@ -65,6 +68,7 @@ typedef enum {
 #  define JIT_R8               _T6
 #  define JIT_R9               _T7
 #  define JIT_R10              _T8
+#  define JIT_R11              _T9
 #endif
     _V0, _V1,
 #if !NEW_ABI
@@ -112,4 +116,23 @@ typedef enum {
     _NOREG,
 } jit_reg_t;
 
+typedef struct {
+    jit_uint32_t release       : 4;
+    /* set if lwc1, ldc1, swc1, sdc1, mtc1, mfc1, dmtc1, and dmfc1
+     * can be put in delay slot */
+    jit_uint32_t cop1_delay    : 1;
+    /* set if sll can be put in delay slot */
+    jit_uint32_t sll_delay     : 1;
+    /* set if lwl and lwr can be put in delay slot */
+    jit_uint32_t lwl_lwr_delay : 1;
+    /* generate special instructions for un{ld,st}*; ignored for mips 6
+     * that does not have unaligned load/store instructions. */
+    jit_uint32_t unaligned     : 1;
+} jit_cpu_t;
+
+/*
+ * Initialization
+ */
+extern jit_cpu_t               jit_cpu;
+
 #endif /* _jit_mips_h */