mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #6360 from SachinVin/b
common\common_funcs.h: use __builtin_trap for Crash()
This commit is contained in:
		
						commit
						8c12eb4905
					
				
					 1 changed files with 8 additions and 13 deletions
				
			
		|  | @ -35,16 +35,16 @@ | ||||||
| #define CITRA_NO_INLINE __attribute__((noinline)) | #define CITRA_NO_INLINE __attribute__((noinline)) | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #ifndef _MSC_VER | #ifdef _MSC_VER | ||||||
| 
 | extern "C" { | ||||||
| #if CITRA_ARCH(x86_64) | __declspec(dllimport) void __stdcall DebugBreak(void); | ||||||
| #define Crash() __asm__ __volatile__("int $3") | } | ||||||
|  | #define Crash() DebugBreak() | ||||||
| #else | #else | ||||||
| #define Crash() exit(1) | #define Crash() __builtin_trap() | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #else // _MSC_VER
 | #ifdef _MSC_VER | ||||||
| 
 |  | ||||||
| #if (_MSC_VER < 1900) | #if (_MSC_VER < 1900) | ||||||
| // Function Cross-Compatibility
 | // Function Cross-Compatibility
 | ||||||
| #define snprintf _snprintf | #define snprintf _snprintf | ||||||
|  | @ -53,12 +53,7 @@ | ||||||
| // Locale Cross-Compatibility
 | // Locale Cross-Compatibility
 | ||||||
| #define locale_t _locale_t | #define locale_t _locale_t | ||||||
| 
 | 
 | ||||||
| extern "C" { | #endif // _MSC_VER
 | ||||||
| __declspec(dllimport) void __stdcall DebugBreak(void); |  | ||||||
| } |  | ||||||
| #define Crash() DebugBreak() |  | ||||||
| 
 |  | ||||||
| #endif // _MSC_VER ndef
 |  | ||||||
| 
 | 
 | ||||||
| // Generic function to get last error message.
 | // Generic function to get last error message.
 | ||||||
| // Call directly after the command or use the error num.
 | // Call directly after the command or use the error num.
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue