summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/checksum_wrappers.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2017-08-30 14:12:29 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2017-09-01 16:39:49 +1000
commitf1bbb99f41e06d5ba93ea8eafacd96a7a71d0c7d (patch)
tree712760be9aa2d0a6bbc96013b1e47195056ccd62 /arch/powerpc/lib/checksum_wrappers.c
parentd120cdbce68c3739f94f733bec376460fb9cbc14 (diff)
powerpc: Fix emulation of the isel instruction
The case added for the isel instruction was added inside a switch statement which uses the 10-bit minor opcode field in the 0x7fe bits of the instruction word. However, for the isel instruction, the minor opcode field is only the 0x3e bits, and the 0x7c0 bits are used for the "BC" field, which indicates which CR bit to use to select the result. Therefore, for the isel emulation to work correctly when BC != 0, we need to match on ((instr >> 1) & 0x1f) == 15). To do this, we pull the isel case out of the switch statement and put it in an if statement of its own. Fixes: e27f71e5ff3c ("powerpc/lib/sstep: Add isel instruction emulation") Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib/checksum_wrappers.c')
0 files changed, 0 insertions, 0 deletions