citra-emu
/
citra
Archived
1
0
Fork 0

Merge pull request #6360 from SachinVin/b

common\common_funcs.h:  use __builtin_trap for Crash()
This commit is contained in:
Mai 2023-03-21 21:55:35 -04:00 committed by GitHub
commit 8c12eb4905
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 13 deletions

View File

@ -35,16 +35,16 @@
#define CITRA_NO_INLINE __attribute__((noinline))
#endif
#ifndef _MSC_VER
#if CITRA_ARCH(x86_64)
#define Crash() __asm__ __volatile__("int $3")
#ifdef _MSC_VER
extern "C" {
__declspec(dllimport) void __stdcall DebugBreak(void);
}
#define Crash() DebugBreak()
#else
#define Crash() exit(1)
#define Crash() __builtin_trap()
#endif
#else // _MSC_VER
#ifdef _MSC_VER
#if (_MSC_VER < 1900)
// Function Cross-Compatibility
#define snprintf _snprintf
@ -53,12 +53,7 @@
// Locale Cross-Compatibility
#define locale_t _locale_t
extern "C" {
__declspec(dllimport) void __stdcall DebugBreak(void);
}
#define Crash() DebugBreak()
#endif // _MSC_VER ndef
#endif // _MSC_VER
// Generic function to get last error message.
// Call directly after the command or use the error num.