Lines Matching full:env

39 target_ulong helper_cfc1(CPUMIPSState *env, uint32_t reg)  in helper_cfc1()  argument
45 arg1 = (int32_t)env->active_fpu.fcr0; in helper_cfc1()
49 if (env->active_fpu.fcr0 & (1 << FCR0_UFRP)) { in helper_cfc1()
50 if (env->CP0_Config5 & (1 << CP0C5_UFR)) { in helper_cfc1()
52 ((env->CP0_Status & (1 << CP0St_FR)) >> CP0St_FR); in helper_cfc1()
54 do_raise_exception(env, EXCP_RI, GETPC()); in helper_cfc1()
60 if (env->active_fpu.fcr0 & (1 << FCR0_FREP)) { in helper_cfc1()
61 if (env->CP0_Config5 & (1 << CP0C5_UFE)) { in helper_cfc1()
62 arg1 = (env->CP0_Config5 >> CP0C5_FRE) & 1; in helper_cfc1()
64 helper_raise_exception(env, EXCP_RI); in helper_cfc1()
69 arg1 = ((env->active_fpu.fcr31 >> 24) & 0xfe) | in helper_cfc1()
70 ((env->active_fpu.fcr31 >> 23) & 0x1); in helper_cfc1()
73 arg1 = env->active_fpu.fcr31 & 0x0003f07c; in helper_cfc1()
76 arg1 = (env->active_fpu.fcr31 & 0x00000f83) | in helper_cfc1()
77 ((env->active_fpu.fcr31 >> 22) & 0x4); in helper_cfc1()
80 arg1 = (int32_t)env->active_fpu.fcr31; in helper_cfc1()
87 void helper_ctc1(CPUMIPSState *env, target_ulong arg1, uint32_t fs, uint32_t rt) in helper_ctc1() argument
92 if (!((env->active_fpu.fcr0 & (1 << FCR0_UFRP)) && (rt == 0))) { in helper_ctc1()
95 if (env->CP0_Config5 & (1 << CP0C5_UFR)) { in helper_ctc1()
96 env->CP0_Status &= ~(1 << CP0St_FR); in helper_ctc1()
97 compute_hflags(env); in helper_ctc1()
99 do_raise_exception(env, EXCP_RI, GETPC()); in helper_ctc1()
104 if (!((env->active_fpu.fcr0 & (1 << FCR0_UFRP)) && (rt == 0))) { in helper_ctc1()
107 if (env->CP0_Config5 & (1 << CP0C5_UFR)) { in helper_ctc1()
108 env->CP0_Status |= (1 << CP0St_FR); in helper_ctc1()
109 compute_hflags(env); in helper_ctc1()
111 do_raise_exception(env, EXCP_RI, GETPC()); in helper_ctc1()
116 if (!((env->active_fpu.fcr0 & (1 << FCR0_FREP)) && (rt == 0))) { in helper_ctc1()
119 if (env->CP0_Config5 & (1 << CP0C5_UFE)) { in helper_ctc1()
120 env->CP0_Config5 &= ~(1 << CP0C5_FRE); in helper_ctc1()
121 compute_hflags(env); in helper_ctc1()
123 helper_raise_exception(env, EXCP_RI); in helper_ctc1()
128 if (!((env->active_fpu.fcr0 & (1 << FCR0_FREP)) && (rt == 0))) { in helper_ctc1()
131 if (env->CP0_Config5 & (1 << CP0C5_UFE)) { in helper_ctc1()
132 env->CP0_Config5 |= (1 << CP0C5_FRE); in helper_ctc1()
133 compute_hflags(env); in helper_ctc1()
135 helper_raise_exception(env, EXCP_RI); in helper_ctc1()
139 if ((env->insn_flags & ISA_MIPS_R6) || (arg1 & 0xffffff00)) { in helper_ctc1()
142 env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0x017fffff) | in helper_ctc1()
150 env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0xfffc0f83) | in helper_ctc1()
157 env->active_fpu.fcr31 = (env->active_fpu.fcr31 & 0xfefff07c) | in helper_ctc1()
162 env->active_fpu.fcr31 = (arg1 & env->active_fpu.fcr31_rw_bitmask) | in helper_ctc1()
163 (env->active_fpu.fcr31 & ~(env->active_fpu.fcr31_rw_bitmask)); in helper_ctc1()
166 if (env->insn_flags & ISA_MIPS_R6) { in helper_ctc1()
167 do_raise_exception(env, EXCP_RI, GETPC()); in helper_ctc1()
171 restore_fp_status(env); in helper_ctc1()
172 set_float_exception_flags(0, &env->active_fpu.fp_status); in helper_ctc1()
173 if ((GET_FP_ENABLE(env->active_fpu.fcr31) | 0x20) & in helper_ctc1()
174 GET_FP_CAUSE(env->active_fpu.fcr31)) { in helper_ctc1()
175 do_raise_exception(env, EXCP_FPE, GETPC()); in helper_ctc1()
202 static inline void update_fcr31(CPUMIPSState *env, uintptr_t pc) in update_fcr31() argument
205 &env->active_fpu.fp_status); in update_fcr31()
212 SET_FP_CAUSE(env->active_fpu.fcr31, mips_exception_flags); in update_fcr31()
215 set_float_exception_flags(0, &env->active_fpu.fp_status); in update_fcr31()
217 if (GET_FP_ENABLE(env->active_fpu.fcr31) & mips_exception_flags) { in update_fcr31()
218 do_raise_exception(env, EXCP_FPE, pc); in update_fcr31()
220 UPDATE_FP_FLAGS(env->active_fpu.fcr31, mips_exception_flags); in update_fcr31()
233 uint64_t helper_float_sqrt_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_sqrt_d() argument
235 fdt0 = float64_sqrt(fdt0, &env->active_fpu.fp_status); in helper_float_sqrt_d()
236 update_fcr31(env, GETPC()); in helper_float_sqrt_d()
240 uint32_t helper_float_sqrt_s(CPUMIPSState *env, uint32_t fst0) in helper_float_sqrt_s() argument
242 fst0 = float32_sqrt(fst0, &env->active_fpu.fp_status); in helper_float_sqrt_s()
243 update_fcr31(env, GETPC()); in helper_float_sqrt_s()
247 uint64_t helper_float_cvtd_s(CPUMIPSState *env, uint32_t fst0) in helper_float_cvtd_s() argument
251 fdt2 = float32_to_float64(fst0, &env->active_fpu.fp_status); in helper_float_cvtd_s()
252 update_fcr31(env, GETPC()); in helper_float_cvtd_s()
256 uint64_t helper_float_cvtd_w(CPUMIPSState *env, uint32_t wt0) in helper_float_cvtd_w() argument
260 fdt2 = int32_to_float64(wt0, &env->active_fpu.fp_status); in helper_float_cvtd_w()
261 update_fcr31(env, GETPC()); in helper_float_cvtd_w()
265 uint64_t helper_float_cvtd_l(CPUMIPSState *env, uint64_t dt0) in helper_float_cvtd_l() argument
269 fdt2 = int64_to_float64(dt0, &env->active_fpu.fp_status); in helper_float_cvtd_l()
270 update_fcr31(env, GETPC()); in helper_float_cvtd_l()
274 uint64_t helper_float_cvt_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_cvt_l_d() argument
278 dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status); in helper_float_cvt_l_d()
279 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_cvt_l_d()
283 update_fcr31(env, GETPC()); in helper_float_cvt_l_d()
287 uint64_t helper_float_cvt_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_cvt_l_s() argument
291 dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status); in helper_float_cvt_l_s()
292 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_cvt_l_s()
296 update_fcr31(env, GETPC()); in helper_float_cvt_l_s()
300 uint64_t helper_float_cvtps_pw(CPUMIPSState *env, uint64_t dt0) in helper_float_cvtps_pw() argument
305 fst2 = int32_to_float32(dt0 & 0XFFFFFFFF, &env->active_fpu.fp_status); in helper_float_cvtps_pw()
306 fsth2 = int32_to_float32(dt0 >> 32, &env->active_fpu.fp_status); in helper_float_cvtps_pw()
307 update_fcr31(env, GETPC()); in helper_float_cvtps_pw()
311 uint64_t helper_float_cvtpw_ps(CPUMIPSState *env, uint64_t fdt0) in helper_float_cvtpw_ps() argument
317 wt2 = float32_to_int32(fdt0 & 0XFFFFFFFF, &env->active_fpu.fp_status); in helper_float_cvtpw_ps()
318 excp = get_float_exception_flags(&env->active_fpu.fp_status); in helper_float_cvtpw_ps()
323 set_float_exception_flags(0, &env->active_fpu.fp_status); in helper_float_cvtpw_ps()
324 wth2 = float32_to_int32(fdt0 >> 32, &env->active_fpu.fp_status); in helper_float_cvtpw_ps()
325 excph = get_float_exception_flags(&env->active_fpu.fp_status); in helper_float_cvtpw_ps()
330 set_float_exception_flags(excp | excph, &env->active_fpu.fp_status); in helper_float_cvtpw_ps()
331 update_fcr31(env, GETPC()); in helper_float_cvtpw_ps()
336 uint32_t helper_float_cvts_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_cvts_d() argument
340 fst2 = float64_to_float32(fdt0, &env->active_fpu.fp_status); in helper_float_cvts_d()
341 update_fcr31(env, GETPC()); in helper_float_cvts_d()
345 uint32_t helper_float_cvts_w(CPUMIPSState *env, uint32_t wt0) in helper_float_cvts_w() argument
349 fst2 = int32_to_float32(wt0, &env->active_fpu.fp_status); in helper_float_cvts_w()
350 update_fcr31(env, GETPC()); in helper_float_cvts_w()
354 uint32_t helper_float_cvts_l(CPUMIPSState *env, uint64_t dt0) in helper_float_cvts_l() argument
358 fst2 = int64_to_float32(dt0, &env->active_fpu.fp_status); in helper_float_cvts_l()
359 update_fcr31(env, GETPC()); in helper_float_cvts_l()
363 uint32_t helper_float_cvts_pl(CPUMIPSState *env, uint32_t wt0) in helper_float_cvts_pl() argument
368 update_fcr31(env, GETPC()); in helper_float_cvts_pl()
372 uint32_t helper_float_cvts_pu(CPUMIPSState *env, uint32_t wth0) in helper_float_cvts_pu() argument
377 update_fcr31(env, GETPC()); in helper_float_cvts_pu()
381 uint32_t helper_float_cvt_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_cvt_w_s() argument
385 wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); in helper_float_cvt_w_s()
386 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_cvt_w_s()
390 update_fcr31(env, GETPC()); in helper_float_cvt_w_s()
394 uint32_t helper_float_cvt_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_cvt_w_d() argument
398 wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status); in helper_float_cvt_w_d()
399 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_cvt_w_d()
403 update_fcr31(env, GETPC()); in helper_float_cvt_w_d()
407 uint64_t helper_float_round_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_round_l_d() argument
412 &env->active_fpu.fp_status); in helper_float_round_l_d()
413 dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status); in helper_float_round_l_d()
414 restore_rounding_mode(env); in helper_float_round_l_d()
415 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_round_l_d()
419 update_fcr31(env, GETPC()); in helper_float_round_l_d()
423 uint64_t helper_float_round_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_round_l_s() argument
428 &env->active_fpu.fp_status); in helper_float_round_l_s()
429 dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status); in helper_float_round_l_s()
430 restore_rounding_mode(env); in helper_float_round_l_s()
431 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_round_l_s()
435 update_fcr31(env, GETPC()); in helper_float_round_l_s()
439 uint32_t helper_float_round_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_round_w_d() argument
444 &env->active_fpu.fp_status); in helper_float_round_w_d()
445 wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status); in helper_float_round_w_d()
446 restore_rounding_mode(env); in helper_float_round_w_d()
447 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_round_w_d()
451 update_fcr31(env, GETPC()); in helper_float_round_w_d()
455 uint32_t helper_float_round_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_round_w_s() argument
460 &env->active_fpu.fp_status); in helper_float_round_w_s()
461 wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); in helper_float_round_w_s()
462 restore_rounding_mode(env); in helper_float_round_w_s()
463 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_round_w_s()
467 update_fcr31(env, GETPC()); in helper_float_round_w_s()
471 uint64_t helper_float_trunc_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_trunc_l_d() argument
476 &env->active_fpu.fp_status); in helper_float_trunc_l_d()
477 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_trunc_l_d()
481 update_fcr31(env, GETPC()); in helper_float_trunc_l_d()
485 uint64_t helper_float_trunc_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_trunc_l_s() argument
489 dt2 = float32_to_int64_round_to_zero(fst0, &env->active_fpu.fp_status); in helper_float_trunc_l_s()
490 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_trunc_l_s()
494 update_fcr31(env, GETPC()); in helper_float_trunc_l_s()
498 uint32_t helper_float_trunc_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_trunc_w_d() argument
502 wt2 = float64_to_int32_round_to_zero(fdt0, &env->active_fpu.fp_status); in helper_float_trunc_w_d()
503 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_trunc_w_d()
507 update_fcr31(env, GETPC()); in helper_float_trunc_w_d()
511 uint32_t helper_float_trunc_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_trunc_w_s() argument
515 wt2 = float32_to_int32_round_to_zero(fst0, &env->active_fpu.fp_status); in helper_float_trunc_w_s()
516 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_trunc_w_s()
520 update_fcr31(env, GETPC()); in helper_float_trunc_w_s()
524 uint64_t helper_float_ceil_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_ceil_l_d() argument
528 set_float_rounding_mode(float_round_up, &env->active_fpu.fp_status); in helper_float_ceil_l_d()
529 dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status); in helper_float_ceil_l_d()
530 restore_rounding_mode(env); in helper_float_ceil_l_d()
531 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_ceil_l_d()
535 update_fcr31(env, GETPC()); in helper_float_ceil_l_d()
539 uint64_t helper_float_ceil_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_ceil_l_s() argument
543 set_float_rounding_mode(float_round_up, &env->active_fpu.fp_status); in helper_float_ceil_l_s()
544 dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status); in helper_float_ceil_l_s()
545 restore_rounding_mode(env); in helper_float_ceil_l_s()
546 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_ceil_l_s()
550 update_fcr31(env, GETPC()); in helper_float_ceil_l_s()
554 uint32_t helper_float_ceil_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_ceil_w_d() argument
558 set_float_rounding_mode(float_round_up, &env->active_fpu.fp_status); in helper_float_ceil_w_d()
559 wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status); in helper_float_ceil_w_d()
560 restore_rounding_mode(env); in helper_float_ceil_w_d()
561 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_ceil_w_d()
565 update_fcr31(env, GETPC()); in helper_float_ceil_w_d()
569 uint32_t helper_float_ceil_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_ceil_w_s() argument
573 set_float_rounding_mode(float_round_up, &env->active_fpu.fp_status); in helper_float_ceil_w_s()
574 wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); in helper_float_ceil_w_s()
575 restore_rounding_mode(env); in helper_float_ceil_w_s()
576 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_ceil_w_s()
580 update_fcr31(env, GETPC()); in helper_float_ceil_w_s()
584 uint64_t helper_float_floor_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_floor_l_d() argument
588 set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); in helper_float_floor_l_d()
589 dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status); in helper_float_floor_l_d()
590 restore_rounding_mode(env); in helper_float_floor_l_d()
591 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_floor_l_d()
595 update_fcr31(env, GETPC()); in helper_float_floor_l_d()
599 uint64_t helper_float_floor_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_floor_l_s() argument
603 set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); in helper_float_floor_l_s()
604 dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status); in helper_float_floor_l_s()
605 restore_rounding_mode(env); in helper_float_floor_l_s()
606 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_floor_l_s()
610 update_fcr31(env, GETPC()); in helper_float_floor_l_s()
614 uint32_t helper_float_floor_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_floor_w_d() argument
618 set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); in helper_float_floor_w_d()
619 wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status); in helper_float_floor_w_d()
620 restore_rounding_mode(env); in helper_float_floor_w_d()
621 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_floor_w_d()
625 update_fcr31(env, GETPC()); in helper_float_floor_w_d()
629 uint32_t helper_float_floor_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_floor_w_s() argument
633 set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); in helper_float_floor_w_s()
634 wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); in helper_float_floor_w_s()
635 restore_rounding_mode(env); in helper_float_floor_w_s()
636 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_floor_w_s()
640 update_fcr31(env, GETPC()); in helper_float_floor_w_s()
644 uint64_t helper_float_cvt_2008_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_cvt_2008_l_d() argument
648 dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status); in helper_float_cvt_2008_l_d()
649 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_cvt_2008_l_d()
655 update_fcr31(env, GETPC()); in helper_float_cvt_2008_l_d()
659 uint64_t helper_float_cvt_2008_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_cvt_2008_l_s() argument
663 dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status); in helper_float_cvt_2008_l_s()
664 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_cvt_2008_l_s()
670 update_fcr31(env, GETPC()); in helper_float_cvt_2008_l_s()
674 uint32_t helper_float_cvt_2008_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_cvt_2008_w_d() argument
678 wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status); in helper_float_cvt_2008_w_d()
679 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_cvt_2008_w_d()
685 update_fcr31(env, GETPC()); in helper_float_cvt_2008_w_d()
689 uint32_t helper_float_cvt_2008_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_cvt_2008_w_s() argument
693 wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); in helper_float_cvt_2008_w_s()
694 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_cvt_2008_w_s()
700 update_fcr31(env, GETPC()); in helper_float_cvt_2008_w_s()
704 uint64_t helper_float_round_2008_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_round_2008_l_d() argument
709 &env->active_fpu.fp_status); in helper_float_round_2008_l_d()
710 dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status); in helper_float_round_2008_l_d()
711 restore_rounding_mode(env); in helper_float_round_2008_l_d()
712 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_round_2008_l_d()
718 update_fcr31(env, GETPC()); in helper_float_round_2008_l_d()
722 uint64_t helper_float_round_2008_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_round_2008_l_s() argument
727 &env->active_fpu.fp_status); in helper_float_round_2008_l_s()
728 dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status); in helper_float_round_2008_l_s()
729 restore_rounding_mode(env); in helper_float_round_2008_l_s()
730 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_round_2008_l_s()
736 update_fcr31(env, GETPC()); in helper_float_round_2008_l_s()
740 uint32_t helper_float_round_2008_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_round_2008_w_d() argument
745 &env->active_fpu.fp_status); in helper_float_round_2008_w_d()
746 wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status); in helper_float_round_2008_w_d()
747 restore_rounding_mode(env); in helper_float_round_2008_w_d()
748 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_round_2008_w_d()
754 update_fcr31(env, GETPC()); in helper_float_round_2008_w_d()
758 uint32_t helper_float_round_2008_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_round_2008_w_s() argument
763 &env->active_fpu.fp_status); in helper_float_round_2008_w_s()
764 wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); in helper_float_round_2008_w_s()
765 restore_rounding_mode(env); in helper_float_round_2008_w_s()
766 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_round_2008_w_s()
772 update_fcr31(env, GETPC()); in helper_float_round_2008_w_s()
776 uint64_t helper_float_trunc_2008_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_trunc_2008_l_d() argument
780 dt2 = float64_to_int64_round_to_zero(fdt0, &env->active_fpu.fp_status); in helper_float_trunc_2008_l_d()
781 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_trunc_2008_l_d()
787 update_fcr31(env, GETPC()); in helper_float_trunc_2008_l_d()
791 uint64_t helper_float_trunc_2008_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_trunc_2008_l_s() argument
795 dt2 = float32_to_int64_round_to_zero(fst0, &env->active_fpu.fp_status); in helper_float_trunc_2008_l_s()
796 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_trunc_2008_l_s()
802 update_fcr31(env, GETPC()); in helper_float_trunc_2008_l_s()
806 uint32_t helper_float_trunc_2008_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_trunc_2008_w_d() argument
810 wt2 = float64_to_int32_round_to_zero(fdt0, &env->active_fpu.fp_status); in helper_float_trunc_2008_w_d()
811 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_trunc_2008_w_d()
817 update_fcr31(env, GETPC()); in helper_float_trunc_2008_w_d()
821 uint32_t helper_float_trunc_2008_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_trunc_2008_w_s() argument
825 wt2 = float32_to_int32_round_to_zero(fst0, &env->active_fpu.fp_status); in helper_float_trunc_2008_w_s()
826 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_trunc_2008_w_s()
832 update_fcr31(env, GETPC()); in helper_float_trunc_2008_w_s()
836 uint64_t helper_float_ceil_2008_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_ceil_2008_l_d() argument
840 set_float_rounding_mode(float_round_up, &env->active_fpu.fp_status); in helper_float_ceil_2008_l_d()
841 dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status); in helper_float_ceil_2008_l_d()
842 restore_rounding_mode(env); in helper_float_ceil_2008_l_d()
843 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_ceil_2008_l_d()
849 update_fcr31(env, GETPC()); in helper_float_ceil_2008_l_d()
853 uint64_t helper_float_ceil_2008_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_ceil_2008_l_s() argument
857 set_float_rounding_mode(float_round_up, &env->active_fpu.fp_status); in helper_float_ceil_2008_l_s()
858 dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status); in helper_float_ceil_2008_l_s()
859 restore_rounding_mode(env); in helper_float_ceil_2008_l_s()
860 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_ceil_2008_l_s()
866 update_fcr31(env, GETPC()); in helper_float_ceil_2008_l_s()
870 uint32_t helper_float_ceil_2008_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_ceil_2008_w_d() argument
874 set_float_rounding_mode(float_round_up, &env->active_fpu.fp_status); in helper_float_ceil_2008_w_d()
875 wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status); in helper_float_ceil_2008_w_d()
876 restore_rounding_mode(env); in helper_float_ceil_2008_w_d()
877 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_ceil_2008_w_d()
883 update_fcr31(env, GETPC()); in helper_float_ceil_2008_w_d()
887 uint32_t helper_float_ceil_2008_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_ceil_2008_w_s() argument
891 set_float_rounding_mode(float_round_up, &env->active_fpu.fp_status); in helper_float_ceil_2008_w_s()
892 wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); in helper_float_ceil_2008_w_s()
893 restore_rounding_mode(env); in helper_float_ceil_2008_w_s()
894 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_ceil_2008_w_s()
900 update_fcr31(env, GETPC()); in helper_float_ceil_2008_w_s()
904 uint64_t helper_float_floor_2008_l_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_floor_2008_l_d() argument
908 set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); in helper_float_floor_2008_l_d()
909 dt2 = float64_to_int64(fdt0, &env->active_fpu.fp_status); in helper_float_floor_2008_l_d()
910 restore_rounding_mode(env); in helper_float_floor_2008_l_d()
911 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_floor_2008_l_d()
917 update_fcr31(env, GETPC()); in helper_float_floor_2008_l_d()
921 uint64_t helper_float_floor_2008_l_s(CPUMIPSState *env, uint32_t fst0) in helper_float_floor_2008_l_s() argument
925 set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); in helper_float_floor_2008_l_s()
926 dt2 = float32_to_int64(fst0, &env->active_fpu.fp_status); in helper_float_floor_2008_l_s()
927 restore_rounding_mode(env); in helper_float_floor_2008_l_s()
928 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_floor_2008_l_s()
934 update_fcr31(env, GETPC()); in helper_float_floor_2008_l_s()
938 uint32_t helper_float_floor_2008_w_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_floor_2008_w_d() argument
942 set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); in helper_float_floor_2008_w_d()
943 wt2 = float64_to_int32(fdt0, &env->active_fpu.fp_status); in helper_float_floor_2008_w_d()
944 restore_rounding_mode(env); in helper_float_floor_2008_w_d()
945 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_floor_2008_w_d()
951 update_fcr31(env, GETPC()); in helper_float_floor_2008_w_d()
955 uint32_t helper_float_floor_2008_w_s(CPUMIPSState *env, uint32_t fst0) in helper_float_floor_2008_w_s() argument
959 set_float_rounding_mode(float_round_down, &env->active_fpu.fp_status); in helper_float_floor_2008_w_s()
960 wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); in helper_float_floor_2008_w_s()
961 restore_rounding_mode(env); in helper_float_floor_2008_w_s()
962 if (get_float_exception_flags(&env->active_fpu.fp_status) in helper_float_floor_2008_w_s()
968 update_fcr31(env, GETPC()); in helper_float_floor_2008_w_s()
1015 uint64_t helper_float_recip_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_recip_d() argument
1019 fdt2 = float64_div(float64_one, fdt0, &env->active_fpu.fp_status); in helper_float_recip_d()
1020 update_fcr31(env, GETPC()); in helper_float_recip_d()
1024 uint32_t helper_float_recip_s(CPUMIPSState *env, uint32_t fst0) in helper_float_recip_s() argument
1028 fst2 = float32_div(float32_one, fst0, &env->active_fpu.fp_status); in helper_float_recip_s()
1029 update_fcr31(env, GETPC()); in helper_float_recip_s()
1033 uint64_t helper_float_rsqrt_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_rsqrt_d() argument
1037 fdt2 = float64_sqrt(fdt0, &env->active_fpu.fp_status); in helper_float_rsqrt_d()
1038 fdt2 = float64_div(float64_one, fdt2, &env->active_fpu.fp_status); in helper_float_rsqrt_d()
1039 update_fcr31(env, GETPC()); in helper_float_rsqrt_d()
1043 uint32_t helper_float_rsqrt_s(CPUMIPSState *env, uint32_t fst0) in helper_float_rsqrt_s() argument
1047 fst2 = float32_sqrt(fst0, &env->active_fpu.fp_status); in helper_float_rsqrt_s()
1048 fst2 = float32_div(float32_one, fst2, &env->active_fpu.fp_status); in helper_float_rsqrt_s()
1049 update_fcr31(env, GETPC()); in helper_float_rsqrt_s()
1053 uint64_t helper_float_recip1_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_recip1_d() argument
1057 fdt2 = float64_div(float64_one, fdt0, &env->active_fpu.fp_status); in helper_float_recip1_d()
1058 update_fcr31(env, GETPC()); in helper_float_recip1_d()
1062 uint32_t helper_float_recip1_s(CPUMIPSState *env, uint32_t fst0) in helper_float_recip1_s() argument
1066 fst2 = float32_div(float32_one, fst0, &env->active_fpu.fp_status); in helper_float_recip1_s()
1067 update_fcr31(env, GETPC()); in helper_float_recip1_s()
1071 uint64_t helper_float_recip1_ps(CPUMIPSState *env, uint64_t fdt0) in helper_float_recip1_ps() argument
1077 &env->active_fpu.fp_status); in helper_float_recip1_ps()
1078 fsth2 = float32_div(float32_one, fdt0 >> 32, &env->active_fpu.fp_status); in helper_float_recip1_ps()
1079 update_fcr31(env, GETPC()); in helper_float_recip1_ps()
1083 uint64_t helper_float_rsqrt1_d(CPUMIPSState *env, uint64_t fdt0) in helper_float_rsqrt1_d() argument
1087 fdt2 = float64_sqrt(fdt0, &env->active_fpu.fp_status); in helper_float_rsqrt1_d()
1088 fdt2 = float64_div(float64_one, fdt2, &env->active_fpu.fp_status); in helper_float_rsqrt1_d()
1089 update_fcr31(env, GETPC()); in helper_float_rsqrt1_d()
1093 uint32_t helper_float_rsqrt1_s(CPUMIPSState *env, uint32_t fst0) in helper_float_rsqrt1_s() argument
1097 fst2 = float32_sqrt(fst0, &env->active_fpu.fp_status); in helper_float_rsqrt1_s()
1098 fst2 = float32_div(float32_one, fst2, &env->active_fpu.fp_status); in helper_float_rsqrt1_s()
1099 update_fcr31(env, GETPC()); in helper_float_rsqrt1_s()
1103 uint64_t helper_float_rsqrt1_ps(CPUMIPSState *env, uint64_t fdt0) in helper_float_rsqrt1_ps() argument
1108 fstl2 = float32_sqrt(fdt0 & 0XFFFFFFFF, &env->active_fpu.fp_status); in helper_float_rsqrt1_ps()
1109 fsth2 = float32_sqrt(fdt0 >> 32, &env->active_fpu.fp_status); in helper_float_rsqrt1_ps()
1110 fstl2 = float32_div(float32_one, fstl2, &env->active_fpu.fp_status); in helper_float_rsqrt1_ps()
1111 fsth2 = float32_div(float32_one, fsth2, &env->active_fpu.fp_status); in helper_float_rsqrt1_ps()
1112 update_fcr31(env, GETPC()); in helper_float_rsqrt1_ps()
1116 uint64_t helper_float_rint_d(CPUMIPSState *env, uint64_t fs) in helper_float_rint_d() argument
1120 fdret = float64_round_to_int(fs, &env->active_fpu.fp_status); in helper_float_rint_d()
1121 update_fcr31(env, GETPC()); in helper_float_rint_d()
1125 uint32_t helper_float_rint_s(CPUMIPSState *env, uint32_t fs) in helper_float_rint_s() argument
1129 fdret = float32_round_to_int(fs, &env->active_fpu.fp_status); in helper_float_rint_s()
1130 update_fcr31(env, GETPC()); in helper_float_rint_s()
1174 uint64_t helper_float_class_d(CPUMIPSState *env, uint64_t arg) in helper_float_class_d() argument
1176 return float_class_d(arg, &env->active_fpu.fp_status); in helper_float_class_d()
1208 uint32_t helper_float_class_s(CPUMIPSState *env, uint32_t arg) in helper_float_class_s() argument
1210 return float_class_s(arg, &env->active_fpu.fp_status); in helper_float_class_s()
1215 uint64_t helper_float_add_d(CPUMIPSState *env, in helper_float_add_d() argument
1220 dt2 = float64_add(fdt0, fdt1, &env->active_fpu.fp_status); in helper_float_add_d()
1221 update_fcr31(env, GETPC()); in helper_float_add_d()
1225 uint32_t helper_float_add_s(CPUMIPSState *env, in helper_float_add_s() argument
1230 wt2 = float32_add(fst0, fst1, &env->active_fpu.fp_status); in helper_float_add_s()
1231 update_fcr31(env, GETPC()); in helper_float_add_s()
1235 uint64_t helper_float_add_ps(CPUMIPSState *env, in helper_float_add_ps() argument
1245 wtl2 = float32_add(fstl0, fstl1, &env->active_fpu.fp_status); in helper_float_add_ps()
1246 wth2 = float32_add(fsth0, fsth1, &env->active_fpu.fp_status); in helper_float_add_ps()
1247 update_fcr31(env, GETPC()); in helper_float_add_ps()
1251 uint64_t helper_float_sub_d(CPUMIPSState *env, in helper_float_sub_d() argument
1256 dt2 = float64_sub(fdt0, fdt1, &env->active_fpu.fp_status); in helper_float_sub_d()
1257 update_fcr31(env, GETPC()); in helper_float_sub_d()
1261 uint32_t helper_float_sub_s(CPUMIPSState *env, in helper_float_sub_s() argument
1266 wt2 = float32_sub(fst0, fst1, &env->active_fpu.fp_status); in helper_float_sub_s()
1267 update_fcr31(env, GETPC()); in helper_float_sub_s()
1271 uint64_t helper_float_sub_ps(CPUMIPSState *env, in helper_float_sub_ps() argument
1281 wtl2 = float32_sub(fstl0, fstl1, &env->active_fpu.fp_status); in helper_float_sub_ps()
1282 wth2 = float32_sub(fsth0, fsth1, &env->active_fpu.fp_status); in helper_float_sub_ps()
1283 update_fcr31(env, GETPC()); in helper_float_sub_ps()
1287 uint64_t helper_float_mul_d(CPUMIPSState *env, in helper_float_mul_d() argument
1292 dt2 = float64_mul(fdt0, fdt1, &env->active_fpu.fp_status); in helper_float_mul_d()
1293 update_fcr31(env, GETPC()); in helper_float_mul_d()
1297 uint32_t helper_float_mul_s(CPUMIPSState *env, in helper_float_mul_s() argument
1302 wt2 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_mul_s()
1303 update_fcr31(env, GETPC()); in helper_float_mul_s()
1307 uint64_t helper_float_mul_ps(CPUMIPSState *env, in helper_float_mul_ps() argument
1317 wtl2 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); in helper_float_mul_ps()
1318 wth2 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); in helper_float_mul_ps()
1319 update_fcr31(env, GETPC()); in helper_float_mul_ps()
1323 uint64_t helper_float_div_d(CPUMIPSState *env, in helper_float_div_d() argument
1328 dt2 = float64_div(fdt0, fdt1, &env->active_fpu.fp_status); in helper_float_div_d()
1329 update_fcr31(env, GETPC()); in helper_float_div_d()
1333 uint32_t helper_float_div_s(CPUMIPSState *env, in helper_float_div_s() argument
1338 wt2 = float32_div(fst0, fst1, &env->active_fpu.fp_status); in helper_float_div_s()
1339 update_fcr31(env, GETPC()); in helper_float_div_s()
1343 uint64_t helper_float_div_ps(CPUMIPSState *env, in helper_float_div_ps() argument
1353 wtl2 = float32_div(fstl0, fstl1, &env->active_fpu.fp_status); in helper_float_div_ps()
1354 wth2 = float32_div(fsth0, fsth1, &env->active_fpu.fp_status); in helper_float_div_ps()
1355 update_fcr31(env, GETPC()); in helper_float_div_ps()
1361 uint64_t helper_float_recip2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) in helper_float_recip2_d() argument
1363 fdt2 = float64_mul(fdt0, fdt2, &env->active_fpu.fp_status); in helper_float_recip2_d()
1365 &env->active_fpu.fp_status)); in helper_float_recip2_d()
1366 update_fcr31(env, GETPC()); in helper_float_recip2_d()
1370 uint32_t helper_float_recip2_s(CPUMIPSState *env, uint32_t fst0, uint32_t fst2) in helper_float_recip2_s() argument
1372 fst2 = float32_mul(fst0, fst2, &env->active_fpu.fp_status); in helper_float_recip2_s()
1374 &env->active_fpu.fp_status)); in helper_float_recip2_s()
1375 update_fcr31(env, GETPC()); in helper_float_recip2_s()
1379 uint64_t helper_float_recip2_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) in helper_float_recip2_ps() argument
1386 fstl2 = float32_mul(fstl0, fstl2, &env->active_fpu.fp_status); in helper_float_recip2_ps()
1387 fsth2 = float32_mul(fsth0, fsth2, &env->active_fpu.fp_status); in helper_float_recip2_ps()
1389 &env->active_fpu.fp_status)); in helper_float_recip2_ps()
1391 &env->active_fpu.fp_status)); in helper_float_recip2_ps()
1392 update_fcr31(env, GETPC()); in helper_float_recip2_ps()
1396 uint64_t helper_float_rsqrt2_d(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) in helper_float_rsqrt2_d() argument
1398 fdt2 = float64_mul(fdt0, fdt2, &env->active_fpu.fp_status); in helper_float_rsqrt2_d()
1399 fdt2 = float64_sub(fdt2, float64_one, &env->active_fpu.fp_status); in helper_float_rsqrt2_d()
1401 &env->active_fpu.fp_status)); in helper_float_rsqrt2_d()
1402 update_fcr31(env, GETPC()); in helper_float_rsqrt2_d()
1406 uint32_t helper_float_rsqrt2_s(CPUMIPSState *env, uint32_t fst0, uint32_t fst2) in helper_float_rsqrt2_s() argument
1408 fst2 = float32_mul(fst0, fst2, &env->active_fpu.fp_status); in helper_float_rsqrt2_s()
1409 fst2 = float32_sub(fst2, float32_one, &env->active_fpu.fp_status); in helper_float_rsqrt2_s()
1411 &env->active_fpu.fp_status)); in helper_float_rsqrt2_s()
1412 update_fcr31(env, GETPC()); in helper_float_rsqrt2_s()
1416 uint64_t helper_float_rsqrt2_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt2) in helper_float_rsqrt2_ps() argument
1423 fstl2 = float32_mul(fstl0, fstl2, &env->active_fpu.fp_status); in helper_float_rsqrt2_ps()
1424 fsth2 = float32_mul(fsth0, fsth2, &env->active_fpu.fp_status); in helper_float_rsqrt2_ps()
1425 fstl2 = float32_sub(fstl2, float32_one, &env->active_fpu.fp_status); in helper_float_rsqrt2_ps()
1426 fsth2 = float32_sub(fsth2, float32_one, &env->active_fpu.fp_status); in helper_float_rsqrt2_ps()
1428 &env->active_fpu.fp_status)); in helper_float_rsqrt2_ps()
1430 &env->active_fpu.fp_status)); in helper_float_rsqrt2_ps()
1431 update_fcr31(env, GETPC()); in helper_float_rsqrt2_ps()
1435 uint64_t helper_float_addr_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1) in helper_float_addr_ps() argument
1444 fstl2 = float32_add(fstl0, fsth0, &env->active_fpu.fp_status); in helper_float_addr_ps()
1445 fsth2 = float32_add(fstl1, fsth1, &env->active_fpu.fp_status); in helper_float_addr_ps()
1446 update_fcr31(env, GETPC()); in helper_float_addr_ps()
1450 uint64_t helper_float_mulr_ps(CPUMIPSState *env, uint64_t fdt0, uint64_t fdt1) in helper_float_mulr_ps() argument
1459 fstl2 = float32_mul(fstl0, fsth0, &env->active_fpu.fp_status); in helper_float_mulr_ps()
1460 fsth2 = float32_mul(fstl1, fsth1, &env->active_fpu.fp_status); in helper_float_mulr_ps()
1461 update_fcr31(env, GETPC()); in helper_float_mulr_ps()
1466 uint32_t helper_float_max_s(CPUMIPSState *env, uint32_t fs, uint32_t ft) in helper_float_max_s() argument
1470 fdret = float32_maxnum(fs, ft, &env->active_fpu.fp_status); in helper_float_max_s()
1472 update_fcr31(env, GETPC()); in helper_float_max_s()
1476 uint64_t helper_float_max_d(CPUMIPSState *env, uint64_t fs, uint64_t ft) in helper_float_max_d() argument
1480 fdret = float64_maxnum(fs, ft, &env->active_fpu.fp_status); in helper_float_max_d()
1482 update_fcr31(env, GETPC()); in helper_float_max_d()
1486 uint32_t helper_float_maxa_s(CPUMIPSState *env, uint32_t fs, uint32_t ft) in helper_float_maxa_s() argument
1490 fdret = float32_maxnummag(fs, ft, &env->active_fpu.fp_status); in helper_float_maxa_s()
1492 update_fcr31(env, GETPC()); in helper_float_maxa_s()
1496 uint64_t helper_float_maxa_d(CPUMIPSState *env, uint64_t fs, uint64_t ft) in helper_float_maxa_d() argument
1500 fdret = float64_maxnummag(fs, ft, &env->active_fpu.fp_status); in helper_float_maxa_d()
1502 update_fcr31(env, GETPC()); in helper_float_maxa_d()
1506 uint32_t helper_float_min_s(CPUMIPSState *env, uint32_t fs, uint32_t ft) in helper_float_min_s() argument
1510 fdret = float32_minnum(fs, ft, &env->active_fpu.fp_status); in helper_float_min_s()
1512 update_fcr31(env, GETPC()); in helper_float_min_s()
1516 uint64_t helper_float_min_d(CPUMIPSState *env, uint64_t fs, uint64_t ft) in helper_float_min_d() argument
1520 fdret = float64_minnum(fs, ft, &env->active_fpu.fp_status); in helper_float_min_d()
1522 update_fcr31(env, GETPC()); in helper_float_min_d()
1526 uint32_t helper_float_mina_s(CPUMIPSState *env, uint32_t fs, uint32_t ft) in helper_float_mina_s() argument
1530 fdret = float32_minnummag(fs, ft, &env->active_fpu.fp_status); in helper_float_mina_s()
1532 update_fcr31(env, GETPC()); in helper_float_mina_s()
1536 uint64_t helper_float_mina_d(CPUMIPSState *env, uint64_t fs, uint64_t ft) in helper_float_mina_d() argument
1540 fdret = float64_minnummag(fs, ft, &env->active_fpu.fp_status); in helper_float_mina_d()
1542 update_fcr31(env, GETPC()); in helper_float_mina_d()
1549 uint64_t helper_float_madd_d(CPUMIPSState *env, uint64_t fst0, in helper_float_madd_d() argument
1552 fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_madd_d()
1553 fst0 = float64_add(fst0, fst2, &env->active_fpu.fp_status); in helper_float_madd_d()
1555 update_fcr31(env, GETPC()); in helper_float_madd_d()
1559 uint32_t helper_float_madd_s(CPUMIPSState *env, uint32_t fst0, in helper_float_madd_s() argument
1562 fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_madd_s()
1563 fst0 = float32_add(fst0, fst2, &env->active_fpu.fp_status); in helper_float_madd_s()
1565 update_fcr31(env, GETPC()); in helper_float_madd_s()
1569 uint64_t helper_float_madd_ps(CPUMIPSState *env, uint64_t fdt0, in helper_float_madd_ps() argument
1579 fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); in helper_float_madd_ps()
1580 fstl0 = float32_add(fstl0, fstl2, &env->active_fpu.fp_status); in helper_float_madd_ps()
1581 fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); in helper_float_madd_ps()
1582 fsth0 = float32_add(fsth0, fsth2, &env->active_fpu.fp_status); in helper_float_madd_ps()
1584 update_fcr31(env, GETPC()); in helper_float_madd_ps()
1588 uint64_t helper_float_msub_d(CPUMIPSState *env, uint64_t fst0, in helper_float_msub_d() argument
1591 fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_msub_d()
1592 fst0 = float64_sub(fst0, fst2, &env->active_fpu.fp_status); in helper_float_msub_d()
1594 update_fcr31(env, GETPC()); in helper_float_msub_d()
1598 uint32_t helper_float_msub_s(CPUMIPSState *env, uint32_t fst0, in helper_float_msub_s() argument
1601 fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_msub_s()
1602 fst0 = float32_sub(fst0, fst2, &env->active_fpu.fp_status); in helper_float_msub_s()
1604 update_fcr31(env, GETPC()); in helper_float_msub_s()
1608 uint64_t helper_float_msub_ps(CPUMIPSState *env, uint64_t fdt0, in helper_float_msub_ps() argument
1618 fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); in helper_float_msub_ps()
1619 fstl0 = float32_sub(fstl0, fstl2, &env->active_fpu.fp_status); in helper_float_msub_ps()
1620 fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); in helper_float_msub_ps()
1621 fsth0 = float32_sub(fsth0, fsth2, &env->active_fpu.fp_status); in helper_float_msub_ps()
1623 update_fcr31(env, GETPC()); in helper_float_msub_ps()
1627 uint64_t helper_float_nmadd_d(CPUMIPSState *env, uint64_t fst0, in helper_float_nmadd_d() argument
1630 fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_nmadd_d()
1631 fst0 = float64_add(fst0, fst2, &env->active_fpu.fp_status); in helper_float_nmadd_d()
1634 update_fcr31(env, GETPC()); in helper_float_nmadd_d()
1638 uint32_t helper_float_nmadd_s(CPUMIPSState *env, uint32_t fst0, in helper_float_nmadd_s() argument
1641 fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_nmadd_s()
1642 fst0 = float32_add(fst0, fst2, &env->active_fpu.fp_status); in helper_float_nmadd_s()
1645 update_fcr31(env, GETPC()); in helper_float_nmadd_s()
1649 uint64_t helper_float_nmadd_ps(CPUMIPSState *env, uint64_t fdt0, in helper_float_nmadd_ps() argument
1659 fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); in helper_float_nmadd_ps()
1660 fstl0 = float32_add(fstl0, fstl2, &env->active_fpu.fp_status); in helper_float_nmadd_ps()
1662 fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); in helper_float_nmadd_ps()
1663 fsth0 = float32_add(fsth0, fsth2, &env->active_fpu.fp_status); in helper_float_nmadd_ps()
1666 update_fcr31(env, GETPC()); in helper_float_nmadd_ps()
1670 uint64_t helper_float_nmsub_d(CPUMIPSState *env, uint64_t fst0, in helper_float_nmsub_d() argument
1673 fst0 = float64_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_nmsub_d()
1674 fst0 = float64_sub(fst0, fst2, &env->active_fpu.fp_status); in helper_float_nmsub_d()
1677 update_fcr31(env, GETPC()); in helper_float_nmsub_d()
1681 uint32_t helper_float_nmsub_s(CPUMIPSState *env, uint32_t fst0, in helper_float_nmsub_s() argument
1684 fst0 = float32_mul(fst0, fst1, &env->active_fpu.fp_status); in helper_float_nmsub_s()
1685 fst0 = float32_sub(fst0, fst2, &env->active_fpu.fp_status); in helper_float_nmsub_s()
1688 update_fcr31(env, GETPC()); in helper_float_nmsub_s()
1692 uint64_t helper_float_nmsub_ps(CPUMIPSState *env, uint64_t fdt0, in helper_float_nmsub_ps() argument
1702 fstl0 = float32_mul(fstl0, fstl1, &env->active_fpu.fp_status); in helper_float_nmsub_ps()
1703 fstl0 = float32_sub(fstl0, fstl2, &env->active_fpu.fp_status); in helper_float_nmsub_ps()
1705 fsth0 = float32_mul(fsth0, fsth1, &env->active_fpu.fp_status); in helper_float_nmsub_ps()
1706 fsth0 = float32_sub(fsth0, fsth2, &env->active_fpu.fp_status); in helper_float_nmsub_ps()
1709 update_fcr31(env, GETPC()); in helper_float_nmsub_ps()
1714 uint32_t helper_float_maddf_s(CPUMIPSState *env, uint32_t fs, in helper_float_maddf_s() argument
1720 &env->active_fpu.fp_status); in helper_float_maddf_s()
1722 update_fcr31(env, GETPC()); in helper_float_maddf_s()
1726 uint64_t helper_float_maddf_d(CPUMIPSState *env, uint64_t fs, in helper_float_maddf_d() argument
1732 &env->active_fpu.fp_status); in helper_float_maddf_d()
1734 update_fcr31(env, GETPC()); in helper_float_maddf_d()
1738 uint32_t helper_float_msubf_s(CPUMIPSState *env, uint32_t fs, in helper_float_msubf_s() argument
1744 &env->active_fpu.fp_status); in helper_float_msubf_s()
1746 update_fcr31(env, GETPC()); in helper_float_msubf_s()
1750 uint64_t helper_float_msubf_d(CPUMIPSState *env, uint64_t fs, in helper_float_msubf_d() argument
1756 &env->active_fpu.fp_status); in helper_float_msubf_d()
1758 update_fcr31(env, GETPC()); in helper_float_msubf_d()
1765 void helper_cmp_d_ ## op(CPUMIPSState *env, uint64_t fdt0, \
1770 update_fcr31(env, GETPC()); \
1772 SET_FP_COND(cc, env->active_fpu); \
1774 CLEAR_FP_COND(cc, env->active_fpu); \
1776 void helper_cmpabs_d_ ## op(CPUMIPSState *env, uint64_t fdt0, \
1783 update_fcr31(env, GETPC()); \
1785 SET_FP_COND(cc, env->active_fpu); \
1787 CLEAR_FP_COND(cc, env->active_fpu); \
1795 &env->active_fpu.fp_status), 0))
1797 &env->active_fpu.fp_status))
1799 &env->active_fpu.fp_status))
1801 &env->active_fpu.fp_status)
1803 &env->active_fpu.fp_status))
1805 &env->active_fpu.fp_status))
1807 &env->active_fpu.fp_status)
1809 &env->active_fpu.fp_status))
1811 &env->active_fpu.fp_status))
1813 &env->active_fpu.fp_status)
1815 &env->active_fpu.fp_status))
1821 &env->active_fpu.fp_status), 0))
1823 &env->active_fpu.fp_status))
1825 &env->active_fpu.fp_status))
1827 &env->active_fpu.fp_status)
1829 &env->active_fpu.fp_status))
1831 &env->active_fpu.fp_status))
1833 &env->active_fpu.fp_status)
1835 &env->active_fpu.fp_status))
1837 &env->active_fpu.fp_status))
1839 &env->active_fpu.fp_status)
1841 &env->active_fpu.fp_status))
1844 void helper_cmp_s_ ## op(CPUMIPSState *env, uint32_t fst0, \
1849 update_fcr31(env, GETPC()); \
1851 SET_FP_COND(cc, env->active_fpu); \
1853 CLEAR_FP_COND(cc, env->active_fpu); \
1855 void helper_cmpabs_s_ ## op(CPUMIPSState *env, uint32_t fst0, \
1862 update_fcr31(env, GETPC()); \
1864 SET_FP_COND(cc, env->active_fpu); \
1866 CLEAR_FP_COND(cc, env->active_fpu); \
1874 &env->active_fpu.fp_status), 0))
1876 &env->active_fpu.fp_status))
1878 &env->active_fpu.fp_status))
1880 &env->active_fpu.fp_status)
1882 &env->active_fpu.fp_status))
1884 &env->active_fpu.fp_status))
1886 &env->active_fpu.fp_status)
1888 &env->active_fpu.fp_status))
1890 &env->active_fpu.fp_status))
1892 &env->active_fpu.fp_status)
1894 &env->active_fpu.fp_status))
1900 &env->active_fpu.fp_status), 0))
1902 &env->active_fpu.fp_status))
1904 &env->active_fpu.fp_status))
1906 &env->active_fpu.fp_status)
1908 &env->active_fpu.fp_status))
1910 &env->active_fpu.fp_status))
1912 &env->active_fpu.fp_status)
1914 &env->active_fpu.fp_status))
1916 &env->active_fpu.fp_status))
1918 &env->active_fpu.fp_status)
1920 &env->active_fpu.fp_status))
1923 void helper_cmp_ps_ ## op(CPUMIPSState *env, uint64_t fdt0, \
1934 update_fcr31(env, GETPC()); \
1936 SET_FP_COND(cc, env->active_fpu); \
1938 CLEAR_FP_COND(cc, env->active_fpu); \
1940 SET_FP_COND(cc + 1, env->active_fpu); \
1942 CLEAR_FP_COND(cc + 1, env->active_fpu); \
1944 void helper_cmpabs_ps_ ## op(CPUMIPSState *env, uint64_t fdt0, \
1955 update_fcr31(env, GETPC()); \
1957 SET_FP_COND(cc, env->active_fpu); \
1959 CLEAR_FP_COND(cc, env->active_fpu); \
1961 SET_FP_COND(cc + 1, env->active_fpu); \
1963 CLEAR_FP_COND(cc + 1, env->active_fpu); \
1971 &env->active_fpu.fp_status), 0),
1973 &env->active_fpu.fp_status), 0))
1975 &env->active_fpu.fp_status),
1977 &env->active_fpu.fp_status))
1979 &env->active_fpu.fp_status),
1981 &env->active_fpu.fp_status))
1983 &env->active_fpu.fp_status)
1985 &env->active_fpu.fp_status),
1987 &env->active_fpu.fp_status)
1989 &env->active_fpu.fp_status))
1991 &env->active_fpu.fp_status),
1993 &env->active_fpu.fp_status))
1995 &env->active_fpu.fp_status)
1997 &env->active_fpu.fp_status),
1999 &env->active_fpu.fp_status)
2001 &env->active_fpu.fp_status))
2003 &env->active_fpu.fp_status),
2005 &env->active_fpu.fp_status))
2007 &env->active_fpu.fp_status)
2009 &env->active_fpu.fp_status),
2011 &env->active_fpu.fp_status)
2013 &env->active_fpu.fp_status))
2019 &env->active_fpu.fp_status), 0),
2021 &env->active_fpu.fp_status), 0))
2023 &env->active_fpu.fp_status),
2025 &env->active_fpu.fp_status))
2027 &env->active_fpu.fp_status),
2029 &env->active_fpu.fp_status))
2031 &env->active_fpu.fp_status)
2033 &env->active_fpu.fp_status),
2035 &env->active_fpu.fp_status)
2037 &env->active_fpu.fp_status))
2039 &env->active_fpu.fp_status),
2041 &env->active_fpu.fp_status))
2043 &env->active_fpu.fp_status)
2045 &env->active_fpu.fp_status),
2047 &env->active_fpu.fp_status)
2049 &env->active_fpu.fp_status))
2051 &env->active_fpu.fp_status),
2053 &env->active_fpu.fp_status))
2055 &env->active_fpu.fp_status)
2057 &env->active_fpu.fp_status),
2059 &env->active_fpu.fp_status)
2061 &env->active_fpu.fp_status))
2065 uint64_t helper_r6_cmp_d_ ## op(CPUMIPSState *env, uint64_t fdt0, \
2070 update_fcr31(env, GETPC()); \
2083 &env->active_fpu.fp_status), 0))
2085 &env->active_fpu.fp_status)))
2087 &env->active_fpu.fp_status)))
2089 &env->active_fpu.fp_status)
2091 &env->active_fpu.fp_status)))
2093 &env->active_fpu.fp_status)))
2095 &env->active_fpu.fp_status)
2097 &env->active_fpu.fp_status)))
2099 &env->active_fpu.fp_status)))
2101 &env->active_fpu.fp_status)
2103 &env->active_fpu.fp_status)))
2109 &env->active_fpu.fp_status), 0))
2111 &env->active_fpu.fp_status)))
2113 &env->active_fpu.fp_status)))
2115 &env->active_fpu.fp_status)
2117 &env->active_fpu.fp_status)))
2119 &env->active_fpu.fp_status)))
2121 &env->active_fpu.fp_status)
2123 &env->active_fpu.fp_status)))
2125 &env->active_fpu.fp_status)))
2127 &env->active_fpu.fp_status)
2129 &env->active_fpu.fp_status)))
2131 &env->active_fpu.fp_status)
2133 &env->active_fpu.fp_status)))
2135 &env->active_fpu.fp_status)
2137 &env->active_fpu.fp_status)
2139 &env->active_fpu.fp_status)))
2141 &env->active_fpu.fp_status)
2143 &env->active_fpu.fp_status)))
2145 &env->active_fpu.fp_status)
2147 &env->active_fpu.fp_status)))
2149 &env->active_fpu.fp_status)
2151 &env->active_fpu.fp_status)
2153 &env->active_fpu.fp_status)))
2155 &env->active_fpu.fp_status)
2157 &env->active_fpu.fp_status)))
2160 uint32_t helper_r6_cmp_s_ ## op(CPUMIPSState *env, uint32_t fst0, \
2165 update_fcr31(env, GETPC()); \
2178 &env->active_fpu.fp_status), 0))
2180 &env->active_fpu.fp_status)))
2182 &env->active_fpu.fp_status)))
2184 &env->active_fpu.fp_status)
2186 &env->active_fpu.fp_status)))
2188 &env->active_fpu.fp_status)))
2190 &env->active_fpu.fp_status)
2192 &env->active_fpu.fp_status)))
2194 &env->active_fpu.fp_status)))
2196 &env->active_fpu.fp_status)
2198 &env->active_fpu.fp_status)))
2204 &env->active_fpu.fp_status), 0))
2206 &env->active_fpu.fp_status)))
2208 &env->active_fpu.fp_status)))
2210 &env->active_fpu.fp_status)
2212 &env->active_fpu.fp_status)))
2214 &env->active_fpu.fp_status)))
2216 &env->active_fpu.fp_status)
2218 &env->active_fpu.fp_status)))
2220 &env->active_fpu.fp_status)))
2222 &env->active_fpu.fp_status)
2224 &env->active_fpu.fp_status)))
2226 &env->active_fpu.fp_status)
2228 &env->active_fpu.fp_status)))
2230 &env->active_fpu.fp_status)
2232 &env->active_fpu.fp_status)
2234 &env->active_fpu.fp_status)))
2236 &env->active_fpu.fp_status)
2238 &env->active_fpu.fp_status)))
2240 &env->active_fpu.fp_status)
2242 &env->active_fpu.fp_status)))
2244 &env->active_fpu.fp_status)
2246 &env->active_fpu.fp_status)
2248 &env->active_fpu.fp_status)))
2250 &env->active_fpu.fp_status)
2252 &env->active_fpu.fp_status)))