mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	dyncom: Implement missing shifts in ScaledRegisterPostIndexed, etc
This commit is contained in:
		
							parent
							
								
									1cb31f4f06
								
							
						
					
					
						commit
						a873f157d0
					
				
					 1 changed files with 33 additions and 7 deletions
				
			
		|  | @ -410,10 +410,21 @@ void LnSWoUB(ScaledRegisterPreIndexed)(arm_processor *cpu, unsigned int inst, un | |||
|         } | ||||
|         break; | ||||
|     case 2: | ||||
|         DEBUG_MSG; | ||||
|         if (shift_imm == 0) { // ASR #32
 | ||||
|             if (BIT(rm, 31) == 1) | ||||
|                 index = 0xFFFFFFFF; | ||||
|             else | ||||
|                 index = 0; | ||||
|         } else { | ||||
|             index = static_cast<int>(rm) >> shift_imm; | ||||
|         } | ||||
|         break; | ||||
|     case 3: | ||||
|         DEBUG_MSG; | ||||
|         if (shift_imm == 0) { | ||||
|             index = (cpu->CFlag << 31) | (rm >> 1); | ||||
|         } else { | ||||
|             index = ROTATE_RIGHT_32(rm, shift_imm); | ||||
|         } | ||||
|         break; | ||||
|     } | ||||
| 
 | ||||
|  | @ -449,10 +460,21 @@ void LnSWoUB(ScaledRegisterPostIndexed)(arm_processor *cpu, unsigned int inst, u | |||
|         } | ||||
|         break; | ||||
|     case 2: | ||||
|         DEBUG_MSG; | ||||
|         if (shift_imm == 0) { // ASR #32
 | ||||
|             if (BIT(rm, 31) == 1) | ||||
|                 index = 0xFFFFFFFF; | ||||
|             else | ||||
|                 index = 0; | ||||
|         } else { | ||||
|             index = static_cast<int>(rm) >> shift_imm; | ||||
|         } | ||||
|         break; | ||||
|     case 3: | ||||
|         DEBUG_MSG; | ||||
|         if (shift_imm == 0) { | ||||
|             index = (cpu->CFlag << 31) | (rm >> 1); | ||||
|         } else { | ||||
|             index = ROTATE_RIGHT_32(rm, shift_imm); | ||||
|         } | ||||
|         break; | ||||
|     } | ||||
| 
 | ||||
|  | @ -654,8 +676,8 @@ void LnSWoUB(ScaledRegisterOffset)(arm_processor *cpu, unsigned int inst, unsign | |||
|         } | ||||
|         break; | ||||
|     case 2: | ||||
|         if (shift_imm == 0){ // ASR #32
 | ||||
|             if (rm >> 31) | ||||
|         if (shift_imm == 0) { // ASR #32
 | ||||
|             if (BIT(rm, 31) == 1) | ||||
|                 index = 0xFFFFFFFF; | ||||
|             else | ||||
|                 index = 0; | ||||
|  | @ -664,7 +686,11 @@ void LnSWoUB(ScaledRegisterOffset)(arm_processor *cpu, unsigned int inst, unsign | |||
|         } | ||||
|         break; | ||||
|     case 3: | ||||
|         DEBUG_MSG; | ||||
|         if (shift_imm == 0) { | ||||
|             index = (cpu->CFlag << 31) | (rm >> 1); | ||||
|         } else { | ||||
|             index = ROTATE_RIGHT_32(rm, shift_imm); | ||||
|         } | ||||
|         break; | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue