From 8f0437f316fe126e6241239bb44222076034ac8a Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Mon, 7 Aug 2023 16:04:00 -0700 Subject: [PATCH] split out instructions from openpower/isa/svfixedarith.mdwn --- openpower/isa/svfixedarith.mdwn | 118 +----------------- openpower/isa/svfixedarith/divmod2du.mdwn | 13 ++ .../isa/svfixedarith/divmod2du_code.mdwn | 15 +++ openpower/isa/svfixedarith/dsld.mdwn | 14 +++ openpower/isa/svfixedarith/dsld_code.mdwn | 8 ++ openpower/isa/svfixedarith/dsrd.mdwn | 14 +++ openpower/isa/svfixedarith/dsrd_code.mdwn | 8 ++ openpower/isa/svfixedarith/maddedu.mdwn | 13 ++ openpower/isa/svfixedarith/maddedu_code.mdwn | 7 ++ openpower/isa/svfixedarith/maddedus.mdwn | 13 ++ openpower/isa/svfixedarith/maddedus_code.mdwn | 13 ++ 11 files changed, 123 insertions(+), 113 deletions(-) create mode 100644 openpower/isa/svfixedarith/divmod2du.mdwn create mode 100644 openpower/isa/svfixedarith/divmod2du_code.mdwn create mode 100644 openpower/isa/svfixedarith/dsld.mdwn create mode 100644 openpower/isa/svfixedarith/dsld_code.mdwn create mode 100644 openpower/isa/svfixedarith/dsrd.mdwn create mode 100644 openpower/isa/svfixedarith/dsrd_code.mdwn create mode 100644 openpower/isa/svfixedarith/maddedu.mdwn create mode 100644 openpower/isa/svfixedarith/maddedu_code.mdwn create mode 100644 openpower/isa/svfixedarith/maddedus.mdwn create mode 100644 openpower/isa/svfixedarith/maddedus_code.mdwn diff --git a/openpower/isa/svfixedarith.mdwn b/openpower/isa/svfixedarith.mdwn index 6ce79fb6..3a74609b 100644 --- a/openpower/isa/svfixedarith.mdwn +++ b/openpower/isa/svfixedarith.mdwn @@ -1,117 +1,9 @@ -# [DRAFT] Multiply and Add Extended Doubleword Unsigned +[[!inline pagenames="openpower/isa/svfixedarith/maddedu" raw="yes"]] -VA-Form +[[!inline pagenames="openpower/isa/svfixedarith/maddedus" raw="yes"]] -* maddedu RT,RA,RB,RC +[[!inline pagenames="openpower/isa/svfixedarith/divmod2du" raw="yes"]] -Pseudo-code: +[[!inline pagenames="openpower/isa/svfixedarith/dsld" raw="yes"]] - - prod[0:XLEN*2-1] <- [0] * (XLEN * 2) - if (RB)[0] != 0 then - prod[0:XLEN*2-1] <- -((RA) * -(RB)) - else - prod[0:XLEN*2-1] <- (RA) * (RB) - - sum[0:XLEN*2-1] <- prod + (EXTSXL((RC)[0], 1) || (RC)) - RT <- sum[XLEN:2*XLEN-1] - RS <- sum[0:XLEN-1] - -Special Registers Altered: - - None - -# [DRAFT] Divide/Modulo Double-width Doubleword Unsigned - -VA-Form - -* divmod2du RT,RA,RB,RC - -Pseudo-code: - - + prod[0:XLEN*2-1] <- [0] * (XLEN * 2) + if (RB)[0] != 0 then + prod[0:XLEN*2-1] <- -((RA) * -(RB)) + else + prod[0:XLEN*2-1] <- (RA) * (RB) + + sum[0:XLEN*2-1] <- prod + (EXTSXL((RC)[0], 1) || (RC)) + RT <- sum[XLEN:2*XLEN-1] + RS <- sum[0:XLEN-1] -- 2.30.2