target/mips: fix msa copy_[s|u]_df rd = 0 corner case
authorMiodrag Dinic <miodrag.dinic@imgtec.com>
Thu, 15 Jun 2017 14:20:33 +0000 (16:20 +0200)
committerYongbok Kim <yongbok.kim@imgtec.com>
Tue, 11 Jul 2017 14:06:34 +0000 (15:06 +0100)
commitcab4888136a92250fdd401402622824994f7ce0b
tree6441f5e3fdf4526da86578445560850868af535d
parentb5ed2e11ef39a308dcbef46f66774557b4a41fce
target/mips: fix msa copy_[s|u]_df rd = 0 corner case

This patch fixes the msa copy_[s|u]_df instruction emulation when
the destination register rd is zero. Without this patch the zero
register would get clobbered, which should never happen because it
is supposed to be hardwired to 0.

Fix this corner case by explicitly checking rd = 0 and effectively
making these instructions emulation no-op in that case.

Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
target/mips/translate.c