aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/fmin_s.h
blob: 476a5860924eb35b494b3f0a9b56876a20284679 (plain)
1
2
3
4
5
6
7
8
9
require_either_extension('F', EXT_ZFINX);
require_fp;
bool less = f32_lt_quiet(FRS1_F, FRS2_F) ||
            (f32_eq(FRS1_F, FRS2_F) && (FRS1_F.v & F32_SIGN));
if (isNaNF32UI(FRS1_F.v) && isNaNF32UI(FRS2_F.v))
  WRITE_FRD_F(f32(defaultNaNF32UI));
else
  WRITE_FRD_F((less || isNaNF32UI(FRS2_F.v) ? FRS1_F : FRS2_F));
set_fp_exceptions;