mirror of
				https://github.com/yuzu-emu/unicorn.git
				synced 2025-11-04 11:24:54 +00:00 
			
		
		
		
	target/arm: Convert VNEG to decodetree
Convert the VNEG instruction to decodetree. Backports commit 1882651afdb0ca44f0631192fbe65a71c660d809 from qemu
This commit is contained in:
		
							parent
							
								
									1032d86ad3
								
							
						
					
					
						commit
						7aea3da6b7
					
				| 
						 | 
				
			
			@ -1923,3 +1923,13 @@ static bool trans_VABS_dp(DisasContext *s, arg_VABS_dp *a)
 | 
			
		|||
{
 | 
			
		||||
    return do_vfp_2op_dp(s, gen_helper_vfp_absd, a->vd, a->vm);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool trans_VNEG_sp(DisasContext *s, arg_VNEG_sp *a)
 | 
			
		||||
{
 | 
			
		||||
    return do_vfp_2op_sp(s, gen_helper_vfp_negs, a->vd, a->vm);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool trans_VNEG_dp(DisasContext *s, arg_VNEG_dp *a)
 | 
			
		||||
{
 | 
			
		||||
    return do_vfp_2op_dp(s, gen_helper_vfp_negd, a->vd, a->vm);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3199,7 +3199,7 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn)
 | 
			
		|||
                return 1;
 | 
			
		||||
            case 15:
 | 
			
		||||
                switch (rn) {
 | 
			
		||||
                case 1:
 | 
			
		||||
                case 1 ... 2:
 | 
			
		||||
                    /* Already handled by decodetree */
 | 
			
		||||
                    return 1;
 | 
			
		||||
                default:
 | 
			
		||||
| 
						 | 
				
			
			@ -3213,7 +3213,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn)
 | 
			
		|||
                /* rn is opcode, encoded as per VFP_SREG_N. */
 | 
			
		||||
                switch (rn) {
 | 
			
		||||
                case 0x00: /* vmov */
 | 
			
		||||
                case 0x02: /* vneg */
 | 
			
		||||
                case 0x03: /* vsqrt */
 | 
			
		||||
                    break;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -3392,9 +3391,6 @@ static int disas_vfp_insn(DisasContext *s, uint32_t insn)
 | 
			
		|||
                    case 0: /* cpy */
 | 
			
		||||
                        /* no-op */
 | 
			
		||||
                        break;
 | 
			
		||||
                    case 2: /* neg */
 | 
			
		||||
                        gen_vfp_neg(s, dp);
 | 
			
		||||
                        break;
 | 
			
		||||
                    case 3: /* sqrt */
 | 
			
		||||
                        gen_vfp_sqrt(s, dp);
 | 
			
		||||
                        break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -161,3 +161,8 @@ VABS_sp      ---- 1110 1.11 0000 .... 1010 11.0 .... \
 | 
			
		|||
             vd=%vd_sp vm=%vm_sp
 | 
			
		||||
VABS_dp      ---- 1110 1.11 0000 .... 1011 11.0 .... \
 | 
			
		||||
             vd=%vd_dp vm=%vm_dp
 | 
			
		||||
 | 
			
		||||
VNEG_sp      ---- 1110 1.11 0001 .... 1010 01.0 .... \
 | 
			
		||||
             vd=%vd_sp vm=%vm_sp
 | 
			
		||||
VNEG_dp      ---- 1110 1.11 0001 .... 1011 01.0 .... \
 | 
			
		||||
             vd=%vd_dp vm=%vm_dp
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue