From: lkcl Date: Wed, 8 Sep 2021 11:40:10 +0000 (+0100) Subject: (no commit message) X-Git-Tag: DRAFT_SVP64_0_1~183 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2be07152078ced7c353ffb1e8eaf375018d0ae62;p=libreriscv.git --- 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)