From 4aadffb4fa1e57b60f78019f3d056f03b88738ff Mon Sep 17 00:00:00 2001 From: lkcl Date: Sat, 2 Apr 2022 18:11:10 +0100 Subject: [PATCH] --- openpower/sv/cr_int_predication.mdwn | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openpower/sv/cr_int_predication.mdwn b/openpower/sv/cr_int_predication.mdwn index f9a52c814..41ee321b1 100644 --- a/openpower/sv/cr_int_predication.mdwn +++ b/openpower/sv/cr_int_predication.mdwn @@ -23,6 +23,10 @@ the Integer Register File is needed. The opportunity is therefore taken to also augment CR logical arithmetic as well, using a mask-based paradigm that takes into consideration multiple bits of each CR Field (eq/lt/gt/ov). By contrast v3.0B Scalar CR instructions (crand, crxor) only allow a single bit calculation. +Also strangely there is no v3.0 instruction for moving CR Fields, +so that is corrected here with `mcrfm`. The opportunity is taken +to allow inversion of CR Fields when copied. + Basic concept: * CR-based instructions that perform simple AND/OR/XOR from any four bits @@ -155,8 +159,7 @@ bit 19=1, bit 20=0, Rc=1 result = mask & CR{BFA} if M: result |= CR{BF} & ~mask - else: - result ^= mode + result ^= mode CR{BF} = result Note that when M=1 this operation is a Read-Modify-Write on the CR Field -- 2.30.2