From fb9793e67ab46b386fa903324ca0a5cea73b0897 Mon Sep 17 00:00:00 2001 From: lkcl Date: Tue, 7 Sep 2021 17:19:36 +0100 Subject: [PATCH] --- openpower/sv/cr_ops.mdwn | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/openpower/sv/cr_ops.mdwn b/openpower/sv/cr_ops.mdwn index 33f607606..f539cc2ff 100644 --- a/openpower/sv/cr_ops.mdwn +++ b/openpower/sv/cr_ops.mdwn @@ -101,15 +101,18 @@ of the operation. for i in range(VL): # predication test, skip all masked out elements. + # skips when sz=0 if predicate_masked_out(i): continue + # result is to go into CR. may be a 4-bit CR Field + # (3-bit mode) or just a single bit (5-bit mode) result = op(...) - CRnew = analyse(result) # calculates eq/lt/gt - # Rc=1 always stores the CR - if Rc=1 or RC1: - crregs[offs+i] = CRnew + # obtain CRbit from BA result operand field, + # if this CR op has 5-bit CR result operands + if 5bit mode: + CRbit = BA[3:4] # now test CR, similar to branch - if RC1 or CRnew[BO[0:1]] != BO[2]: + if CRnew[CRbit] != inv: continue # test failed: cancel store - # result optionally stored but CR always is - iregs[RT+i] = result + # result optionally stored + update_CR(result) -- 2.30.2