Bugfix ROR and add unittest for it.

* moved shift/rotate ops