diff options
| author | Sandipan Das <sandipan@linux.ibm.com> | 2019-02-22 01:53:30 -0500 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-02-25 08:05:18 -0500 |
| commit | 3e751acba2658d664dc593d284714073c38380a8 (patch) | |
| tree | 7c559ffb8c31fc5d07db24feccc8ef740bdfbc4c /arch/powerpc/lib | |
| parent | 32628b5cf3bcdf31d7e00b0e8229051ee2afe96e (diff) | |
powerpc sstep: Add support for extswsli instruction
This adds emulation support for the following integer instructions:
* Extend-Sign Word and Shift Left Immediate (extswsli[.])
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib')
| -rw-r--r-- | arch/powerpc/lib/sstep.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 94189da4c159..742298bdf30b 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c | |||
| @@ -1935,6 +1935,20 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs, | |||
| 1935 | op->xerval &= ~XER_CA; | 1935 | op->xerval &= ~XER_CA; |
| 1936 | set_ca32(op, op->xerval & XER_CA); | 1936 | set_ca32(op, op->xerval & XER_CA); |
| 1937 | goto logical_done; | 1937 | goto logical_done; |
| 1938 | |||
| 1939 | case 890: /* extswsli with sh_5 = 0 */ | ||
| 1940 | case 891: /* extswsli with sh_5 = 1 */ | ||
| 1941 | if (!cpu_has_feature(CPU_FTR_ARCH_300)) | ||
| 1942 | return -1; | ||
| 1943 | op->type = COMPUTE + SETREG; | ||
| 1944 | sh = rb | ((instr & 2) << 4); | ||
| 1945 | val = (signed int) regs->gpr[rd]; | ||
| 1946 | if (sh) | ||
| 1947 | op->val = ROTATE(val, sh) & MASK64(0, 63 - sh); | ||
| 1948 | else | ||
| 1949 | op->val = val; | ||
| 1950 | goto logical_done; | ||
| 1951 | |||
| 1938 | #endif /* __powerpc64__ */ | 1952 | #endif /* __powerpc64__ */ |
| 1939 | 1953 | ||
| 1940 | /* | 1954 | /* |
