Sandipan Das has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/40923 )
Change subject: arch-power: Add bit permute instructions
......................................................................
arch-power: Add bit permute instructions
This adds the following instructions.
* Bit Permute Doubleword (bpermd)
Change-Id: Iab3cc6729b9d59c95e29b4f1d3e2c0eb48fde917
Signed-off-by: Sandipan Das <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40923
Reviewed-by: Boris Shingarov <[email protected]>
Maintainer: Boris Shingarov <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/arch/power/isa/decoder.isa
1 file changed, 11 insertions(+), 0 deletions(-)
Approvals:
Boris Shingarov: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/power/isa/decoder.isa b/src/arch/power/isa/decoder.isa
index bf25155..1ec2013 100644
--- a/src/arch/power/isa/decoder.isa
+++ b/src/arch/power/isa/decoder.isa
@@ -398,6 +398,17 @@
246: MiscOp::dcbtst({{ }});
247: StoreIndexUpdateOp::stbux({{ Mem_ub = Rs_ub; }});
+ 252: IntLogicOp::bpermd({{
+ uint64_t res = 0;
+ for (int i = 0; i < 8; ++i) {
+ int index = (Rs >> (i * 8)) & 0xff;
+ if ((index < 64) && bits(Rb, 63 - index)) {
+ res |= 1 << i;
+ }
+ }
+ Ra = res;
+ }});
+
format IntArithOp {
265: modud({{
uint64_t src1 = Ra;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40923
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iab3cc6729b9d59c95e29b4f1d3e2c0eb48fde917
Gerrit-Change-Number: 40923
Gerrit-PatchSet: 8
Gerrit-Owner: Sandipan Das <[email protected]>
Gerrit-Reviewer: Boris Shingarov <[email protected]>
Gerrit-Reviewer: Sandipan Das <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s