mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 19:42:26 +00:00
powerpc sstep: Add support for prefixed fixed-point arithmetic
This adds emulation support for the following prefixed Fixed-Point Arithmetic instructions: * Prefixed Add Immediate (paddi) Signed-off-by: Jordan Niethe <[email protected]> Reviewed-by: Balamuruhan S <[email protected]> [mpe: Squash in get_op() usage] Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
This commit is contained in:
committed by
Michael Ellerman
parent
50b80a12e4
commit
3920742b92
@@ -1338,6 +1338,26 @@ int analyse_instr(struct instruction_op *op, const struct pt_regs *regs,
|
||||
|
||||
switch (opcode) {
|
||||
#ifdef __powerpc64__
|
||||
case 1:
|
||||
prefix_r = word & (1ul << 20);
|
||||
ra = (suffix >> 16) & 0x1f;
|
||||
rd = (suffix >> 21) & 0x1f;
|
||||
op->reg = rd;
|
||||
op->val = regs->gpr[rd];
|
||||
suffixopcode = get_op(suffix);
|
||||
prefixtype = (word >> 24) & 0x3;
|
||||
switch (prefixtype) {
|
||||
case 2:
|
||||
if (prefix_r && ra)
|
||||
return 0;
|
||||
switch (suffixopcode) {
|
||||
case 14: /* paddi */
|
||||
op->type = COMPUTE | PREFIXED;
|
||||
op->val = mlsd_8lsd_ea(word, suffix, regs);
|
||||
goto compute_done;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: /* tdi */
|
||||
if (rd & trap_compare(regs->gpr[ra], (short) word))
|
||||
goto trap;
|
||||
|
||||
Reference in New Issue
Block a user