From: lkcl Date: Thu, 5 May 2022 11:44:18 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2464 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8d68070ba6dcd5ff88e6a4815462d403b52b6b1e;p=libreriscv.git --- diff --git a/openpower/sv/cr_ops.mdwn b/openpower/sv/cr_ops.mdwn index 9bb7a31b1..424a90885 100644 --- a/openpower/sv/cr_ops.mdwn +++ b/openpower/sv/cr_ops.mdwn @@ -38,8 +38,8 @@ this section. * Examples of v3.0B instructions to which this section does apply is - - `mfcr` (3 bit operands) and - - `crnor` and `cmpi` (5 bit operands). + - `mfcr` and `cmpi` (3 bit operands) and + - `crnor` and `crand` (5 bit operands). * Examples to which this section does **not** apply include `fadds.` and `subf.` which both produce arithmetic results (and a CR Field co-result). @@ -185,8 +185,16 @@ elements thereafter: for i in VL-1 downto 0 # reverse gear CR[4+i].ge &= CR[5+i].ge -# cmp and other compare operations +# Unusual and quirky CR operations + +# cmp and other compare ops `cmp` and `cmpi` etc take GPRs as sources and create a CR Field as a result. + + cmpli BF,L,RA,UI + cmpeqb BF,RA,RB + With `ELWIDTH_SRC` applying to the source operands this is perfectly fine. +As an aside it explains why `ELWIDTH` was picked to be used for alternative +purposes (`SNZ`) rather than `ELWIDTH_SRC`.