powerpc/lib/sstep: Fix fixed-point shift instructions that set CA32
authorSandipan Das <sandipan@linux.vnet.ibm.com>
Fri, 29 Sep 2017 05:44:10 +0000 (11:14 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Oct 2017 00:28:04 +0000 (11:28 +1100)
commit0a75aff178df005b0619703cf7886d5c8e28e486
tree9728d9075144501c6d339bb88056c401b6731d17
parentdc39c1d68f256990d4bb0033a219e8ca15ba4d7f
powerpc/lib/sstep: Fix fixed-point shift instructions that set CA32

This fixes the emulated behaviour of existing fixed-point shift right
algebraic instructions that are supposed to set both the CA and CA32
bits of XER when running on a system that is compliant with POWER ISA
v3.0 independent of whether the system is executing in 32-bit mode or
64-bit mode. The following instructions are affected:
  * Shift Right Algebraic Word Immediate (srawi[.])
  * Shift Right Algebraic Word (sraw[.])
  * Shift Right Algebraic Doubleword Immediate (sradi[.])
  * Shift Right Algebraic Doubleword (srad[.])

Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in emulate_step()")
Signed-off-by: Sandipan Das <sandipan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/lib/sstep.c