From cfe4cc313cb9d5693af96a6b775cb1abb932c945 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Mon, 13 Mar 2023 17:01:28 -0700 Subject: [PATCH] add crternlogi to ls007 --- openpower/sv/rfc/ls007.mdwn | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/openpower/sv/rfc/ls007.mdwn b/openpower/sv/rfc/ls007.mdwn index 757d868e9..ae2d6df9d 100644 --- a/openpower/sv/rfc/ls007.mdwn +++ b/openpower/sv/rfc/ls007.mdwn @@ -181,6 +181,39 @@ CR0 (if Rc=1) \newpage{} +# Condition Register Ternary Logic Immediate CRB-form + +Add this section to Book I 2.5.1 + +* `crternlogi BT, BA, BB, BC, TLI, msk` + +| 0.5| 6-8 | 9-11 | 12-14 | 15-17 | 18-20 | 21-28 | 29-30 | 31 | Form | +|----|-----|------|-------|-------|-------|-------|-------|-----|----------| +| PO | BF | BFA | BFB | BFC | msk | TLI | XO | msk | CRB-Form | + +Pseudocode: + +``` +a <- CR[4*BFA+32:4*BFA+35] +b <- CR[4*BFB+32:4*BFB+35] +c <- CR[4*BFC+32:4*BFC+35] +do i = 0 to 3 + idx <- a[i] || b[i] || c[i] # compute index from current bits + result <- TLI[7 - idx] # subtract from 7 to index in LSB0 order + if msk[i] = 1 then + CR[4*BF+32+i] <- result +``` + +Special registers altered: + +``` +CR field BF +``` + +---------- + +\newpage{} + # Dynamic Binary Logic VA-form Add this section to Book I 3.3.13 -- 2.30.2