From 8d68070ba6dcd5ff88e6a4815462d403b52b6b1e Mon Sep 17 00:00:00 2001 From: lkcl Date: Thu, 5 May 2022 12:44:18 +0100 Subject: [PATCH] --- openpower/sv/cr_ops.mdwn | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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`. -- 2.30.2