mirror of
				https://github.com/yuzu-emu/yuzu.git
				synced 2025-11-04 08:13:41 +00:00 
			
		
		
		
	arm_dyncom_thumb: Fix encoding of BKPT's immediate
This commit is contained in:
		
							parent
							
								
									85b1dddda1
								
							
						
					
					
						commit
						c00781a908
					
				@ -275,7 +275,10 @@ tdstate thumb_translate(u32 addr, u32 instr, u32* ainstr, u32* inst_size) {
 | 
				
			|||||||
                   : 0xE28DDF00)            // ADD
 | 
					                   : 0xE28DDF00)            // ADD
 | 
				
			||||||
                |(tinstr & 0x007F);         // off7
 | 
					                |(tinstr & 0x007F);         // off7
 | 
				
			||||||
        } else if ((tinstr & 0x0F00) == 0x0e00) {
 | 
					        } else if ((tinstr & 0x0F00) == 0x0e00) {
 | 
				
			||||||
            *ainstr = 0xEF000000 | 0x180000; // base | BKPT mask
 | 
					            // BKPT
 | 
				
			||||||
 | 
					            *ainstr = 0xEF000000              // base
 | 
				
			||||||
 | 
					                | BITS(tinstr, 0, 3)          // imm4 field;
 | 
				
			||||||
 | 
					                | (BITS(tinstr, 4, 7) << 8);  // beginning 4 bits of imm12
 | 
				
			||||||
        } else if ((tinstr & 0x0F00) == 0x0200) {
 | 
					        } else if ((tinstr & 0x0F00) == 0x0200) {
 | 
				
			||||||
            static const ARMword subset[4] = {
 | 
					            static const ARMword subset[4] = {
 | 
				
			||||||
                0xE6BF0070, // SXTH
 | 
					                0xE6BF0070, // SXTH
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user