mirror of
				https://github.com/yuzu-emu/unicorn.git
				synced 2025-11-04 13:05:03 +00:00 
			
		
		
		
	arm: Don't implement BXJ on M-profile CPUs
For M-profile CPUs, the BXJ instruction does not exist at all, and the encoding should always UNDEF. We were accidentally implementing it to behave like A-profile BXJ; correct the error. Backports commit 9d7c59c84d4530d05e8702b1c3a31e6da00a397e from qemu
This commit is contained in:
		
							parent
							
								
									e9d507a193
								
							
						
					
					
						commit
						9f938da9e1
					
				| 
						 | 
					@ -10643,7 +10643,12 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
                    case 4: /* bxj */
 | 
					                    case 4: /* bxj */
 | 
				
			||||||
                        /* Trivial implementation equivalent to bx.  */
 | 
					                        /* Trivial implementation equivalent to bx.
 | 
				
			||||||
 | 
					                         * This instruction doesn't exist at all for M-profile.
 | 
				
			||||||
 | 
					                         */
 | 
				
			||||||
 | 
					                        if (arm_dc_feature(s, ARM_FEATURE_M)) {
 | 
				
			||||||
 | 
					                            goto illegal_op;
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
                        tmp = load_reg(s, rn);
 | 
					                        tmp = load_reg(s, rn);
 | 
				
			||||||
                        gen_bx(s, tmp);
 | 
					                        gen_bx(s, tmp);
 | 
				
			||||||
                        break;
 | 
					                        break;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue