From: Sandipan Das <sandipan@linux.ibm.com>
To: sandipan@linux.ibm.com
Cc: naveen.n.rao@linux.ibm.com, paulus@samba.org,
linuxppc-dev@lists.ozlabs.org, ravi.bangoria@linux.ibm.com
Subject: [PATCH v2 4/6] powerpc sstep: Add support for extswsli instruction
Date: Fri, 22 Feb 2019 12:23:30 +0530 [thread overview]
Message-ID: <889bd04c9730ea9ef33f42f72046a239c1e79590.1550817743.git.sandipan@linux.ibm.com> (raw)
In-Reply-To: <cover.1550817742.git.sandipan@linux.ibm.com>
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>
---
arch/powerpc/lib/sstep.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
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,
op->xerval &= ~XER_CA;
set_ca32(op, op->xerval & XER_CA);
goto logical_done;
+
+ case 890: /* extswsli with sh_5 = 0 */
+ case 891: /* extswsli with sh_5 = 1 */
+ if (!cpu_has_feature(CPU_FTR_ARCH_300))
+ return -1;
+ op->type = COMPUTE + SETREG;
+ sh = rb | ((instr & 2) << 4);
+ val = (signed int) regs->gpr[rd];
+ if (sh)
+ op->val = ROTATE(val, sh) & MASK64(0, 63 - sh);
+ else
+ op->val = val;
+ goto logical_done;
+
#endif /* __powerpc64__ */
/*
--
2.19.2
WARNING: multiple messages have this Message-ID (diff)
From: Sandipan Das <sandipan@linux.ibm.com>
To: mpe@ellerman.id.au
Cc: naveen.n.rao@linux.ibm.com, paulus@samba.org,
linuxppc-dev@lists.ozlabs.org, ravi.bangoria@linux.ibm.com
Subject: [PATCH v2 4/6] powerpc sstep: Add support for extswsli instruction
Date: Fri, 22 Feb 2019 12:24:50 +0530 [thread overview]
Message-ID: <889bd04c9730ea9ef33f42f72046a239c1e79590.1550817743.git.sandipan@linux.ibm.com> (raw)
Message-ID: <20190222065450.rb_Td_S_wRQt-6g86ax87s9LyPpo9J0fojkB0BeAImw@z> (raw)
In-Reply-To: <cover.1550817742.git.sandipan@linux.ibm.com>
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>
---
arch/powerpc/lib/sstep.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
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,
op->xerval &= ~XER_CA;
set_ca32(op, op->xerval & XER_CA);
goto logical_done;
+
+ case 890: /* extswsli with sh_5 = 0 */
+ case 891: /* extswsli with sh_5 = 1 */
+ if (!cpu_has_feature(CPU_FTR_ARCH_300))
+ return -1;
+ op->type = COMPUTE + SETREG;
+ sh = rb | ((instr & 2) << 4);
+ val = (signed int) regs->gpr[rd];
+ if (sh)
+ op->val = ROTATE(val, sh) & MASK64(0, 63 - sh);
+ else
+ op->val = val;
+ goto logical_done;
+
#endif /* __powerpc64__ */
/*
--
2.19.2
next prev parent reply other threads:[~2019-02-22 7:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 6:53 [PATCH v2 0/6] powerpc: sstep: Extend instruction emulation support Sandipan Das
2019-02-22 6:53 ` [PATCH v2 1/6] powerpc: sstep: Add support for maddhd, maddhdu, maddld instructions Sandipan Das
2019-02-22 6:54 ` Sandipan Das
2019-02-28 9:21 ` [v2, " Michael Ellerman
2019-02-22 6:53 ` [PATCH v2 2/6] powerpc: sstep: Add support for darn instruction Sandipan Das
2019-02-22 6:54 ` Sandipan Das
2019-02-22 6:53 ` [PATCH v2 3/6] powerpc sstep: Add support for cnttzw, cnttzd instructions Sandipan Das
2019-02-22 6:54 ` Sandipan Das
2019-02-22 6:53 ` Sandipan Das [this message]
2019-02-22 6:54 ` [PATCH v2 4/6] powerpc sstep: Add support for extswsli instruction Sandipan Das
2019-02-22 6:53 ` [PATCH v2 5/6] powerpc sstep: Add support for modsw, moduw instructions Sandipan Das
2019-02-22 6:54 ` Sandipan Das
2019-02-22 6:53 ` [PATCH v2 6/6] powerpc sstep: Add support for modsd, modud instructions Sandipan Das
2019-02-22 6:54 ` Sandipan Das
2019-02-22 6:54 ` [PATCH v2 0/6] powerpc: sstep: Extend instruction emulation support Sandipan Das
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=889bd04c9730ea9ef33f42f72046a239c1e79590.1550817743.git.sandipan@linux.ibm.com \
--to=sandipan@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=naveen.n.rao@linux.ibm.com \
--cc=paulus@samba.org \
--cc=ravi.bangoria@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).