From: lkcl Date: Mon, 25 Apr 2022 16:40:31 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2597 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e938af1154deb5b3bcbbe010a982bcd6dbe5e44;p=libreriscv.git --- diff --git a/openpower/isa/svfixedarith.mdwn b/openpower/isa/svfixedarith.mdwn index bb0c798b2..5bf718bfe 100644 --- a/openpower/isa/svfixedarith.mdwn +++ b/openpower/isa/svfixedarith.mdwn @@ -15,3 +15,35 @@ Pseudo-code: Special Registers Altered: None + +# [DRAFT] Twin Divide Quad Unsigned + +XO-Form + +* divmod2du RT,RA,RB (OE=0 Rc=0) +* divmod2du. RT,RA,RB (OE=0 Rc=1) +* divmod2duo RT,RA,RB (OE=1 Rc=0) +* divmod2duo. RT,RA,RB (OE=1 Rc=1) + +Pseudo-code: + + dividend[0:XLEN-1] <- (RA)[XLEN/2:XLEN-1] || [0]*(XLEN/2) + divisor[0:XLEN-1] <- [0]*(XLEN/2) || (RB)[XLEN/2:XLEN-1] + if (divisor = [0]*XLEN) then + overflow <- 1 + else + result <- dividend / divisor + if RA[XLEN/2:XLEN-1]