From 164f372eccc041036fbb3f5737df44d9141bbddb Mon Sep 17 00:00:00 2001 From: lkcl Date: Fri, 25 Dec 2020 13:42:42 +0000 Subject: [PATCH] --- openpower/sv/overview.mdwn | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/openpower/sv/overview.mdwn b/openpower/sv/overview.mdwn index c8003928d..2aade0cd1 100644 --- a/openpower/sv/overview.mdwn +++ b/openpower/sv/overview.mdwn @@ -264,15 +264,18 @@ OpenPOWER has Condition Registers. These store an analysis of the result of an for i in range(VL): # predication test, skip all masked out elements. - if predicate_masked_out(i): - continue + if predicate_masked_out(i): continue # skip result = op(iregs[RA+i], iregs[RB+i]) CRnew = analyse(result) # calculates eq/lt/gt # Rc=1 always stores the CR - if Rc=1: - crregs[offs+i] = CRnew + if Rc=1: crregs[offs+i] = CRnew # now test CR, similar to branch - if CRnew[BO[0:1]] != BO[2]: - continue # test failed: cancel store - # result optionally stored but CR always is - iregs[RT+i] = result + if CRnew[BO[0:1]] == BO[2]: + # result optionally stored but CR always is + iregs[RT+i] = result + +Note that whilst the Vector of CRs is always written to the CR regfile, only those result elements that pass the BO test get written to the integer regfile. + +Here for example if FP overflow occurred, and the CR testing was carried out for that, all valid results would be stored but invalid ones would not, but in addition the Vector of CRs would contain the indicators of which ones failed. With the invalid results being simply not written this could save resources (save on register file writes). + + -- 2.30.2