mirror of
				https://github.com/yuzu-emu/unicorn.git
				synced 2025-11-04 13:05:03 +00:00 
			
		
		
		
	RISC-V: linux-user support for RVE ABI
This change checks elf_flags for EF_RISCV_RVE and if present uses the RVE linux syscall ABI which uses t0 for the syscall number instead of a7. Warn and exit if a non-RVE ABI binary is run on a cpu with the RVE extension as it is incompatible. Backports relevant parts of 5836c3eccedb6dfab16b8f606f2de24b8938b69c from qemu
This commit is contained in:
		
							parent
							
								
									2e0c040062
								
							
						
					
					
						commit
						bd3e9ebaea
					
				| 
						 | 
				
			
			@ -125,6 +125,10 @@ struct CPURISCVState {
 | 
			
		|||
 | 
			
		||||
    uint32_t features;
 | 
			
		||||
 | 
			
		||||
#ifdef CONFIG_USER_ONLY
 | 
			
		||||
    uint32_t elf_flags;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef CONFIG_USER_ONLY
 | 
			
		||||
    target_ulong priv;
 | 
			
		||||
    target_ulong resetvec;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,4 +10,5 @@
 | 
			
		|||
#define xA4 14
 | 
			
		||||
#define xA5 15
 | 
			
		||||
#define xA6 16
 | 
			
		||||
#define xA7 17  /* syscall number goes here */
 | 
			
		||||
#define xA7 17  /* syscall number for RVI ABI */
 | 
			
		||||
#define xT0 5   /* syscall number for RVE ABI */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue