Lines Matching full:env

27 target_ulong riscv_cpu_get_fflags(CPURISCVState *env)  in riscv_cpu_get_fflags()  argument
29 int soft = get_float_exception_flags(&env->fp_status); in riscv_cpu_get_fflags()
41 void riscv_cpu_set_fflags(CPURISCVState *env, target_ulong hard) in riscv_cpu_set_fflags() argument
51 set_float_exception_flags(soft, &env->fp_status); in riscv_cpu_set_fflags()
54 void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm) in helper_set_rounding_mode() argument
59 rm = env->frm; in helper_set_rounding_mode()
78 riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); in helper_set_rounding_mode()
81 set_float_rounding_mode(softrm, &env->fp_status); in helper_set_rounding_mode()
84 void helper_set_rounding_mode_chkfrm(CPURISCVState *env, uint32_t rm) in helper_set_rounding_mode_chkfrm() argument
89 if (unlikely(env->frm >= 5)) { in helper_set_rounding_mode_chkfrm()
90 riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); in helper_set_rounding_mode_chkfrm()
93 rm = env->frm; in helper_set_rounding_mode_chkfrm()
118 set_float_rounding_mode(softrm, &env->fp_status); in helper_set_rounding_mode_chkfrm()
121 static uint64_t do_fmadd_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2, in do_fmadd_h() argument
124 float16 frs1 = check_nanbox_h(env, rs1); in do_fmadd_h()
125 float16 frs2 = check_nanbox_h(env, rs2); in do_fmadd_h()
126 float16 frs3 = check_nanbox_h(env, rs3); in do_fmadd_h()
127 return nanbox_h(env, float16_muladd(frs1, frs2, frs3, flags, in do_fmadd_h()
128 &env->fp_status)); in do_fmadd_h()
131 static uint64_t do_fmadd_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2, in do_fmadd_s() argument
134 float32 frs1 = check_nanbox_s(env, rs1); in do_fmadd_s()
135 float32 frs2 = check_nanbox_s(env, rs2); in do_fmadd_s()
136 float32 frs3 = check_nanbox_s(env, rs3); in do_fmadd_s()
137 return nanbox_s(env, float32_muladd(frs1, frs2, frs3, flags, in do_fmadd_s()
138 &env->fp_status)); in do_fmadd_s()
141 uint64_t helper_fmadd_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmadd_s() argument
144 return do_fmadd_s(env, frs1, frs2, frs3, 0); in helper_fmadd_s()
147 uint64_t helper_fmadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmadd_d() argument
150 return float64_muladd(frs1, frs2, frs3, 0, &env->fp_status); in helper_fmadd_d()
153 uint64_t helper_fmadd_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmadd_h() argument
156 return do_fmadd_h(env, frs1, frs2, frs3, 0); in helper_fmadd_h()
159 uint64_t helper_fmsub_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmsub_s() argument
162 return do_fmadd_s(env, frs1, frs2, frs3, float_muladd_negate_c); in helper_fmsub_s()
165 uint64_t helper_fmsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmsub_d() argument
169 &env->fp_status); in helper_fmsub_d()
172 uint64_t helper_fmsub_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmsub_h() argument
175 return do_fmadd_h(env, frs1, frs2, frs3, float_muladd_negate_c); in helper_fmsub_h()
178 uint64_t helper_fnmsub_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmsub_s() argument
181 return do_fmadd_s(env, frs1, frs2, frs3, float_muladd_negate_product); in helper_fnmsub_s()
184 uint64_t helper_fnmsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmsub_d() argument
188 &env->fp_status); in helper_fnmsub_d()
191 uint64_t helper_fnmsub_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmsub_h() argument
194 return do_fmadd_h(env, frs1, frs2, frs3, float_muladd_negate_product); in helper_fnmsub_h()
197 uint64_t helper_fnmadd_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmadd_s() argument
200 return do_fmadd_s(env, frs1, frs2, frs3, in helper_fnmadd_s()
204 uint64_t helper_fnmadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmadd_d() argument
208 float_muladd_negate_product, &env->fp_status); in helper_fnmadd_d()
211 uint64_t helper_fnmadd_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmadd_h() argument
214 return do_fmadd_h(env, frs1, frs2, frs3, in helper_fnmadd_h()
218 uint64_t helper_fadd_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fadd_s() argument
220 float32 frs1 = check_nanbox_s(env, rs1); in helper_fadd_s()
221 float32 frs2 = check_nanbox_s(env, rs2); in helper_fadd_s()
222 return nanbox_s(env, float32_add(frs1, frs2, &env->fp_status)); in helper_fadd_s()
225 uint64_t helper_fsub_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fsub_s() argument
227 float32 frs1 = check_nanbox_s(env, rs1); in helper_fsub_s()
228 float32 frs2 = check_nanbox_s(env, rs2); in helper_fsub_s()
229 return nanbox_s(env, float32_sub(frs1, frs2, &env->fp_status)); in helper_fsub_s()
232 uint64_t helper_fmul_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmul_s() argument
234 float32 frs1 = check_nanbox_s(env, rs1); in helper_fmul_s()
235 float32 frs2 = check_nanbox_s(env, rs2); in helper_fmul_s()
236 return nanbox_s(env, float32_mul(frs1, frs2, &env->fp_status)); in helper_fmul_s()
239 uint64_t helper_fdiv_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fdiv_s() argument
241 float32 frs1 = check_nanbox_s(env, rs1); in helper_fdiv_s()
242 float32 frs2 = check_nanbox_s(env, rs2); in helper_fdiv_s()
243 return nanbox_s(env, float32_div(frs1, frs2, &env->fp_status)); in helper_fdiv_s()
246 uint64_t helper_fmin_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmin_s() argument
248 float32 frs1 = check_nanbox_s(env, rs1); in helper_fmin_s()
249 float32 frs2 = check_nanbox_s(env, rs2); in helper_fmin_s()
250 return nanbox_s(env, env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmin_s()
251 float32_minnum(frs1, frs2, &env->fp_status) : in helper_fmin_s()
252 float32_minimum_number(frs1, frs2, &env->fp_status)); in helper_fmin_s()
255 uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fminm_s() argument
257 float32 frs1 = check_nanbox_s(env, rs1); in helper_fminm_s()
258 float32 frs2 = check_nanbox_s(env, rs2); in helper_fminm_s()
259 float32 ret = float32_min(frs1, frs2, &env->fp_status); in helper_fminm_s()
260 return nanbox_s(env, ret); in helper_fminm_s()
263 uint64_t helper_fmax_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmax_s() argument
265 float32 frs1 = check_nanbox_s(env, rs1); in helper_fmax_s()
266 float32 frs2 = check_nanbox_s(env, rs2); in helper_fmax_s()
267 return nanbox_s(env, env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmax_s()
268 float32_maxnum(frs1, frs2, &env->fp_status) : in helper_fmax_s()
269 float32_maximum_number(frs1, frs2, &env->fp_status)); in helper_fmax_s()
272 uint64_t helper_fmaxm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmaxm_s() argument
274 float32 frs1 = check_nanbox_s(env, rs1); in helper_fmaxm_s()
275 float32 frs2 = check_nanbox_s(env, rs2); in helper_fmaxm_s()
276 float32 ret = float32_max(frs1, frs2, &env->fp_status); in helper_fmaxm_s()
277 return nanbox_s(env, ret); in helper_fmaxm_s()
280 uint64_t helper_fsqrt_s(CPURISCVState *env, uint64_t rs1) in helper_fsqrt_s() argument
282 float32 frs1 = check_nanbox_s(env, rs1); in helper_fsqrt_s()
283 return nanbox_s(env, float32_sqrt(frs1, &env->fp_status)); in helper_fsqrt_s()
286 target_ulong helper_fle_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fle_s() argument
288 float32 frs1 = check_nanbox_s(env, rs1); in helper_fle_s()
289 float32 frs2 = check_nanbox_s(env, rs2); in helper_fle_s()
290 return float32_le(frs1, frs2, &env->fp_status); in helper_fle_s()
293 target_ulong helper_fleq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fleq_s() argument
295 float32 frs1 = check_nanbox_s(env, rs1); in helper_fleq_s()
296 float32 frs2 = check_nanbox_s(env, rs2); in helper_fleq_s()
297 return float32_le_quiet(frs1, frs2, &env->fp_status); in helper_fleq_s()
300 target_ulong helper_flt_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_flt_s() argument
302 float32 frs1 = check_nanbox_s(env, rs1); in helper_flt_s()
303 float32 frs2 = check_nanbox_s(env, rs2); in helper_flt_s()
304 return float32_lt(frs1, frs2, &env->fp_status); in helper_flt_s()
307 target_ulong helper_fltq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fltq_s() argument
309 float32 frs1 = check_nanbox_s(env, rs1); in helper_fltq_s()
310 float32 frs2 = check_nanbox_s(env, rs2); in helper_fltq_s()
311 return float32_lt_quiet(frs1, frs2, &env->fp_status); in helper_fltq_s()
314 target_ulong helper_feq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_feq_s() argument
316 float32 frs1 = check_nanbox_s(env, rs1); in helper_feq_s()
317 float32 frs2 = check_nanbox_s(env, rs2); in helper_feq_s()
318 return float32_eq_quiet(frs1, frs2, &env->fp_status); in helper_feq_s()
321 target_ulong helper_fcvt_w_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_w_s() argument
323 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_w_s()
324 return float32_to_int32(frs1, &env->fp_status); in helper_fcvt_w_s()
327 target_ulong helper_fcvt_wu_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_wu_s() argument
329 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_wu_s()
330 return (int32_t)float32_to_uint32(frs1, &env->fp_status); in helper_fcvt_wu_s()
333 target_ulong helper_fcvt_l_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_l_s() argument
335 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_l_s()
336 return float32_to_int64(frs1, &env->fp_status); in helper_fcvt_l_s()
339 target_ulong helper_fcvt_lu_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_lu_s() argument
341 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_lu_s()
342 return float32_to_uint64(frs1, &env->fp_status); in helper_fcvt_lu_s()
345 uint64_t helper_fcvt_s_w(CPURISCVState *env, target_ulong rs1) in helper_fcvt_s_w() argument
347 return nanbox_s(env, int32_to_float32((int32_t)rs1, &env->fp_status)); in helper_fcvt_s_w()
350 uint64_t helper_fcvt_s_wu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_s_wu() argument
352 return nanbox_s(env, uint32_to_float32((uint32_t)rs1, &env->fp_status)); in helper_fcvt_s_wu()
355 uint64_t helper_fcvt_s_l(CPURISCVState *env, target_ulong rs1) in helper_fcvt_s_l() argument
357 return nanbox_s(env, int64_to_float32(rs1, &env->fp_status)); in helper_fcvt_s_l()
360 uint64_t helper_fcvt_s_lu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_s_lu() argument
362 return nanbox_s(env, uint64_to_float32(rs1, &env->fp_status)); in helper_fcvt_s_lu()
365 target_ulong helper_fclass_s(CPURISCVState *env, uint64_t rs1) in helper_fclass_s() argument
367 float32 frs1 = check_nanbox_s(env, rs1); in helper_fclass_s()
371 uint64_t helper_fround_s(CPURISCVState *env, uint64_t rs1) in helper_fround_s() argument
373 float_status *fs = &env->fp_status; in helper_fround_s()
375 float32 frs1 = check_nanbox_s(env, rs1); in helper_fround_s()
385 return nanbox_s(env, frs1); in helper_fround_s()
388 uint64_t helper_froundnx_s(CPURISCVState *env, uint64_t rs1) in helper_froundnx_s() argument
390 float32 frs1 = check_nanbox_s(env, rs1); in helper_froundnx_s()
391 frs1 = float32_round_to_int(frs1, &env->fp_status); in helper_froundnx_s()
392 return nanbox_s(env, frs1); in helper_froundnx_s()
395 uint64_t helper_fadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fadd_d() argument
397 return float64_add(frs1, frs2, &env->fp_status); in helper_fadd_d()
400 uint64_t helper_fsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fsub_d() argument
402 return float64_sub(frs1, frs2, &env->fp_status); in helper_fsub_d()
405 uint64_t helper_fmul_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fmul_d() argument
407 return float64_mul(frs1, frs2, &env->fp_status); in helper_fmul_d()
410 uint64_t helper_fdiv_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fdiv_d() argument
412 return float64_div(frs1, frs2, &env->fp_status); in helper_fdiv_d()
415 uint64_t helper_fmin_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fmin_d() argument
417 return env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmin_d()
418 float64_minnum(frs1, frs2, &env->fp_status) : in helper_fmin_d()
419 float64_minimum_number(frs1, frs2, &env->fp_status); in helper_fmin_d()
422 uint64_t helper_fminm_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fminm_d() argument
424 return float64_min(frs1, frs2, &env->fp_status); in helper_fminm_d()
427 uint64_t helper_fmax_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fmax_d() argument
429 return env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmax_d()
430 float64_maxnum(frs1, frs2, &env->fp_status) : in helper_fmax_d()
431 float64_maximum_number(frs1, frs2, &env->fp_status); in helper_fmax_d()
434 uint64_t helper_fmaxm_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fmaxm_d() argument
436 return float64_max(frs1, frs2, &env->fp_status); in helper_fmaxm_d()
439 uint64_t helper_fcvt_s_d(CPURISCVState *env, uint64_t rs1) in helper_fcvt_s_d() argument
441 return nanbox_s(env, float64_to_float32(rs1, &env->fp_status)); in helper_fcvt_s_d()
444 uint64_t helper_fcvt_d_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_d_s() argument
446 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_d_s()
447 return float32_to_float64(frs1, &env->fp_status); in helper_fcvt_d_s()
450 uint64_t helper_fsqrt_d(CPURISCVState *env, uint64_t frs1) in helper_fsqrt_d() argument
452 return float64_sqrt(frs1, &env->fp_status); in helper_fsqrt_d()
455 target_ulong helper_fle_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fle_d() argument
457 return float64_le(frs1, frs2, &env->fp_status); in helper_fle_d()
460 target_ulong helper_fleq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fleq_d() argument
462 return float64_le_quiet(frs1, frs2, &env->fp_status); in helper_fleq_d()
465 target_ulong helper_flt_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_flt_d() argument
467 return float64_lt(frs1, frs2, &env->fp_status); in helper_flt_d()
470 target_ulong helper_fltq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fltq_d() argument
472 return float64_lt_quiet(frs1, frs2, &env->fp_status); in helper_fltq_d()
475 target_ulong helper_feq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_feq_d() argument
477 return float64_eq_quiet(frs1, frs2, &env->fp_status); in helper_feq_d()
480 target_ulong helper_fcvt_w_d(CPURISCVState *env, uint64_t frs1) in helper_fcvt_w_d() argument
482 return float64_to_int32(frs1, &env->fp_status); in helper_fcvt_w_d()
485 uint64_t helper_fcvtmod_w_d(CPURISCVState *env, uint64_t value) in helper_fcvtmod_w_d() argument
487 return float64_to_int32_modulo(value, float_round_to_zero, &env->fp_status); in helper_fcvtmod_w_d()
490 target_ulong helper_fcvt_wu_d(CPURISCVState *env, uint64_t frs1) in helper_fcvt_wu_d() argument
492 return (int32_t)float64_to_uint32(frs1, &env->fp_status); in helper_fcvt_wu_d()
495 target_ulong helper_fcvt_l_d(CPURISCVState *env, uint64_t frs1) in helper_fcvt_l_d() argument
497 return float64_to_int64(frs1, &env->fp_status); in helper_fcvt_l_d()
500 target_ulong helper_fcvt_lu_d(CPURISCVState *env, uint64_t frs1) in helper_fcvt_lu_d() argument
502 return float64_to_uint64(frs1, &env->fp_status); in helper_fcvt_lu_d()
505 uint64_t helper_fcvt_d_w(CPURISCVState *env, target_ulong rs1) in helper_fcvt_d_w() argument
507 return int32_to_float64((int32_t)rs1, &env->fp_status); in helper_fcvt_d_w()
510 uint64_t helper_fcvt_d_wu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_d_wu() argument
512 return uint32_to_float64((uint32_t)rs1, &env->fp_status); in helper_fcvt_d_wu()
515 uint64_t helper_fcvt_d_l(CPURISCVState *env, target_ulong rs1) in helper_fcvt_d_l() argument
517 return int64_to_float64(rs1, &env->fp_status); in helper_fcvt_d_l()
520 uint64_t helper_fcvt_d_lu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_d_lu() argument
522 return uint64_to_float64(rs1, &env->fp_status); in helper_fcvt_d_lu()
530 uint64_t helper_fround_d(CPURISCVState *env, uint64_t frs1) in helper_fround_d() argument
532 float_status *fs = &env->fp_status; in helper_fround_d()
546 uint64_t helper_froundnx_d(CPURISCVState *env, uint64_t frs1) in helper_froundnx_d() argument
548 return float64_round_to_int(frs1, &env->fp_status); in helper_froundnx_d()
551 uint64_t helper_fadd_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fadd_h() argument
553 float16 frs1 = check_nanbox_h(env, rs1); in helper_fadd_h()
554 float16 frs2 = check_nanbox_h(env, rs2); in helper_fadd_h()
555 return nanbox_h(env, float16_add(frs1, frs2, &env->fp_status)); in helper_fadd_h()
558 uint64_t helper_fsub_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fsub_h() argument
560 float16 frs1 = check_nanbox_h(env, rs1); in helper_fsub_h()
561 float16 frs2 = check_nanbox_h(env, rs2); in helper_fsub_h()
562 return nanbox_h(env, float16_sub(frs1, frs2, &env->fp_status)); in helper_fsub_h()
565 uint64_t helper_fmul_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmul_h() argument
567 float16 frs1 = check_nanbox_h(env, rs1); in helper_fmul_h()
568 float16 frs2 = check_nanbox_h(env, rs2); in helper_fmul_h()
569 return nanbox_h(env, float16_mul(frs1, frs2, &env->fp_status)); in helper_fmul_h()
572 uint64_t helper_fdiv_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fdiv_h() argument
574 float16 frs1 = check_nanbox_h(env, rs1); in helper_fdiv_h()
575 float16 frs2 = check_nanbox_h(env, rs2); in helper_fdiv_h()
576 return nanbox_h(env, float16_div(frs1, frs2, &env->fp_status)); in helper_fdiv_h()
579 uint64_t helper_fmin_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmin_h() argument
581 float16 frs1 = check_nanbox_h(env, rs1); in helper_fmin_h()
582 float16 frs2 = check_nanbox_h(env, rs2); in helper_fmin_h()
583 return nanbox_h(env, env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmin_h()
584 float16_minnum(frs1, frs2, &env->fp_status) : in helper_fmin_h()
585 float16_minimum_number(frs1, frs2, &env->fp_status)); in helper_fmin_h()
588 uint64_t helper_fminm_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fminm_h() argument
590 float16 frs1 = check_nanbox_h(env, rs1); in helper_fminm_h()
591 float16 frs2 = check_nanbox_h(env, rs2); in helper_fminm_h()
592 float16 ret = float16_min(frs1, frs2, &env->fp_status); in helper_fminm_h()
593 return nanbox_h(env, ret); in helper_fminm_h()
596 uint64_t helper_fmax_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmax_h() argument
598 float16 frs1 = check_nanbox_h(env, rs1); in helper_fmax_h()
599 float16 frs2 = check_nanbox_h(env, rs2); in helper_fmax_h()
600 return nanbox_h(env, env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmax_h()
601 float16_maxnum(frs1, frs2, &env->fp_status) : in helper_fmax_h()
602 float16_maximum_number(frs1, frs2, &env->fp_status)); in helper_fmax_h()
605 uint64_t helper_fmaxm_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmaxm_h() argument
607 float16 frs1 = check_nanbox_h(env, rs1); in helper_fmaxm_h()
608 float16 frs2 = check_nanbox_h(env, rs2); in helper_fmaxm_h()
609 float16 ret = float16_max(frs1, frs2, &env->fp_status); in helper_fmaxm_h()
610 return nanbox_h(env, ret); in helper_fmaxm_h()
613 uint64_t helper_fsqrt_h(CPURISCVState *env, uint64_t rs1) in helper_fsqrt_h() argument
615 float16 frs1 = check_nanbox_h(env, rs1); in helper_fsqrt_h()
616 return nanbox_h(env, float16_sqrt(frs1, &env->fp_status)); in helper_fsqrt_h()
619 target_ulong helper_fle_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fle_h() argument
621 float16 frs1 = check_nanbox_h(env, rs1); in helper_fle_h()
622 float16 frs2 = check_nanbox_h(env, rs2); in helper_fle_h()
623 return float16_le(frs1, frs2, &env->fp_status); in helper_fle_h()
626 target_ulong helper_fleq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fleq_h() argument
628 float16 frs1 = check_nanbox_h(env, rs1); in helper_fleq_h()
629 float16 frs2 = check_nanbox_h(env, rs2); in helper_fleq_h()
630 return float16_le_quiet(frs1, frs2, &env->fp_status); in helper_fleq_h()
633 target_ulong helper_flt_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_flt_h() argument
635 float16 frs1 = check_nanbox_h(env, rs1); in helper_flt_h()
636 float16 frs2 = check_nanbox_h(env, rs2); in helper_flt_h()
637 return float16_lt(frs1, frs2, &env->fp_status); in helper_flt_h()
640 target_ulong helper_fltq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fltq_h() argument
642 float16 frs1 = check_nanbox_h(env, rs1); in helper_fltq_h()
643 float16 frs2 = check_nanbox_h(env, rs2); in helper_fltq_h()
644 return float16_lt_quiet(frs1, frs2, &env->fp_status); in helper_fltq_h()
647 target_ulong helper_feq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_feq_h() argument
649 float16 frs1 = check_nanbox_h(env, rs1); in helper_feq_h()
650 float16 frs2 = check_nanbox_h(env, rs2); in helper_feq_h()
651 return float16_eq_quiet(frs1, frs2, &env->fp_status); in helper_feq_h()
654 target_ulong helper_fclass_h(CPURISCVState *env, uint64_t rs1) in helper_fclass_h() argument
656 float16 frs1 = check_nanbox_h(env, rs1); in helper_fclass_h()
660 uint64_t helper_fround_h(CPURISCVState *env, uint64_t rs1) in helper_fround_h() argument
662 float_status *fs = &env->fp_status; in helper_fround_h()
664 float16 frs1 = check_nanbox_h(env, rs1); in helper_fround_h()
674 return nanbox_h(env, frs1); in helper_fround_h()
677 uint64_t helper_froundnx_h(CPURISCVState *env, uint64_t rs1) in helper_froundnx_h() argument
679 float16 frs1 = check_nanbox_h(env, rs1); in helper_froundnx_h()
680 frs1 = float16_round_to_int(frs1, &env->fp_status); in helper_froundnx_h()
681 return nanbox_h(env, frs1); in helper_froundnx_h()
684 target_ulong helper_fcvt_w_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_w_h() argument
686 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_w_h()
687 return float16_to_int32(frs1, &env->fp_status); in helper_fcvt_w_h()
690 target_ulong helper_fcvt_wu_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_wu_h() argument
692 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_wu_h()
693 return (int32_t)float16_to_uint32(frs1, &env->fp_status); in helper_fcvt_wu_h()
696 target_ulong helper_fcvt_l_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_l_h() argument
698 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_l_h()
699 return float16_to_int64(frs1, &env->fp_status); in helper_fcvt_l_h()
702 target_ulong helper_fcvt_lu_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_lu_h() argument
704 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_lu_h()
705 return float16_to_uint64(frs1, &env->fp_status); in helper_fcvt_lu_h()
708 uint64_t helper_fcvt_h_w(CPURISCVState *env, target_ulong rs1) in helper_fcvt_h_w() argument
710 return nanbox_h(env, int32_to_float16((int32_t)rs1, &env->fp_status)); in helper_fcvt_h_w()
713 uint64_t helper_fcvt_h_wu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_h_wu() argument
715 return nanbox_h(env, uint32_to_float16((uint32_t)rs1, &env->fp_status)); in helper_fcvt_h_wu()
718 uint64_t helper_fcvt_h_l(CPURISCVState *env, target_ulong rs1) in helper_fcvt_h_l() argument
720 return nanbox_h(env, int64_to_float16(rs1, &env->fp_status)); in helper_fcvt_h_l()
723 uint64_t helper_fcvt_h_lu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_h_lu() argument
725 return nanbox_h(env, uint64_to_float16(rs1, &env->fp_status)); in helper_fcvt_h_lu()
728 uint64_t helper_fcvt_h_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_h_s() argument
730 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_h_s()
731 return nanbox_h(env, float32_to_float16(frs1, true, &env->fp_status)); in helper_fcvt_h_s()
734 uint64_t helper_fcvt_s_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_s_h() argument
736 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_s_h()
737 return nanbox_s(env, float16_to_float32(frs1, true, &env->fp_status)); in helper_fcvt_s_h()
740 uint64_t helper_fcvt_h_d(CPURISCVState *env, uint64_t rs1) in helper_fcvt_h_d() argument
742 return nanbox_h(env, float64_to_float16(rs1, true, &env->fp_status)); in helper_fcvt_h_d()
745 uint64_t helper_fcvt_d_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_d_h() argument
747 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_d_h()
748 return float16_to_float64(frs1, true, &env->fp_status); in helper_fcvt_d_h()
751 uint64_t helper_fcvt_bf16_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_bf16_s() argument
753 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_bf16_s()
754 return nanbox_h(env, float32_to_bfloat16(frs1, &env->fp_status)); in helper_fcvt_bf16_s()
757 uint64_t helper_fcvt_s_bf16(CPURISCVState *env, uint64_t rs1) in helper_fcvt_s_bf16() argument
759 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_s_bf16()
760 return nanbox_s(env, bfloat16_to_float32(frs1, &env->fp_status)); in helper_fcvt_s_bf16()