← Home

fltq.s

Floating-Point Less Than Quiet Single-Precision

The `fltq.s` is defined like the `flt.s` instruction, except that quiet NaN inputs do not cause the invalid operation exception flag to be set.

Assembly format

fltq.s xd, fs1, fs2

Encoding

313029282726252423222120191817161514131211109876543210
1010000fs2fs1101xd1010011

Decode variables

VariableBitsWidth
fs2[24:20]5
fs1[19:15]5
xd[11:7]5

Execution

check_f_ok($encoding);

Bits<32> sp_value_a = F[fs1][31:0];
Bits<32> sp_value_b = F[fs2][31:0];

if (is_sp_nan?(sp_value_a) || is_sp_nan?(sp_value_b)) {
  # Quiet comparison: only set NV for signaling NaN
  if (is_sp_signaling_nan?(sp_value_a) || is_sp_signaling_nan?(sp_value_b)) {
    set_fp_flag(FpFlag::NV);
  }
  X[xd] = 0;
} else {
  Boolean sign_a = sp_value_a[31] == 1;
  Boolean sign_b = sp_value_b[31] == 1;

  Boolean a_lt_b =
    (sign_a != sign_b)
      ? (sign_a && ((sp_value_a[30:0] | sp_value_b[30:0]) != 0))
      : ((sp_value_a != sp_value_b) && (sign_a != (sp_value_a < sp_value_b)));
  X[xd] = a_lt_b ? 1 : 0;
}

Defined by

Zfa

Access

SUVSVU
AlwaysAlwaysAlwaysAlways

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.