target-ppc: fixed translation of mcrxr instruction
commit294d1292893867894992e810a01cfcfa451f1885
authorSorav Bansal <sbansal@cse.iitd.ernet.in>
Tue, 17 Jun 2014 05:54:02 +0000 (17 11:24 +0530)
committerAlexander Graf <agraf@suse.de>
Fri, 27 Jun 2014 11:48:22 +0000 (27 13:48 +0200)
tree044562b200d387b9140e5939774069b687e53b16
parentcc84c0f3571c75ced90a9ba9dcbb208464a1d997
target-ppc: fixed translation of mcrxr instruction

Fixed bug in gen_mcrxr() in target-ppc/translate.c:
The XER[SO], XER[OV], and XER[CA] flags are stored in the least
significant bit (bit 0) of their respective registers. They need
to be shifted left (by their respective offsets) to generate the final
XER value. The old translation code for the 'mcrxr' instruction
was assuming that  the flags are stored in bit 2, and was shifting them
right (incorrectly)

Signed-off-by: Sorav Bansal <sbansal@cse.iitd.ernet.in>
Reviewed-by: Tom Musta <tommusta@gmail.com>
Tested-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/translate.c