From 2be07152078ced7c353ffb1e8eaf375018d0ae62 Mon Sep 17 00:00:00 2001 From: lkcl Date: Wed, 8 Sep 2021 12:40:10 +0100 Subject: [PATCH] --- openpower/sv/cr_ops.mdwn | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/openpower/sv/cr_ops.mdwn b/openpower/sv/cr_ops.mdwn index b6540eb84..52400de00 100644 --- a/openpower/sv/cr_ops.mdwn +++ b/openpower/sv/cr_ops.mdwn @@ -118,17 +118,29 @@ test the co-resultant CR when Rc=1. for i in range(VL): # predication test, skip all masked out elements. # skips when sz=0 - if predicate_masked_out(i): + if sz=0 and 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(...) - # obtain CRbit from BA result operand field, - # if this CR op has 5-bit CR result operands + if predicate_masked_out(i): + if 5bit mode: + # only one bit of CR to update + result = SNZ + else + # four copies of SNZ + result = SNZ || SNZ || SNZ || SNZ + else + # 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(...) if 5bit mode: - CRbit = BA[3:4] + # if this CR op has 5-bit CR result operands + # the single bit result is what must be tested + to_test = result + else + # if however this is a 3-bit CR *field* result + # then the bit to be tested must be selected + to_test = result[CRbit] # now test CR, similar to branch - if CRnew[CRbit] != inv: + if to_test != inv: continue # test failed: cancel store # result optionally stored update_CR(result) -- 2.30.2