From: lkcl Date: Sun, 15 May 2022 20:08:36 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2219 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5b31da1c159d9c71ff7473e7a8082b1bedef0e59;p=libreriscv.git --- diff --git a/openpower/sv/bitmanip.mdwn b/openpower/sv/bitmanip.mdwn index c66e291a9..a08047da4 100644 --- a/openpower/sv/bitmanip.mdwn +++ b/openpower/sv/bitmanip.mdwn @@ -124,7 +124,8 @@ double check that instructions didn't need 3 inputs. | NN | RT | RA | RB | 0 | 01 | 0001 110 |Rc| vec sofm | X-Form | | NN | RT | RA | RB | 0 | 10 | 0001 110 |Rc| vec sifm | X-Form | | NN | RT | RA | RB | 0 | 11 | 0001 110 |Rc| vec cprop | X-Form | -| NN | | | | | | 0101 110 |Rc| rsvd | | +| NN | | | | | -0 | 0101 110 |Rc| crbinlog | {TODO} | +| NN | | | | | -1 | 0101 110 |Rc| rsvd | | | NN | RT | RA | RB | 0 | itype | 1001 110 |Rc| av minmax | X-Form | | NN | RT | RA | RB | 1 | 00 | 1001 110 |Rc| av abss | X-Form | | NN | RT | RA | RB | 1 | 01 | 1001 110 |Rc| av absu | X-Form | @@ -197,7 +198,7 @@ a pair of `binlut` instructions followed by a `ternlogi` to select which to merge. Use `nh` to select which nibble to use as the lookup table from the RC source register (`nh=1` nibble high)* -## ternlogcr +## crternlogi another mode selection would be CRs not Ints. @@ -210,6 +211,17 @@ another mode selection would be CRs not Ints. a,b,c = CRs[BA][i], CRs[BB][i], CRs[BC][i]) if mask[i] CRs[BT][i] = lut3(imm, a, b, c) +## crbinlog + +| 0.5|6.8 | 9.11|12.14|15.17|18.22|23...30 |31| +| -- | -- | --- | --- | --- |-----| --------|--| +| NN | BT | BA | BB | BC |m0-m2|00101110 |m3| + + mask = m0-3,m4 + for i in range(4): + a,b = CRs[BA][i], CRs[BB][i]) + if mask[i] CRs[BT][i] = lut2(CRs[BC], a, b) + # int ops ## min/m