mirror of
				https://github.com/yuzu-emu/unicorn.git
				synced 2025-11-04 11:24:54 +00:00 
			
		
		
		
	target/arm: Ignore float_flag_input_denormal from fp_status_f16
When FZ is set, input_denormal exceptions are recognized, but this does not happen with FZ16. The softfloat code has no way to distinguish these bits and will raise such exceptions into fp_status_f16.flags, so ignore them when computing the accumulated flags. Backports commit 19062c169e5bcdda3d60df9161228e107bf0f96e from qemu
This commit is contained in:
		
							parent
							
								
									f787dd15fd
								
							
						
					
					
						commit
						15a68a354c
					
				| 
						 | 
					@ -10554,9 +10554,12 @@ uint32_t HELPER(vfp_get_fpscr)(CPUARMState *env)
 | 
				
			||||||
    fpscr = (env->vfp.xregs[ARM_VFP_FPSCR] & 0xffc8ffff)
 | 
					    fpscr = (env->vfp.xregs[ARM_VFP_FPSCR] & 0xffc8ffff)
 | 
				
			||||||
            | (env->vfp.vec_len << 16)
 | 
					            | (env->vfp.vec_len << 16)
 | 
				
			||||||
            | (env->vfp.vec_stride << 20);
 | 
					            | (env->vfp.vec_stride << 20);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    i = get_float_exception_flags(&env->vfp.fp_status);
 | 
					    i = get_float_exception_flags(&env->vfp.fp_status);
 | 
				
			||||||
    i |= get_float_exception_flags(&env->vfp.standard_fp_status);
 | 
					    i |= get_float_exception_flags(&env->vfp.standard_fp_status);
 | 
				
			||||||
    i |= get_float_exception_flags(&env->vfp.fp_status_f16);
 | 
					    /* FZ16 does not generate an input denormal exception.  */
 | 
				
			||||||
 | 
					    i |= (get_float_exception_flags(&env->vfp.fp_status_f16)
 | 
				
			||||||
 | 
					          & ~float_flag_input_denormal);
 | 
				
			||||||
    fpscr |= vfp_exceptbits_from_host(i);
 | 
					    fpscr |= vfp_exceptbits_from_host(i);
 | 
				
			||||||
    return fpscr;
 | 
					    return fpscr;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue