Skip to content

Basop definition W_shl() / W_shr() cannot handle exceeding shift values

Operator W_shl() / W_shr() used with shift-amount +/-64 results with shift amount 0 (result stays the same).

Proposal:

  • add assert() to the BASOP-version to limit the shift range [ -63 ... +63 ].
  • similar asserts in W_shl_sat_l()