ruapu SyterKit v0.2.6.1 support (#56)
This commit is contained in:
		
							parent
							
								
									fc24366512
								
							
						
					
					
						commit
						2008665a13
					
				| @ -33,7 +33,7 @@ int main() | ||||
| ``` | ||||
| 
 | ||||
| </td></tr> | ||||
| <tr><td>OS</td><td>✅ Windows<br/>✅ Linux<br/>✅ macOS<br/>✅ Android<br/>✅ iOS<br/>✅ FreeBSD<br/>✅ NetBSD<br/>✅ OpenBSD</td></tr> | ||||
| <tr><td>OS</td><td>✅ Windows<br/>✅ Linux<br/>✅ macOS<br/>✅ Android<br/>✅ iOS<br/>✅ FreeBSD<br/>✅ NetBSD<br/>✅ OpenBSD<br/>✅ SyterKit</td></tr> | ||||
| <tr><td>Compiler</td><td>✅ GCC<br/>✅ Clang<br/>✅ MSVC<br/>✅ MinGW</td></tr> | ||||
| </table> | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										31
									
								
								ruapu.h
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								ruapu.h
									
									
									
									
									
								
							| @ -19,12 +19,11 @@ const char* const* ruapu_rua(); | ||||
| 
 | ||||
| #ifdef RUAPU_IMPLEMENTATION | ||||
| 
 | ||||
| #include <setjmp.h> | ||||
| #include <string.h> | ||||
| 
 | ||||
| #if defined _WIN32 | ||||
| 
 | ||||
| #include <windows.h> | ||||
| #include <setjmp.h> | ||||
| #include <string.h> | ||||
| 
 | ||||
| #if WINAPI_FAMILY == WINAPI_FAMILY_APP | ||||
| // uwp does not support veh  :(
 | ||||
| @ -74,6 +73,8 @@ static int ruapu_detect_isa(const void* some_inst) | ||||
| 
 | ||||
| #elif defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ | ||||
| #include <signal.h> | ||||
| #include <setjmp.h> | ||||
| #include <string.h> | ||||
| 
 | ||||
| static int g_ruapu_sigill_caught = 0; | ||||
| static sigjmp_buf g_ruapu_jmpbuf; | ||||
| @ -110,7 +111,27 @@ static int ruapu_detect_isa(ruapu_some_inst some_inst) | ||||
|     return g_ruapu_sigill_caught ? 0 : 1; | ||||
| } | ||||
| 
 | ||||
| #endif // defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__
 | ||||
| #elif defined __SYTERKIT__  | ||||
| 
 | ||||
| typedef void (*ruapu_some_inst)(); | ||||
| #include <mmu.h> | ||||
| 
 | ||||
| static int g_ruapu_sigill_caught = 0; | ||||
| 
 | ||||
| void arm32_do_undefined_instruction(struct arm_regs_t *regs) | ||||
| { | ||||
|     g_ruapu_sigill_caught = 1; | ||||
|     regs->pc += 4; | ||||
| } | ||||
| 
 | ||||
| static int ruapu_detect_isa(ruapu_some_inst some_inst) | ||||
| { | ||||
|     g_ruapu_sigill_caught = 0; | ||||
|     some_inst(); | ||||
|     return g_ruapu_sigill_caught ? 0 : 1; | ||||
| } | ||||
| 
 | ||||
| #endif // defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __SYTERKIT__
 | ||||
| 
 | ||||
| #if defined _WIN32 | ||||
| 
 | ||||
| @ -395,7 +416,7 @@ static void ruapu_detect_openrisc_isa() | ||||
| 
 | ||||
| void ruapu_init() | ||||
| { | ||||
| #if defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ | ||||
| #if defined _WIN32 || defined __ANDROID__ || defined __linux__ || defined __APPLE__ || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __SYTERKIT__ | ||||
|     size_t j = 0; | ||||
|     for (size_t i = 0; i < sizeof(g_ruapu_isa_map) / sizeof(g_ruapu_isa_map[0]); i++) | ||||
|     { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user