vfmv.f.s

No synopsis available.

This instruction is defined by:

  • V, version >= 0

This instruction is included in the following profiles:

  • RVA22U64 (Optional)

Encoding

svg

Assembly format

vfmv.f.s vs2, rd

Synopsis

No description available.

Access

M HS U VS VU

Always

Always

Always

Always

Always

Decode Variables

Bits<5> vs2 = $encoding[24:20];
Bits<5> rd = $encoding[11:7];

Execution

  • IDL

  • Sail

{
  let rm_3b    = fcsr.FRM();
  let SEW      = get_sew();
  let num_elem = get_num_elem(0, SEW);

  if illegal_fp_vd_unmasked(SEW, rm_3b) | SEW > sizeof(flen)
  then { handle_illegal(); return RETIRE_FAIL };
  assert(num_elem > 0 & SEW != 8);

  let 'n = num_elem;
  let 'm = SEW;

  let vs2_val : vector('n, dec, bits('m)) = read_vreg(num_elem, SEW, 0, vs2);
  match 'm {
    16 => F_H(rd) = vs2_val[0],
    32 => F_S(rd) = vs2_val[0],
    64 => F_D(rd) = vs2_val[0]
  };
  vstart = zeros();

  RETIRE_SUCCESS
}