From: lkcl Date: Tue, 22 Dec 2020 18:49:29 +0000 (+0000) Subject: (no commit message) X-Git-Tag: convert-csv-opcode-to-binary~1032 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e8a5223ee7bbe3d3d99fec570441f71090c9dfb4;p=libreriscv.git --- diff --git a/openpower/sv/vector_ops.mdwn b/openpower/sv/vector_ops.mdwn index 01c385156..770c46210 100644 --- a/openpower/sv/vector_ops.mdwn +++ b/openpower/sv/vector_ops.mdwn @@ -102,6 +102,27 @@ Example The vmsbf.m instruction takes a mask register as input and writes results to a mask register. The instruction writes a 1 to all active mask elements before the first source element that is a 1, then writes a 0 to that element and all following active elements. If there is no set bit in the source vector, then all active elements in the destination are written with a 1. +pseudocode: + + def sbf(rd, rs1, rs2): + rd = 0 + # start setting if no predicate or if 1st predicate bit set + setting_mode = rs2 == x0 or (regs[rs2] & 1) + while i < XLEN: + bit = 1<