Fix movd and unit test. It supports both directions.