Skip to content

Commit

Permalink
Merge pull request #101 from riscv/v0.93
Browse files Browse the repository at this point in the history
Spec updates from Opcode and Consistency Review
  • Loading branch information
aswaterman authored Jan 11, 2021
2 parents ddd0dd4 + 5032741 commit c3935cc
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 105 deletions.
10 changes: 5 additions & 5 deletions texsrc/apps.tex
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ \subsection{Parity check}
The parity of a word (xor of all bits) is the LSB of the population count.

\begin{verbatim}
pcnt a0, a0
cpop a0, a0
andi a0, a0, 1
\end{verbatim}

Expand Down Expand Up @@ -372,7 +372,7 @@ \subsection{Rank and select}
\begin{minipage}{\linewidth}
\begin{verbatim}
select:
sbset a1, zero, a1
bset a1, zero, a1
bdep a0, a1, a0
ctz a0, a0
ret
Expand All @@ -387,7 +387,7 @@ \subsection{Rank and select}
rank:
not a1, a1
sll a0, a1
pcnt a0, a0
cpop a0, a0
ret
\end{verbatim}
\end{minipage}
Expand Down Expand Up @@ -484,7 +484,7 @@ \subsection{Finding bytes of certain values}
\end{verbatim}
\end{minipage}

These schemes can easily be extended with {\tt ctz} and {\tt pcnt} to perform
These schemes can easily be extended with {\tt ctz} and {\tt cpop} to perform
operations such as counting the number of bytes of a certain value within a
word, or finding the position of the first such byte.

Expand Down Expand Up @@ -1139,7 +1139,7 @@ \subsection{Using sheep-and-goats}
bext a2, a0, a1
not a1, a1
bext a0, a0, a1
pcnt a1, a1
cpop a1, a1
ror a0, a0, a1
or a0, a0, a2
\end{verbatim}
Expand Down
Loading

0 comments on commit c3935cc

Please sign in to comment.