m8pple / arch2-2019-cw

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SRLV negative shift amount in variable

ChrisDeverall opened this issue · comments

I just want to confirm that the result of a left shift using a negative shift amount gives undefined behaviour rather than a predictable shift in the other direction.

Received feedback from an overly enthusiastic peer. For all those who want to know, the least significant 5 bits of the number are used as the equivalent "shamt".