lightrec: Add custom lightrec-config.h
authorPaul Cercueil <paul@crapouillou.net>
Sat, 19 Feb 2022 22:02:50 +0000 (22:02 +0000)
committerPaul Cercueil <paul@crapouillou.net>
Mon, 21 Feb 2022 23:26:35 +0000 (23:26 +0000)
Add our own lightrec-config.h outside the deps/lightrec/ tree, so that
it won't be removed when the subrepo is updated.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Makefile
include/lightrec/lightrec-config.h [new file with mode: 0644]

index f21b823..fc04669 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -88,7 +88,7 @@ libpcsxcore/psxbios.o: CFLAGS += -Wno-nonnull
 
 # dynarec
 ifeq "$(DYNAREC)" "lightrec"
-CFLAGS += -Ideps/lightning/include -Ideps/lightrec \
+CFLAGS += -Ideps/lightning/include -Ideps/lightrec -Iinclude/lightrec \
                  -DLIGHTREC -DLIGHTREC_STATIC
 OBJS += libpcsxcore/lightrec/plugin.o
 OBJS += deps/lightning/lib/jit_disasm.o \
diff --git a/include/lightrec/lightrec-config.h b/include/lightrec/lightrec-config.h
new file mode 100644 (file)
index 0000000..bbb2329
--- /dev/null
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2019-2021 Paul Cercueil <paul@crapouillou.net>
+ */
+
+#ifndef __LIGHTREC_CONFIG_H__
+#define __LIGHTREC_CONFIG_H__
+
+#define ENABLE_THREADED_COMPILER 1
+#define ENABLE_FIRST_PASS 1
+#define ENABLE_DISASSEMBLER 0
+#define ENABLE_TINYMM 0
+
+#define HAS_DEFAULT_ELM 1
+
+#define OPT_REMOVE_DIV_BY_ZERO_SEQ 1
+#define OPT_REPLACE_MEMSET 1
+#define OPT_DETECT_IMPOSSIBLE_BRANCHES 1
+#define OPT_TRANSFORM_OPS 1
+#define OPT_LOCAL_BRANCHES 1
+#define OPT_SWITCH_DELAY_SLOTS 1
+#define OPT_FLAG_STORES 1
+#define OPT_FLAG_IO 1
+#define OPT_FLAG_MULT_DIV 1
+#define OPT_EARLY_UNLOAD 1
+
+#endif /* __LIGHTREC_CONFIG_H__ */
+