From: lkcl Date: Mon, 23 May 2022 06:24:20 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2138 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d8c79f33416fc5fb680fa74f1bd75abd889ce3aa;p=libreriscv.git --- diff --git a/openpower/sv/cr_int_predication.mdwn b/openpower/sv/cr_int_predication.mdwn index 12108c71c..78157e1d1 100644 --- a/openpower/sv/cr_int_predication.mdwn +++ b/openpower/sv/cr_int_predication.mdwn @@ -65,17 +65,6 @@ Side-effects: * mtcrweird when RA=0 is a means to set or clear arbitrary CR bits using immediates embedded within the instruction. -(Twin) Predication interactions: - -* INT twin predication with zeroing is a way to copy an integer into - CRs without necessarily needing the INT register (RA). if it is, it is - effectively ANDed (or negate-and-ANDed) with the INT Predicate -* CR twin predication with zeroing is likewise a way to interact with - the incoming integer - -this gets particularly powerful if data-dependent predication is also -enabled. further explanation is below. - # Bit ordering. Please see [[svp64/appendix]] regarding CR bit ordering and for @@ -151,10 +140,11 @@ mode is encoded in XO and is 4 bits mtcrrweird: BF,RA,M,mask,mode - n0 = mask[0] & (mode[0] == RA[63]) - n1 = mask[1] & (mode[1] == RA[62]) - n2 = mask[2] & (mode[2] == RA[61]) - n3 = mask[3] & (mode[3] == RA[60]) + a = (RA|0) + n0 = mask[0] & (mode[0] == a[63]) + n1 = mask[1] & (mode[1] == a[62]) + n2 = mask[2] & (mode[2] == a[61]) + n3 = mask[3] & (mode[3] == a[60]) result = n0 || n1 || n2 || n3 if M: result |= CR{BF} & ~mask