From 5395366de7c85fda1e9d9da8468d49f022553f1f Mon Sep 17 00:00:00 2001 From: lkcl Date: Sun, 29 Nov 2020 18:27:12 +0000 Subject: [PATCH] --- openpower/sv/cr_int_predication.mdwn | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/openpower/sv/cr_int_predication.mdwn b/openpower/sv/cr_int_predication.mdwn index 5dc42d0b6..a796feee4 100644 --- a/openpower/sv/cr_int_predication.mdwn +++ b/openpower/sv/cr_int_predication.mdwn @@ -19,6 +19,10 @@ Purpose: * To provide a vectorised version of the same, suitable for advanced predication +Side-effects: + +* mtcrweird when RA=0 is a means to set or clear arbitrary CR bits from immediates + # Instruction form and pseudocode | 0-5 | 6-10 | 11 | 12-15 | 16-18 | 19-20 | 21-30 | 31 | @@ -40,7 +44,7 @@ bit 11=0: bit 11=1: - mfcrweird: RA, BB, mask.mode + mtcrweird: RA, BB, mask.mode reg = (RA|0) n0 = mask[1] & (mode[0] == reg[0]) @@ -48,3 +52,8 @@ bit 11=1: n2 = mask[2] & (mode[2] == reg[0]) n3 = mask[3] & (mode[3] == reg[0]) CRfile[32+BB*4:36+BB*4] = n0 || n1 || n2 || b3 + +Pseudo-op: + + mtcri BB, mode mtcrweird r0, BB, 0b1111.~mode + -- 2.30.2