Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow 8 octets input signed extension function (64bit) #151

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions text/pvm.tex
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ \subsection{Single-Step State Transition}

Immediate arguments are encoded in little-endian format with the most-significant bit being the sign bit. They may be compactly encoded by eliding more significant octets. Elided octets are assumed to be zero if the \textsc{msb} of the value is zero, and 255 otherwise. This allows for compact representation of both positive and negative encoded values. We thus define the signed extension function operating on an input of $n$ octets as $\sext_n$:
\begin{align}\label{eq:signedextension}
\sext_{n \in \{0, 1, 2, 3, 4\}}\colon\left\{\begin{aligned}
\sext_{n \in \{0, 1, 2, 3, 4, 8\}}\colon\left\{\begin{aligned}
\N_{2^{8n}} &\to \N_R\\
x &\mapsto x + \ffrac{x}{2^{8n-1}}(2^{64}-2^{8n})
\end{aligned}\right.
Expand Down Expand Up @@ -354,7 +354,7 @@ \subsubsection{Instructions with Arguments of One Register \& Two Immediates}
\endhead
70&\token{store\_imm\_ind\_u8}&0&$\memwr_{\reg_A + \immed_X} = \immed_Y \bmod 2^8$\\ \mrule
71&\token{store\_imm\_ind\_u16}&0&$\memwr_{\reg_A + \immed_X \dots+ 2} = \se_2(\immed_Y \bmod 2^{16})$\\ \mrule
72&\token{store\_imm\_ind\_u32}&0&$\memwr_{\reg_A + \immed_X \dots+ 4} = \se_4(\immed_Y)$\\ \mrule
72&\token{store\_imm\_ind\_u32}&0&$\memwr_{\reg_A + \immed_X \dots+ 4} = \se_4(\immed_Y \bmod 2^{32})$\\ \mrule
73&\token{store\_imm\_ind\_u64}&0&$\memwr_{\reg_A + \immed_X \dots+ 8} = \se_8(\immed_Y)$\\
\bottomrule
\end{longtable}
Expand Down