/openbmc/linux/arch/powerpc/include/asm/ |
H A D | kvm_fpu.h | 14 extern void fps_fres(u64 *fpscr, u32 *dst, u32 *src1); 15 extern void fps_frsqrte(u64 *fpscr, u32 *dst, u32 *src1); 16 extern void fps_fsqrts(u64 *fpscr, u32 *dst, u32 *src1); 18 extern void fps_fadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2); 19 extern void fps_fdivs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2); 20 extern void fps_fmuls(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2); 21 extern void fps_fsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2); 23 extern void fps_fmadds(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2, 25 extern void fps_fmsubs(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2, 31 extern void fps_fsel(u64 *fpscr, u32 *dst, u32 *src1, u32 *src2, [all …]
|
/openbmc/linux/arch/arm/vfp/ |
H A D | vfpsingle.c | 69 #define vfp_single_normaliseround(sd,vsd,fpscr,except,func) __vfp_single_normaliseround(sd,vsd,fpsc… argument 134 rmode = fpscr & FPSCR_RMODE_MASK; in __vfp_single_normaliseround() 216 struct vfp_single *vsm, u32 fpscr) in vfp_propagate_nan() argument 226 if (fpscr & FPSCR_DEFAULT_NAN) in vfp_propagate_nan() 464 return vfp_compare(sd, 0, m, fpscr); in vfp_single_fcmp() 469 return vfp_compare(sd, 1, m, fpscr); in vfp_single_fcmpe() 474 return vfp_compare(sd, 0, 0, fpscr); in vfp_single_fcmpz() 479 return vfp_compare(sd, 1, 0, fpscr); in vfp_single_fcmpez() 551 int rmode = fpscr & FPSCR_RMODE_MASK; in vfp_single_ftoui() 631 int rmode = fpscr & FPSCR_RMODE_MASK; in vfp_single_ftosi() [all …]
|
H A D | vfpdouble.c | 129 rmode = fpscr & FPSCR_RMODE_MASK; in vfp_double_normaliseround() 208 struct vfp_double *vdm, u32 fpscr) in vfp_propagate_nan() argument 218 if (fpscr & FPSCR_DEFAULT_NAN) in vfp_propagate_nan() 421 return vfp_compare(dd, 0, dm, fpscr); in vfp_double_fcmp() 426 return vfp_compare(dd, 1, dm, fpscr); in vfp_double_fcmpe() 510 int rmode = fpscr & FPSCR_RMODE_MASK; in vfp_double_ftoui() 589 int rmode = fpscr & FPSCR_RMODE_MASK; in vfp_double_ftosi() 684 struct vfp_double *vdm, u32 fpscr) in vfp_double_fadd_nonnumber() argument 791 struct vfp_double *vdm, u32 fpscr) in vfp_double_multiply() argument 1127 u32 vfp_double_cpdo(u32 inst, u32 fpscr) in vfp_double_cpdo() argument [all …]
|
H A D | vfpmodule.c | 112 vfp->hard.fpscr = FPSCR_ROUND_NEAREST; in vfp_thread_flush() 263 fpscr |= exceptions; in vfp_raise_exceptions() 265 fmxr(FPSCR, fpscr); in vfp_raise_exceptions() 268 if (exceptions & stat && fpscr & en) \ in vfp_raise_exceptions() 346 orig_fpscr = fpscr = fmrx(FPSCR); in VFP_bounce() 352 && (fpscr & FPSCR_IXE)) { in VFP_bounce() 386 fpscr &= ~FPSCR_LENGTH_MASK; in VFP_bounce() 566 ufp->fpscr = hwstate->fpscr; in vfp_preserve_user_clear_hwstate() 604 hwstate->fpscr = ufp->fpscr; in vfp_restore_user_hwstate() 754 u32 fpscr = fmrx(FPSCR); in vfp_support_entry() local [all …]
|
H A D | vfpinstr.h | 101 u32 vfp_single_cpdo(u32 inst, u32 fpscr); 102 u32 vfp_single_cprt(u32 inst, u32 fpscr, struct pt_regs *regs); 104 u32 vfp_double_cpdo(u32 inst, u32 fpscr);
|
H A D | vfp.h | 245 #define vfp_single_normaliseround(sd,vsd,fpscr,except,func) __vfp_single_normaliseround(sd,vsd,fpsc… argument 246 u32 __vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions); 248 u32 vfp_single_normaliseround(int sd, struct vfp_single *vs, u32 fpscr, u32 exceptions, const char … 343 u32 vfp_double_normaliseround(int dd, struct vfp_double *vd, u32 fpscr, u32 exceptions, const char … 373 u32 (* const fn)(int dd, int dn, int dm, u32 fpscr);
|
/openbmc/linux/arch/powerpc/math-emu/ |
H A D | math.c | 170 u32 fpscr; in record_exception() local 172 fpscr = __FPU_FPSCR; in record_exception() 175 fpscr |= FPSCR_FX; in record_exception() 177 fpscr |= FPSCR_OX; in record_exception() 179 fpscr |= FPSCR_UX; in record_exception() 210 fpscr |= FPSCR_VX; in record_exception() 213 if (((fpscr & FPSCR_VX) && (fpscr & FPSCR_VE)) || in record_exception() 214 ((fpscr & FPSCR_OX) && (fpscr & FPSCR_OE)) || in record_exception() 215 ((fpscr & FPSCR_UX) && (fpscr & FPSCR_UE)) || in record_exception() 216 ((fpscr & FPSCR_ZX) && (fpscr & FPSCR_ZE)) || in record_exception() [all …]
|
H A D | mtfsf.c | 13 u32 fpscr; in mtfsf() local 30 fpscr = ((__FPU_FPSCR & ~mask) | (frB[1] & mask)) & in mtfsf() 33 if (fpscr & (FPSCR_VXSNAN | FPSCR_VXISI | FPSCR_VXIDI | in mtfsf() 36 fpscr |= FPSCR_VX; in mtfsf() 42 if (fpscr & (fpscr >> 22) & 0xf8) in mtfsf() 43 fpscr |= FPSCR_FEX; in mtfsf() 45 __FPU_FPSCR = fpscr; in mtfsf()
|
H A D | fctiwz.c | 15 u32 fpscr; in fctiwz() local 18 fpscr = __FPU_FPSCR; in fctiwz() 26 __FPU_FPSCR = fpscr; in fctiwz()
|
/openbmc/linux/arch/sh/kernel/cpu/sh4/ |
H A D | fpu.c | 242 int fpscr; in ieee_fpe_handler() local 250 fpscr = tsk->thread.xstate->hardfpu.fpscr; in ieee_fpe_handler() 251 prec = fpscr & FPSCR_DBL_PRECISION; in ieee_fpe_handler() 253 if ((fpscr & FPSCR_CAUSE_ERROR) in ieee_fpe_handler() 280 int fpscr; in ieee_fpe_handler() local 288 fpscr = tsk->thread.xstate->hardfpu.fpscr; in ieee_fpe_handler() 289 prec = fpscr & FPSCR_DBL_PRECISION; in ieee_fpe_handler() 291 if ((fpscr & FPSCR_CAUSE_ERROR) in ieee_fpe_handler() 324 int fpscr; in ieee_fpe_handler() local 332 fpscr = tsk->thread.xstate->hardfpu.fpscr; in ieee_fpe_handler() [all …]
|
/openbmc/linux/arch/powerpc/kvm/ |
H A D | book3s_paired_singles.c | 493 void (*func)(u64 *fpscr, in kvmppc_ps_three_in() argument 541 void (*func)(u64 *fpscr, in kvmppc_ps_two_in() argument 604 func(&vcpu->arch.fp.fpscr, &ps0_out, &ps0_in); in kvmppc_ps_one_in() 613 func(&vcpu->arch.fp.fpscr, &qpr[reg_out], &ps1_in); in kvmppc_ps_one_in() 1113 fpd_fres(&vcpu->arch.fp.fpscr, &cr, fpr_d, fpr_b); in kvmppc_emulate_paired_single() 1154 *fpr_d = vcpu->arch.fp.fpscr; in kvmppc_emulate_paired_single() 1159 vcpu->arch.fp.fpscr = *fpr_b; in kvmppc_emulate_paired_single() 1184 fpd_fneg(&vcpu->arch.fp.fpscr, &cr, fpr_d, fpr_b); in kvmppc_emulate_paired_single() 1190 fpd_fabs(&vcpu->arch.fp.fpscr, &cr, fpr_d, fpr_b); in kvmppc_emulate_paired_single() 1205 fpd_fctiw(&vcpu->arch.fp.fpscr, &cr, fpr_d, fpr_b); in kvmppc_emulate_paired_single() [all …]
|
/openbmc/linux/arch/sh/kernel/cpu/sh2a/ |
H A D | fpu.c | 467 int fpscr; in ieee_fpe_handler() local 475 fpscr = tsk->thread.xstate->hardfpu.fpscr; in ieee_fpe_handler() 476 prec = fpscr & (1 << 19); in ieee_fpe_handler() 478 if ((fpscr & FPSCR_FPU_ERROR) in ieee_fpe_handler() 494 } else if ((fpscr & FPSCR_FPU_ERROR) in ieee_fpe_handler() 510 int fpscr; in ieee_fpe_handler() local 518 fpscr = tsk->thread.xstate->hardfpu.fpscr; in ieee_fpe_handler() 519 prec = fpscr & (1 << 19); in ieee_fpe_handler() 521 if ((fpscr & FPSCR_FPU_ERROR) in ieee_fpe_handler() 537 } else if ((fpscr & FPSCR_FPU_ERROR) in ieee_fpe_handler() [all …]
|
/openbmc/qemu/target/arm/tcg/ |
H A D | translate-m-nocp.c | 330 TCGv_i32 fpscr; in gen_M_fp_sysreg_write() local 344 fpscr = load_cpu_field_low32(vfp.fpsr); in gen_M_fp_sysreg_write() 345 tcg_gen_andi_i32(fpscr, fpscr, ~FPSR_NZCV_MASK); in gen_M_fp_sysreg_write() 346 tcg_gen_or_i32(fpscr, fpscr, tmp); in gen_M_fp_sysreg_write() 347 store_cpu_field_low32(fpscr, vfp.fpsr); in gen_M_fp_sysreg_write() 474 TCGv_i32 control, sfpa, fpscr; in gen_M_fp_sysreg_read() local 496 gen_helper_vfp_set_fpscr(tcg_env, fpscr); in gen_M_fp_sysreg_read() 502 TCGv_i32 control, sfpa, fpscr, fpdscr; in gen_M_fp_sysreg_read() local 530 fpscr = tcg_temp_new_i32(); in gen_M_fp_sysreg_read() 531 gen_helper_vfp_get_fpscr(fpscr, tcg_env); in gen_M_fp_sysreg_read() [all …]
|
/openbmc/qemu/target/ppc/ |
H A D | fpu_helper.c | 165 env->fpscr = (env->fpscr & ~FP_FPRF) | fprf; \ 177 env->fpscr |= FP_VX; in COMPUTE_FPRF() 179 env->fpscr |= FP_FX; in COMPUTE_FPRF() 260 env->fpscr |= FP_VX; in float_invalid_op_vxvc() 262 env->fpscr |= FP_FX; in float_invalid_op_vxvc() 393 target_ulong fpscr = env->fpscr; in do_fpscr_check_status() local 396 if ((fpscr & FP_OX) && (fpscr & FP_OE)) { in do_fpscr_check_status() 398 } else if ((fpscr & FP_UX) && (fpscr & FP_UE)) { in do_fpscr_check_status() 400 } else if ((fpscr & FP_XX) && (fpscr & FP_XE)) { in do_fpscr_check_status() 402 } else if ((fpscr & FP_ZX) && (fpscr & FP_ZE)) { in do_fpscr_check_status() [all …]
|
H A D | cpu.c | 199 switch (env->fpscr & FP_RN) { in fpscr_set_rounding_mode() 230 env->fpscr = val; in ppc_store_fpscr() 231 env->fp_status.rebias_overflow = (FP_OE & env->fpscr) ? true : false; in ppc_store_fpscr() 232 env->fp_status.rebias_underflow = (FP_UE & env->fpscr) ? true : false; in ppc_store_fpscr()
|
/openbmc/qemu/tests/tcg/ppc64/ |
H A D | mffsce.c | 20 uint64_t frt, fpscr; in main() local 25 MFFS(fpscr); /* read the value that mffsce stored to cpu fpscr */ in main() 34 assert((fpscr & 0xff) == (test_value & 0x7)); in main()
|
H A D | mtfsf.c | 28 uint64_t fpscr; in main() local 45 MFFS(fpscr); in main() 46 assert((fpscr & FP_FI) != 0); in main()
|
/openbmc/qemu/target/sh4/ |
H A D | gdbstub.c | 57 return gdb_get_regl(mem_buf, env->fpscr); in superh_cpu_gdb_read_register() 59 if (env->fpscr & FPSCR_FR) { in superh_cpu_gdb_read_register() 116 env->fpscr = ldl_p(mem_buf); in superh_cpu_gdb_write_register() 119 if (env->fpscr & FPSCR_FR) { in superh_cpu_gdb_write_register()
|
H A D | op_helper.c | 207 env->fpscr = val & FPSCR_MASK; in helper_ld_fpscr() 223 env->fpscr &= ~FPSCR_CAUSE_MASK; in update_fpscr() 227 env->fpscr |= FPSCR_CAUSE_V; in update_fpscr() 230 env->fpscr |= FPSCR_CAUSE_Z; in update_fpscr() 233 env->fpscr |= FPSCR_CAUSE_O; in update_fpscr() 236 env->fpscr |= FPSCR_CAUSE_U; in update_fpscr() 239 env->fpscr |= FPSCR_CAUSE_I; in update_fpscr() 243 env->fpscr |= (env->fpscr & FPSCR_CAUSE_MASK) in update_fpscr() 247 cause = (env->fpscr & FPSCR_CAUSE_MASK) >> FPSCR_CAUSE_SHIFT; in update_fpscr() 248 enable = (env->fpscr & FPSCR_ENABLE_MASK) >> FPSCR_ENABLE_SHIFT; in update_fpscr()
|
/openbmc/linux/arch/powerpc/kernel/ptrace/ |
H A D | ptrace-vsx.c | 32 buf[32] = target->thread.fp_state.fpscr; in fpr_get() 60 buf[32] = target->thread.fp_state.fpscr; in fpr_set() 69 target->thread.fp_state.fpscr = buf[32]; in fpr_set()
|
H A D | ptrace-novsx.c | 25 BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) != in fpr_get() 54 BUILD_BUG_ON(offsetof(struct thread_fp_state, fpscr) != in fpr_set()
|
H A D | ptrace-fpu.c | 27 *data = child->thread.fp_state.fpscr; in ptrace_get_fpr() 53 child->thread.fp_state.fpscr = data; in ptrace_put_fpr()
|
/openbmc/linux/arch/arm64/kernel/ |
H A D | signal32.c | 28 compat_ulong_t fpscr; member 98 compat_ulong_t fpscr, fpexc; in compat_preserve_vfp_context() local 126 fpscr = (fpsimd->fpsr & VFP_FPSCR_STAT_MASK) | in compat_preserve_vfp_context() 128 __put_user_error(fpscr, &frame->ufp.fpscr, err); in compat_preserve_vfp_context() 147 compat_ulong_t fpscr; in compat_restore_vfp_context() local 168 __get_user_error(fpscr, &frame->ufp.fpscr, err); in compat_restore_vfp_context() 169 fpsimd.fpsr = fpscr & VFP_FPSCR_STAT_MASK; in compat_restore_vfp_context() 170 fpsimd.fpcr = fpscr & VFP_FPSCR_CTRL_MASK; in compat_restore_vfp_context()
|
/openbmc/qemu/target/ppc/translate/ |
H A D | fp-impl.c.inc | 490 TCGv_i64 fpscr = tcg_temp_new_i64(); 493 tcg_gen_extu_tl_i64(fpscr, cpu_fpscr); 494 tcg_gen_andi_i64(fpscr_masked, fpscr, mask); 497 return fpscr; 541 TCGv_i64 fpscr; 546 fpscr = place_from_fpscr(a->rt, UINT64_MAX); 553 TCGv_i64 t1, fpscr; 563 store_fpscr_masked(fpscr, FP_RN, t1, 0x0001); 569 TCGv_i64 t1, fpscr; 585 TCGv_i64 t1, fpscr; [all …]
|
/openbmc/linux/arch/sh/kernel/cpu/ |
H A D | fpu.c | 32 fp->fpscr = FPSCR_INIT; in init_fpu() 36 fp->fpscr = FPSCR_INIT; in init_fpu()
|