mirror of
				https://git.suyu.dev/suyu/suyu.git
				synced 2025-11-04 12:34:39 +08:00 
			
		
		
		
	dyncom: Properly retrieve the PC value in BX if used.
This commit is contained in:
		
							parent
							
								
									1c81813b72
								
							
						
					
					
						commit
						a2f0a3d019
					
				@ -4144,11 +4144,13 @@ unsigned InterpreterMainLoop(ARMul_State* cpu) {
 | 
			
		||||
        if (inst_base->cond == 0xE || CondPassed(cpu, inst_base->cond)) {
 | 
			
		||||
            bx_inst* const inst_cream = (bx_inst*)inst_base->component;
 | 
			
		||||
 | 
			
		||||
            if (inst_cream->Rm == 15)
 | 
			
		||||
                LOG_WARNING(Core_ARM11, "BX at pc %x: use of Rm = R15 is discouraged", cpu->Reg[15]);
 | 
			
		||||
            u32 address = RM;
 | 
			
		||||
 | 
			
		||||
            cpu->TFlag = cpu->Reg[inst_cream->Rm] & 0x1;
 | 
			
		||||
            cpu->Reg[15] = cpu->Reg[inst_cream->Rm] & 0xfffffffe;
 | 
			
		||||
            if (inst_cream->Rm == 15)
 | 
			
		||||
                address += 2 * GET_INST_SIZE(cpu);
 | 
			
		||||
 | 
			
		||||
            cpu->TFlag   = address & 1;
 | 
			
		||||
            cpu->Reg[15] = address & 0xfffffffe;
 | 
			
		||||
            INC_PC(sizeof(bx_inst));
 | 
			
		||||
            goto DISPATCH;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user