From: lkcl Date: Sat, 2 Apr 2022 17:11:10 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2913 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4aadffb4fa1e57b60f78019f3d056f03b88738ff;p=libreriscv.git --- 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