00cc9309cb
de6e324bdseparate emu thread10d3daf86Roms List improvements95d202f37Let's make the rom list process on a separate thread so the emulator doesnt take ages to load.fc306967fWow the ROM Header was just completely busted. Game list view works nowbad1691eefuck this shit2b59e5f46game list in progressd26417b83remappable inputs in progressac4af8106inpute72abc240update readme430139dc9Qt6 frontend3080d4d45Fix this small bug too08cd13b85Cop0 unused functions do not actually pose a threat (as per manual). They don't do anything, so shall we.61bb4fb44make idle loop detection a little more specific with where the load goesb037de4c3SAZDFsdff12e81e73eneed to figure out why n64-systemtest loops indefinitely at some address that appears to be valid (i think it's me not invalidating the cache properly)204f0e13bidle skipping seems to work!cb8bb634asdkfjlasdf58e5c89c1Fix compilation issue on my machine (no idea)24fb2898eattempting more serious idle skipping214719577Place rsp.Step inside cached interpreter. Gains about 3 more fpsbb97dcc23mmmmm920b77d38wjkhasdfjhkasdf430ccdab4it's a start...4f42a673aCached interpreter plays Mario 64. Start looking into RSP as wellc9a030787idle skipping works!5fbda03cenew idea366637abaIdle skipping... maybe?609fa2fb0Cache instructions implemented but broken lmao. Commented out for nowe140a6d12- Stop using inheritance for CPU, instead use composition. - Introduce KAIZEN_JIT_ENABLED optional define instead of relying on __aarch64__ and the like. - More cache work68e613057prep cache impl811b4d809fix clang formatfda755f7didkd5024ebbfsmall MI refactor in preparation of (eventually) implementing the RDRAM interface properly694b45341Merge commit '206dcdedf195fb320913584180edb12c7731e396' as 'external/SDL'206dcdedfSquashed 'external/SDL/' content from commit 4d17b99d0a4d16e1cb4need to update sdl848b19920Fix compilation errordb61b5299Merge commit 'e94a94559f28e49678fbcf72199a5258137b0fe9' as 'external/imgui'e94a94559Squashed 'external/imgui/' content from commit 02e9b8cac52edb3757need to update imguic1a705e86Emulate weird JALR behaviour4b4c32f4bFix exception for "unusable COP1" in 4 instructions i missed accidentally (again)df5828142Bug putting 0s in the log everywheref8b580048Make isviewer a sink to file8241e9735Fix exception for "unusable COP1" in 4 instructions i missed accidentallyb29715f20small changesd9a620bc1make use of my new small utility library0d1aa938eAdd 'external/ircolib/' from commit 'ce3cd726c8df8388d554abf8bb55d55020eb4450'e64eb40b3Fuck git git-subtree-dir: external/ircolib git-subtree-split:de6e324bde
160 lines
4.8 KiB
C
160 lines
4.8 KiB
C
/* Compiler.h : Compiler specific defines and pragmas
|
|
2023-04-02 : Igor Pavlov : Public domain */
|
|
|
|
#ifndef ZIP7_INC_COMPILER_H
|
|
#define ZIP7_INC_COMPILER_H
|
|
|
|
#if defined(__clang__)
|
|
# define Z7_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
|
|
#endif
|
|
#if defined(__clang__) && defined(__apple_build_version__)
|
|
# define Z7_APPLE_CLANG_VERSION Z7_CLANG_VERSION
|
|
#elif defined(__clang__)
|
|
# define Z7_LLVM_CLANG_VERSION Z7_CLANG_VERSION
|
|
#elif defined(__GNUC__)
|
|
# define Z7_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
|
|
#endif
|
|
|
|
#ifdef _MSC_VER
|
|
#if !defined(__clang__) && !defined(__GNUC__)
|
|
#define Z7_MSC_VER_ORIGINAL _MSC_VER
|
|
#endif
|
|
#endif
|
|
|
|
#if defined(__MINGW32__) || defined(__MINGW64__)
|
|
#define Z7_MINGW
|
|
#endif
|
|
|
|
// #pragma GCC diagnostic ignored "-Wunknown-pragmas"
|
|
|
|
#ifdef __clang__
|
|
// padding size of '' with 4 bytes to alignment boundary
|
|
#pragma GCC diagnostic ignored "-Wpadded"
|
|
#endif
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
#ifdef UNDER_CE
|
|
#define RPC_NO_WINDOWS_H
|
|
/* #pragma warning(disable : 4115) // '_RPC_ASYNC_STATE' : named type definition in parentheses */
|
|
#pragma warning(disable : 4201) // nonstandard extension used : nameless struct/union
|
|
#pragma warning(disable : 4214) // nonstandard extension used : bit field types other than int
|
|
#endif
|
|
|
|
#if defined(_MSC_VER) && _MSC_VER >= 1800
|
|
#pragma warning(disable : 4464) // relative include path contains '..'
|
|
#endif
|
|
|
|
// == 1200 : -O1 : for __forceinline
|
|
// >= 1900 : -O1 : for printf
|
|
#pragma warning(disable : 4710) // function not inlined
|
|
|
|
#if _MSC_VER < 1900
|
|
// winnt.h: 'Int64ShllMod32'
|
|
#pragma warning(disable : 4514) // unreferenced inline function has been removed
|
|
#endif
|
|
|
|
#if _MSC_VER < 1300
|
|
// #pragma warning(disable : 4702) // unreachable code
|
|
// Bra.c : -O1:
|
|
#pragma warning(disable : 4714) // function marked as __forceinline not inlined
|
|
#endif
|
|
|
|
/*
|
|
#if _MSC_VER > 1400 && _MSC_VER <= 1900
|
|
// strcat: This function or variable may be unsafe
|
|
// sysinfoapi.h: kit10: GetVersion was declared deprecated
|
|
#pragma warning(disable : 4996)
|
|
#endif
|
|
*/
|
|
|
|
#if _MSC_VER > 1200
|
|
// -Wall warnings
|
|
|
|
#pragma warning(disable : 4711) // function selected for automatic inline expansion
|
|
#pragma warning(disable : 4820) // '2' bytes padding added after data member
|
|
|
|
#if _MSC_VER >= 1400 && _MSC_VER < 1920
|
|
// 1400: string.h: _DBG_MEMCPY_INLINE_
|
|
// 1600 - 191x : smmintrin.h __cplusplus'
|
|
// is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
|
|
#pragma warning(disable : 4668)
|
|
|
|
// 1400 - 1600 : WinDef.h : 'FARPROC' :
|
|
// 1900 - 191x : immintrin.h: _readfsbase_u32
|
|
// no function prototype given : converting '()' to '(void)'
|
|
#pragma warning(disable : 4255)
|
|
#endif
|
|
|
|
#if _MSC_VER >= 1914
|
|
// Compiler will insert Spectre mitigation for memory load if /Qspectre switch specified
|
|
#pragma warning(disable : 5045)
|
|
#endif
|
|
|
|
#endif // _MSC_VER > 1200
|
|
#endif // _MSC_VER
|
|
|
|
|
|
#if defined(__clang__) && (__clang_major__ >= 4)
|
|
#define Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE \
|
|
_Pragma("clang loop unroll(disable)") \
|
|
_Pragma("clang loop vectorize(disable)")
|
|
#define Z7_ATTRIB_NO_VECTORIZE
|
|
#elif defined(__GNUC__) && (__GNUC__ >= 5)
|
|
#define Z7_ATTRIB_NO_VECTORIZE __attribute__((optimize("no-tree-vectorize")))
|
|
// __attribute__((optimize("no-unroll-loops")));
|
|
#define Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
|
|
#elif defined(_MSC_VER) && (_MSC_VER >= 1920)
|
|
#define Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE \
|
|
_Pragma("loop( no_vector )")
|
|
#define Z7_ATTRIB_NO_VECTORIZE
|
|
#else
|
|
#define Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
|
|
#define Z7_ATTRIB_NO_VECTORIZE
|
|
#endif
|
|
|
|
#if defined(MY_CPU_X86_OR_AMD64) && ( \
|
|
defined(__clang__) && (__clang_major__ >= 4) \
|
|
|| defined(__GNUC__) && (__GNUC__ >= 5))
|
|
#define Z7_ATTRIB_NO_SSE __attribute__((__target__("no-sse")))
|
|
#else
|
|
#define Z7_ATTRIB_NO_SSE
|
|
#endif
|
|
|
|
#define Z7_ATTRIB_NO_VECTOR \
|
|
Z7_ATTRIB_NO_VECTORIZE \
|
|
Z7_ATTRIB_NO_SSE
|
|
|
|
|
|
#if defined(__clang__) && (__clang_major__ >= 8) \
|
|
|| defined(__GNUC__) && (__GNUC__ >= 1000) \
|
|
/* || defined(_MSC_VER) && (_MSC_VER >= 1920) */
|
|
// GCC is not good for __builtin_expect()
|
|
#define Z7_LIKELY(x) (__builtin_expect((x), 1))
|
|
#define Z7_UNLIKELY(x) (__builtin_expect((x), 0))
|
|
// #define Z7_unlikely [[unlikely]]
|
|
// #define Z7_likely [[likely]]
|
|
#else
|
|
#define Z7_LIKELY(x) (x)
|
|
#define Z7_UNLIKELY(x) (x)
|
|
// #define Z7_likely
|
|
#endif
|
|
|
|
|
|
#if (defined(Z7_CLANG_VERSION) && (Z7_CLANG_VERSION >= 36000))
|
|
#define Z7_DIAGNOSCTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER \
|
|
_Pragma("GCC diagnostic push") \
|
|
_Pragma("GCC diagnostic ignored \"-Wreserved-macro-identifier\"")
|
|
#define Z7_DIAGNOSCTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER \
|
|
_Pragma("GCC diagnostic pop")
|
|
#else
|
|
#define Z7_DIAGNOSCTIC_IGNORE_BEGIN_RESERVED_MACRO_IDENTIFIER
|
|
#define Z7_DIAGNOSCTIC_IGNORE_END_RESERVED_MACRO_IDENTIFIER
|
|
#endif
|
|
|
|
#define UNUSED_VAR(x) (void)x;
|
|
/* #define UNUSED_VAR(x) x=x; */
|
|
|
|
#endif
|