vmor.mm

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

vmor.mm vs2, vs1, vd

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> vs1 = $encoding[19:15];
Bits<5> vd = $encoding[11:7];

Execution

  • IDL

  • Sail

{
  let SEW      = get_sew();
  let LMUL_pow = get_lmul_pow();
  let num_elem = unsigned(vlenb) * 8;

  if illegal_vd_unmasked() then { handle_illegal(); return RETIRE_FAIL };

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

  let vs1_val : vector('n, dec, bool) = read_vmask(num_elem, 0b0, vs1);
  let vs2_val : vector('n, dec, bool) = read_vmask(num_elem, 0b0, vs2);
  let vd_val  : vector('n, dec, bool) = read_vmask(num_elem, 0b0, vd);
  result      : vector('n, dec, bool) = undefined;
  mask        : vector('n, dec, bool) = undefined;

  (result, mask) = init_masked_result_carry(num_elem, SEW, 0, vd_val);

  foreach (i from 0 to (num_elem - 1)) {
    if mask[i] then {
      result[i] = match funct6 {
        MM_VMAND     => vs2_val[i] & vs1_val[i],
        MM_VMNAND    => not(vs2_val[i] & vs1_val[i]),
        MM_VMANDNOT  => vs2_val[i] & not(vs1_val[i]),
        MM_VMXOR     => vs2_val[i] != vs1_val[i],
        MM_VMOR      => vs2_val[i] | vs1_val[i],
        MM_VMNOR     => not(vs2_val[i] | vs1_val[i]),
        MM_VMORNOT   => vs2_val[i] | not(vs1_val[i]),
        MM_VMXNOR    => vs2_val[i] == vs1_val[i]
      }
    }
  };

  write_vmask(num_elem, vd, result);
  vstart = zeros();
  RETIRE_SUCCESS
}