powerpc/64: Fix update forms of loads and stores to write 64-bit EA
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 30 Aug 2017 04:12:28 +0000 (14:12 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 1 Sep 2017 06:39:49 +0000 (16:39 +1000)
commitd120cdbce68c3739f94f733bec376460fb9cbc14
treed0c8d39cdf6352660a9fe35fc1c1cbfbfbea78e6
parent350779a29f11f80ac66a8b38a7718ad30f003f18
powerpc/64: Fix update forms of loads and stores to write 64-bit EA

When a 64-bit processor is executing in 32-bit mode, the update forms
of load and store instructions are required by the architecture to
write the full 64-bit effective address into the RA register, though
only the bottom 32 bits are used to address memory.  Currently,
the instruction emulation code writes the truncated address to the
RA register.  This fixes it by keeping the full 64-bit EA in the
instruction_op structure, truncating the address in emulate_step()
where it is used to address memory, rather than in the address
computations in analyse_instr().

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/sstep.h
arch/powerpc/lib/sstep.c