Lines Matching full:env
26 target_ulong riscv_cpu_get_fflags(CPURISCVState *env) in riscv_cpu_get_fflags() argument
28 int soft = get_float_exception_flags(&env->fp_status); in riscv_cpu_get_fflags()
40 void riscv_cpu_set_fflags(CPURISCVState *env, target_ulong hard) in riscv_cpu_set_fflags() argument
50 set_float_exception_flags(soft, &env->fp_status); in riscv_cpu_set_fflags()
53 void helper_set_rounding_mode(CPURISCVState *env, uint32_t rm) in helper_set_rounding_mode() argument
58 rm = env->frm; in helper_set_rounding_mode()
77 riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); in helper_set_rounding_mode()
80 set_float_rounding_mode(softrm, &env->fp_status); in helper_set_rounding_mode()
83 void helper_set_rounding_mode_chkfrm(CPURISCVState *env, uint32_t rm) in helper_set_rounding_mode_chkfrm() argument
88 if (unlikely(env->frm >= 5)) { in helper_set_rounding_mode_chkfrm()
89 riscv_raise_exception(env, RISCV_EXCP_ILLEGAL_INST, GETPC()); in helper_set_rounding_mode_chkfrm()
92 rm = env->frm; in helper_set_rounding_mode_chkfrm()
117 set_float_rounding_mode(softrm, &env->fp_status); in helper_set_rounding_mode_chkfrm()
120 static uint64_t do_fmadd_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2, in do_fmadd_h() argument
123 float16 frs1 = check_nanbox_h(env, rs1); in do_fmadd_h()
124 float16 frs2 = check_nanbox_h(env, rs2); in do_fmadd_h()
125 float16 frs3 = check_nanbox_h(env, rs3); in do_fmadd_h()
126 return nanbox_h(env, float16_muladd(frs1, frs2, frs3, flags, in do_fmadd_h()
127 &env->fp_status)); in do_fmadd_h()
130 static uint64_t do_fmadd_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2, in do_fmadd_s() argument
133 float32 frs1 = check_nanbox_s(env, rs1); in do_fmadd_s()
134 float32 frs2 = check_nanbox_s(env, rs2); in do_fmadd_s()
135 float32 frs3 = check_nanbox_s(env, rs3); in do_fmadd_s()
136 return nanbox_s(env, float32_muladd(frs1, frs2, frs3, flags, in do_fmadd_s()
137 &env->fp_status)); in do_fmadd_s()
140 uint64_t helper_fmadd_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmadd_s() argument
143 return do_fmadd_s(env, frs1, frs2, frs3, 0); in helper_fmadd_s()
146 uint64_t helper_fmadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmadd_d() argument
149 return float64_muladd(frs1, frs2, frs3, 0, &env->fp_status); in helper_fmadd_d()
152 uint64_t helper_fmadd_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmadd_h() argument
155 return do_fmadd_h(env, frs1, frs2, frs3, 0); in helper_fmadd_h()
158 uint64_t helper_fmsub_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmsub_s() argument
161 return do_fmadd_s(env, frs1, frs2, frs3, float_muladd_negate_c); in helper_fmsub_s()
164 uint64_t helper_fmsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmsub_d() argument
168 &env->fp_status); in helper_fmsub_d()
171 uint64_t helper_fmsub_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fmsub_h() argument
174 return do_fmadd_h(env, frs1, frs2, frs3, float_muladd_negate_c); in helper_fmsub_h()
177 uint64_t helper_fnmsub_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmsub_s() argument
180 return do_fmadd_s(env, frs1, frs2, frs3, float_muladd_negate_product); in helper_fnmsub_s()
183 uint64_t helper_fnmsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmsub_d() argument
187 &env->fp_status); in helper_fnmsub_d()
190 uint64_t helper_fnmsub_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmsub_h() argument
193 return do_fmadd_h(env, frs1, frs2, frs3, float_muladd_negate_product); in helper_fnmsub_h()
196 uint64_t helper_fnmadd_s(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmadd_s() argument
199 return do_fmadd_s(env, frs1, frs2, frs3, in helper_fnmadd_s()
203 uint64_t helper_fnmadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmadd_d() argument
207 float_muladd_negate_product, &env->fp_status); in helper_fnmadd_d()
210 uint64_t helper_fnmadd_h(CPURISCVState *env, uint64_t frs1, uint64_t frs2, in helper_fnmadd_h() argument
213 return do_fmadd_h(env, frs1, frs2, frs3, in helper_fnmadd_h()
217 uint64_t helper_fadd_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fadd_s() argument
219 float32 frs1 = check_nanbox_s(env, rs1); in helper_fadd_s()
220 float32 frs2 = check_nanbox_s(env, rs2); in helper_fadd_s()
221 return nanbox_s(env, float32_add(frs1, frs2, &env->fp_status)); in helper_fadd_s()
224 uint64_t helper_fsub_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fsub_s() argument
226 float32 frs1 = check_nanbox_s(env, rs1); in helper_fsub_s()
227 float32 frs2 = check_nanbox_s(env, rs2); in helper_fsub_s()
228 return nanbox_s(env, float32_sub(frs1, frs2, &env->fp_status)); in helper_fsub_s()
231 uint64_t helper_fmul_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmul_s() argument
233 float32 frs1 = check_nanbox_s(env, rs1); in helper_fmul_s()
234 float32 frs2 = check_nanbox_s(env, rs2); in helper_fmul_s()
235 return nanbox_s(env, float32_mul(frs1, frs2, &env->fp_status)); in helper_fmul_s()
238 uint64_t helper_fdiv_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fdiv_s() argument
240 float32 frs1 = check_nanbox_s(env, rs1); in helper_fdiv_s()
241 float32 frs2 = check_nanbox_s(env, rs2); in helper_fdiv_s()
242 return nanbox_s(env, float32_div(frs1, frs2, &env->fp_status)); in helper_fdiv_s()
245 uint64_t helper_fmin_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmin_s() argument
247 float32 frs1 = check_nanbox_s(env, rs1); in helper_fmin_s()
248 float32 frs2 = check_nanbox_s(env, rs2); in helper_fmin_s()
249 return nanbox_s(env, env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmin_s()
250 float32_minnum(frs1, frs2, &env->fp_status) : in helper_fmin_s()
251 float32_minimum_number(frs1, frs2, &env->fp_status)); in helper_fmin_s()
254 uint64_t helper_fminm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fminm_s() argument
256 float32 frs1 = check_nanbox_s(env, rs1); in helper_fminm_s()
257 float32 frs2 = check_nanbox_s(env, rs2); in helper_fminm_s()
258 float32 ret = float32_min(frs1, frs2, &env->fp_status); in helper_fminm_s()
259 return nanbox_s(env, ret); in helper_fminm_s()
262 uint64_t helper_fmax_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmax_s() argument
264 float32 frs1 = check_nanbox_s(env, rs1); in helper_fmax_s()
265 float32 frs2 = check_nanbox_s(env, rs2); in helper_fmax_s()
266 return nanbox_s(env, env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmax_s()
267 float32_maxnum(frs1, frs2, &env->fp_status) : in helper_fmax_s()
268 float32_maximum_number(frs1, frs2, &env->fp_status)); in helper_fmax_s()
271 uint64_t helper_fmaxm_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmaxm_s() argument
273 float32 frs1 = check_nanbox_s(env, rs1); in helper_fmaxm_s()
274 float32 frs2 = check_nanbox_s(env, rs2); in helper_fmaxm_s()
275 float32 ret = float32_max(frs1, frs2, &env->fp_status); in helper_fmaxm_s()
276 return nanbox_s(env, ret); in helper_fmaxm_s()
279 uint64_t helper_fsqrt_s(CPURISCVState *env, uint64_t rs1) in helper_fsqrt_s() argument
281 float32 frs1 = check_nanbox_s(env, rs1); in helper_fsqrt_s()
282 return nanbox_s(env, float32_sqrt(frs1, &env->fp_status)); in helper_fsqrt_s()
285 target_ulong helper_fle_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fle_s() argument
287 float32 frs1 = check_nanbox_s(env, rs1); in helper_fle_s()
288 float32 frs2 = check_nanbox_s(env, rs2); in helper_fle_s()
289 return float32_le(frs1, frs2, &env->fp_status); in helper_fle_s()
292 target_ulong helper_fleq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fleq_s() argument
294 float32 frs1 = check_nanbox_s(env, rs1); in helper_fleq_s()
295 float32 frs2 = check_nanbox_s(env, rs2); in helper_fleq_s()
296 return float32_le_quiet(frs1, frs2, &env->fp_status); in helper_fleq_s()
299 target_ulong helper_flt_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_flt_s() argument
301 float32 frs1 = check_nanbox_s(env, rs1); in helper_flt_s()
302 float32 frs2 = check_nanbox_s(env, rs2); in helper_flt_s()
303 return float32_lt(frs1, frs2, &env->fp_status); in helper_flt_s()
306 target_ulong helper_fltq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fltq_s() argument
308 float32 frs1 = check_nanbox_s(env, rs1); in helper_fltq_s()
309 float32 frs2 = check_nanbox_s(env, rs2); in helper_fltq_s()
310 return float32_lt_quiet(frs1, frs2, &env->fp_status); in helper_fltq_s()
313 target_ulong helper_feq_s(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_feq_s() argument
315 float32 frs1 = check_nanbox_s(env, rs1); in helper_feq_s()
316 float32 frs2 = check_nanbox_s(env, rs2); in helper_feq_s()
317 return float32_eq_quiet(frs1, frs2, &env->fp_status); in helper_feq_s()
320 target_ulong helper_fcvt_w_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_w_s() argument
322 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_w_s()
323 return float32_to_int32(frs1, &env->fp_status); in helper_fcvt_w_s()
326 target_ulong helper_fcvt_wu_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_wu_s() argument
328 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_wu_s()
329 return (int32_t)float32_to_uint32(frs1, &env->fp_status); in helper_fcvt_wu_s()
332 target_ulong helper_fcvt_l_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_l_s() argument
334 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_l_s()
335 return float32_to_int64(frs1, &env->fp_status); in helper_fcvt_l_s()
338 target_ulong helper_fcvt_lu_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_lu_s() argument
340 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_lu_s()
341 return float32_to_uint64(frs1, &env->fp_status); in helper_fcvt_lu_s()
344 uint64_t helper_fcvt_s_w(CPURISCVState *env, target_ulong rs1) in helper_fcvt_s_w() argument
346 return nanbox_s(env, int32_to_float32((int32_t)rs1, &env->fp_status)); in helper_fcvt_s_w()
349 uint64_t helper_fcvt_s_wu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_s_wu() argument
351 return nanbox_s(env, uint32_to_float32((uint32_t)rs1, &env->fp_status)); in helper_fcvt_s_wu()
354 uint64_t helper_fcvt_s_l(CPURISCVState *env, target_ulong rs1) in helper_fcvt_s_l() argument
356 return nanbox_s(env, int64_to_float32(rs1, &env->fp_status)); in helper_fcvt_s_l()
359 uint64_t helper_fcvt_s_lu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_s_lu() argument
361 return nanbox_s(env, uint64_to_float32(rs1, &env->fp_status)); in helper_fcvt_s_lu()
364 target_ulong helper_fclass_s(CPURISCVState *env, uint64_t rs1) in helper_fclass_s() argument
366 float32 frs1 = check_nanbox_s(env, rs1); in helper_fclass_s()
370 uint64_t helper_fround_s(CPURISCVState *env, uint64_t rs1) in helper_fround_s() argument
372 float_status *fs = &env->fp_status; in helper_fround_s()
374 float32 frs1 = check_nanbox_s(env, rs1); in helper_fround_s()
384 return nanbox_s(env, frs1); in helper_fround_s()
387 uint64_t helper_froundnx_s(CPURISCVState *env, uint64_t rs1) in helper_froundnx_s() argument
389 float32 frs1 = check_nanbox_s(env, rs1); in helper_froundnx_s()
390 frs1 = float32_round_to_int(frs1, &env->fp_status); in helper_froundnx_s()
391 return nanbox_s(env, frs1); in helper_froundnx_s()
394 uint64_t helper_fadd_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fadd_d() argument
396 return float64_add(frs1, frs2, &env->fp_status); in helper_fadd_d()
399 uint64_t helper_fsub_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fsub_d() argument
401 return float64_sub(frs1, frs2, &env->fp_status); in helper_fsub_d()
404 uint64_t helper_fmul_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fmul_d() argument
406 return float64_mul(frs1, frs2, &env->fp_status); in helper_fmul_d()
409 uint64_t helper_fdiv_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fdiv_d() argument
411 return float64_div(frs1, frs2, &env->fp_status); in helper_fdiv_d()
414 uint64_t helper_fmin_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fmin_d() argument
416 return env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmin_d()
417 float64_minnum(frs1, frs2, &env->fp_status) : in helper_fmin_d()
418 float64_minimum_number(frs1, frs2, &env->fp_status); in helper_fmin_d()
421 uint64_t helper_fminm_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fminm_d() argument
423 return float64_min(frs1, frs2, &env->fp_status); in helper_fminm_d()
426 uint64_t helper_fmax_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fmax_d() argument
428 return env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmax_d()
429 float64_maxnum(frs1, frs2, &env->fp_status) : in helper_fmax_d()
430 float64_maximum_number(frs1, frs2, &env->fp_status); in helper_fmax_d()
433 uint64_t helper_fmaxm_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fmaxm_d() argument
435 return float64_max(frs1, frs2, &env->fp_status); in helper_fmaxm_d()
438 uint64_t helper_fcvt_s_d(CPURISCVState *env, uint64_t rs1) in helper_fcvt_s_d() argument
440 return nanbox_s(env, float64_to_float32(rs1, &env->fp_status)); in helper_fcvt_s_d()
443 uint64_t helper_fcvt_d_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_d_s() argument
445 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_d_s()
446 return float32_to_float64(frs1, &env->fp_status); in helper_fcvt_d_s()
449 uint64_t helper_fsqrt_d(CPURISCVState *env, uint64_t frs1) in helper_fsqrt_d() argument
451 return float64_sqrt(frs1, &env->fp_status); in helper_fsqrt_d()
454 target_ulong helper_fle_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fle_d() argument
456 return float64_le(frs1, frs2, &env->fp_status); in helper_fle_d()
459 target_ulong helper_fleq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fleq_d() argument
461 return float64_le_quiet(frs1, frs2, &env->fp_status); in helper_fleq_d()
464 target_ulong helper_flt_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_flt_d() argument
466 return float64_lt(frs1, frs2, &env->fp_status); in helper_flt_d()
469 target_ulong helper_fltq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_fltq_d() argument
471 return float64_lt_quiet(frs1, frs2, &env->fp_status); in helper_fltq_d()
474 target_ulong helper_feq_d(CPURISCVState *env, uint64_t frs1, uint64_t frs2) in helper_feq_d() argument
476 return float64_eq_quiet(frs1, frs2, &env->fp_status); in helper_feq_d()
479 target_ulong helper_fcvt_w_d(CPURISCVState *env, uint64_t frs1) in helper_fcvt_w_d() argument
481 return float64_to_int32(frs1, &env->fp_status); in helper_fcvt_w_d()
484 uint64_t helper_fcvtmod_w_d(CPURISCVState *env, uint64_t value) in helper_fcvtmod_w_d() argument
486 return float64_to_int32_modulo(value, float_round_to_zero, &env->fp_status); in helper_fcvtmod_w_d()
489 target_ulong helper_fcvt_wu_d(CPURISCVState *env, uint64_t frs1) in helper_fcvt_wu_d() argument
491 return (int32_t)float64_to_uint32(frs1, &env->fp_status); in helper_fcvt_wu_d()
494 target_ulong helper_fcvt_l_d(CPURISCVState *env, uint64_t frs1) in helper_fcvt_l_d() argument
496 return float64_to_int64(frs1, &env->fp_status); in helper_fcvt_l_d()
499 target_ulong helper_fcvt_lu_d(CPURISCVState *env, uint64_t frs1) in helper_fcvt_lu_d() argument
501 return float64_to_uint64(frs1, &env->fp_status); in helper_fcvt_lu_d()
504 uint64_t helper_fcvt_d_w(CPURISCVState *env, target_ulong rs1) in helper_fcvt_d_w() argument
506 return int32_to_float64((int32_t)rs1, &env->fp_status); in helper_fcvt_d_w()
509 uint64_t helper_fcvt_d_wu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_d_wu() argument
511 return uint32_to_float64((uint32_t)rs1, &env->fp_status); in helper_fcvt_d_wu()
514 uint64_t helper_fcvt_d_l(CPURISCVState *env, target_ulong rs1) in helper_fcvt_d_l() argument
516 return int64_to_float64(rs1, &env->fp_status); in helper_fcvt_d_l()
519 uint64_t helper_fcvt_d_lu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_d_lu() argument
521 return uint64_to_float64(rs1, &env->fp_status); in helper_fcvt_d_lu()
529 uint64_t helper_fround_d(CPURISCVState *env, uint64_t frs1) in helper_fround_d() argument
531 float_status *fs = &env->fp_status; in helper_fround_d()
545 uint64_t helper_froundnx_d(CPURISCVState *env, uint64_t frs1) in helper_froundnx_d() argument
547 return float64_round_to_int(frs1, &env->fp_status); in helper_froundnx_d()
550 uint64_t helper_fadd_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fadd_h() argument
552 float16 frs1 = check_nanbox_h(env, rs1); in helper_fadd_h()
553 float16 frs2 = check_nanbox_h(env, rs2); in helper_fadd_h()
554 return nanbox_h(env, float16_add(frs1, frs2, &env->fp_status)); in helper_fadd_h()
557 uint64_t helper_fsub_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fsub_h() argument
559 float16 frs1 = check_nanbox_h(env, rs1); in helper_fsub_h()
560 float16 frs2 = check_nanbox_h(env, rs2); in helper_fsub_h()
561 return nanbox_h(env, float16_sub(frs1, frs2, &env->fp_status)); in helper_fsub_h()
564 uint64_t helper_fmul_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmul_h() argument
566 float16 frs1 = check_nanbox_h(env, rs1); in helper_fmul_h()
567 float16 frs2 = check_nanbox_h(env, rs2); in helper_fmul_h()
568 return nanbox_h(env, float16_mul(frs1, frs2, &env->fp_status)); in helper_fmul_h()
571 uint64_t helper_fdiv_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fdiv_h() argument
573 float16 frs1 = check_nanbox_h(env, rs1); in helper_fdiv_h()
574 float16 frs2 = check_nanbox_h(env, rs2); in helper_fdiv_h()
575 return nanbox_h(env, float16_div(frs1, frs2, &env->fp_status)); in helper_fdiv_h()
578 uint64_t helper_fmin_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmin_h() argument
580 float16 frs1 = check_nanbox_h(env, rs1); in helper_fmin_h()
581 float16 frs2 = check_nanbox_h(env, rs2); in helper_fmin_h()
582 return nanbox_h(env, env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmin_h()
583 float16_minnum(frs1, frs2, &env->fp_status) : in helper_fmin_h()
584 float16_minimum_number(frs1, frs2, &env->fp_status)); in helper_fmin_h()
587 uint64_t helper_fminm_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fminm_h() argument
589 float16 frs1 = check_nanbox_h(env, rs1); in helper_fminm_h()
590 float16 frs2 = check_nanbox_h(env, rs2); in helper_fminm_h()
591 float16 ret = float16_min(frs1, frs2, &env->fp_status); in helper_fminm_h()
592 return nanbox_h(env, ret); in helper_fminm_h()
595 uint64_t helper_fmax_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmax_h() argument
597 float16 frs1 = check_nanbox_h(env, rs1); in helper_fmax_h()
598 float16 frs2 = check_nanbox_h(env, rs2); in helper_fmax_h()
599 return nanbox_h(env, env->priv_ver < PRIV_VERSION_1_11_0 ? in helper_fmax_h()
600 float16_maxnum(frs1, frs2, &env->fp_status) : in helper_fmax_h()
601 float16_maximum_number(frs1, frs2, &env->fp_status)); in helper_fmax_h()
604 uint64_t helper_fmaxm_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fmaxm_h() argument
606 float16 frs1 = check_nanbox_h(env, rs1); in helper_fmaxm_h()
607 float16 frs2 = check_nanbox_h(env, rs2); in helper_fmaxm_h()
608 float16 ret = float16_max(frs1, frs2, &env->fp_status); in helper_fmaxm_h()
609 return nanbox_h(env, ret); in helper_fmaxm_h()
612 uint64_t helper_fsqrt_h(CPURISCVState *env, uint64_t rs1) in helper_fsqrt_h() argument
614 float16 frs1 = check_nanbox_h(env, rs1); in helper_fsqrt_h()
615 return nanbox_h(env, float16_sqrt(frs1, &env->fp_status)); in helper_fsqrt_h()
618 target_ulong helper_fle_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fle_h() argument
620 float16 frs1 = check_nanbox_h(env, rs1); in helper_fle_h()
621 float16 frs2 = check_nanbox_h(env, rs2); in helper_fle_h()
622 return float16_le(frs1, frs2, &env->fp_status); in helper_fle_h()
625 target_ulong helper_fleq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fleq_h() argument
627 float16 frs1 = check_nanbox_h(env, rs1); in helper_fleq_h()
628 float16 frs2 = check_nanbox_h(env, rs2); in helper_fleq_h()
629 return float16_le_quiet(frs1, frs2, &env->fp_status); in helper_fleq_h()
632 target_ulong helper_flt_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_flt_h() argument
634 float16 frs1 = check_nanbox_h(env, rs1); in helper_flt_h()
635 float16 frs2 = check_nanbox_h(env, rs2); in helper_flt_h()
636 return float16_lt(frs1, frs2, &env->fp_status); in helper_flt_h()
639 target_ulong helper_fltq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_fltq_h() argument
641 float16 frs1 = check_nanbox_h(env, rs1); in helper_fltq_h()
642 float16 frs2 = check_nanbox_h(env, rs2); in helper_fltq_h()
643 return float16_lt_quiet(frs1, frs2, &env->fp_status); in helper_fltq_h()
646 target_ulong helper_feq_h(CPURISCVState *env, uint64_t rs1, uint64_t rs2) in helper_feq_h() argument
648 float16 frs1 = check_nanbox_h(env, rs1); in helper_feq_h()
649 float16 frs2 = check_nanbox_h(env, rs2); in helper_feq_h()
650 return float16_eq_quiet(frs1, frs2, &env->fp_status); in helper_feq_h()
653 target_ulong helper_fclass_h(CPURISCVState *env, uint64_t rs1) in helper_fclass_h() argument
655 float16 frs1 = check_nanbox_h(env, rs1); in helper_fclass_h()
659 uint64_t helper_fround_h(CPURISCVState *env, uint64_t rs1) in helper_fround_h() argument
661 float_status *fs = &env->fp_status; in helper_fround_h()
663 float16 frs1 = check_nanbox_h(env, rs1); in helper_fround_h()
673 return nanbox_h(env, frs1); in helper_fround_h()
676 uint64_t helper_froundnx_h(CPURISCVState *env, uint64_t rs1) in helper_froundnx_h() argument
678 float16 frs1 = check_nanbox_h(env, rs1); in helper_froundnx_h()
679 frs1 = float16_round_to_int(frs1, &env->fp_status); in helper_froundnx_h()
680 return nanbox_h(env, frs1); in helper_froundnx_h()
683 target_ulong helper_fcvt_w_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_w_h() argument
685 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_w_h()
686 return float16_to_int32(frs1, &env->fp_status); in helper_fcvt_w_h()
689 target_ulong helper_fcvt_wu_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_wu_h() argument
691 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_wu_h()
692 return (int32_t)float16_to_uint32(frs1, &env->fp_status); in helper_fcvt_wu_h()
695 target_ulong helper_fcvt_l_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_l_h() argument
697 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_l_h()
698 return float16_to_int64(frs1, &env->fp_status); in helper_fcvt_l_h()
701 target_ulong helper_fcvt_lu_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_lu_h() argument
703 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_lu_h()
704 return float16_to_uint64(frs1, &env->fp_status); in helper_fcvt_lu_h()
707 uint64_t helper_fcvt_h_w(CPURISCVState *env, target_ulong rs1) in helper_fcvt_h_w() argument
709 return nanbox_h(env, int32_to_float16((int32_t)rs1, &env->fp_status)); in helper_fcvt_h_w()
712 uint64_t helper_fcvt_h_wu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_h_wu() argument
714 return nanbox_h(env, uint32_to_float16((uint32_t)rs1, &env->fp_status)); in helper_fcvt_h_wu()
717 uint64_t helper_fcvt_h_l(CPURISCVState *env, target_ulong rs1) in helper_fcvt_h_l() argument
719 return nanbox_h(env, int64_to_float16(rs1, &env->fp_status)); in helper_fcvt_h_l()
722 uint64_t helper_fcvt_h_lu(CPURISCVState *env, target_ulong rs1) in helper_fcvt_h_lu() argument
724 return nanbox_h(env, uint64_to_float16(rs1, &env->fp_status)); in helper_fcvt_h_lu()
727 uint64_t helper_fcvt_h_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_h_s() argument
729 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_h_s()
730 return nanbox_h(env, float32_to_float16(frs1, true, &env->fp_status)); in helper_fcvt_h_s()
733 uint64_t helper_fcvt_s_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_s_h() argument
735 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_s_h()
736 return nanbox_s(env, float16_to_float32(frs1, true, &env->fp_status)); in helper_fcvt_s_h()
739 uint64_t helper_fcvt_h_d(CPURISCVState *env, uint64_t rs1) in helper_fcvt_h_d() argument
741 return nanbox_h(env, float64_to_float16(rs1, true, &env->fp_status)); in helper_fcvt_h_d()
744 uint64_t helper_fcvt_d_h(CPURISCVState *env, uint64_t rs1) in helper_fcvt_d_h() argument
746 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_d_h()
747 return float16_to_float64(frs1, true, &env->fp_status); in helper_fcvt_d_h()
750 uint64_t helper_fcvt_bf16_s(CPURISCVState *env, uint64_t rs1) in helper_fcvt_bf16_s() argument
752 float32 frs1 = check_nanbox_s(env, rs1); in helper_fcvt_bf16_s()
753 return nanbox_h(env, float32_to_bfloat16(frs1, &env->fp_status)); in helper_fcvt_bf16_s()
756 uint64_t helper_fcvt_s_bf16(CPURISCVState *env, uint64_t rs1) in helper_fcvt_s_bf16() argument
758 float16 frs1 = check_nanbox_h(env, rs1); in helper_fcvt_s_bf16()
759 return nanbox_s(env, bfloat16_to_float32(frs1, &env->fp_status)); in helper_fcvt_s_bf16()