mirror of
https://github.com/johnwinans/rvalp.git
synced 2025-09-27 13:12:03 -04:00
imm_j and imm_b can only be even
This commit is contained in:
parent
a44a1fcd6f
commit
8eeb353636
@ -209,7 +209,7 @@ The address of the current instruction minus a numeric offset.
|
|||||||
\subsection{pcrel\_13}
|
\subsection{pcrel\_13}
|
||||||
\label{pcrel.13}
|
\label{pcrel.13}
|
||||||
|
|
||||||
An address that is within $[-4096..4095]$ of the current instruction location.
|
An address that is within $[-4096..4094]$ $[$\verb@-0x1000..0x0ffe@$]$ of the current instruction location.
|
||||||
These addresses are typically expressed in assembly source code by using labels.
|
These addresses are typically expressed in assembly source code by using labels.
|
||||||
See \autoref{insnformat:btype} for examples.
|
See \autoref{insnformat:btype} for examples.
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ See \autoref{insnformat:btype} for examples.
|
|||||||
\subsection{pcrel\_21}
|
\subsection{pcrel\_21}
|
||||||
\label{pcrel.21}
|
\label{pcrel.21}
|
||||||
|
|
||||||
An address that is within $[-1048576..1048575]$ of the current instruction
|
An address that is within $[-1048576..1048574]$ $[$\verb@-0x100000..0x0ffffe@$]$ of the current instruction
|
||||||
location.
|
location.
|
||||||
These addresses are typically expressed in assembly source code by using labels.
|
These addresses are typically expressed in assembly source code by using labels.
|
||||||
See \autoref{insnformat:jtype} for an example.
|
See \autoref{insnformat:jtype} for an example.
|
||||||
@ -414,8 +414,8 @@ arranged in a different order.
|
|||||||
|
|
||||||
Note that the \verb@imm_j@ value is
|
Note that the \verb@imm_j@ value is
|
||||||
%expressed in the instruction as a target address that is converted to
|
%expressed in the instruction as a target address that is converted to
|
||||||
a 21-bit value in the range of
|
an even 21-bit value in the range of
|
||||||
$[-1048576..1048575]$ representing a \verb@pc@-relative offset to the
|
$[-1048576..1048574]$ $[$\verb@-0x100000..0x0ffffe@$]$ representing a \verb@pc@-relative offset to the
|
||||||
target address.
|
target address.
|
||||||
|
|
||||||
%In the J-type format the 20 {\em imm} bits are arranged such
|
%In the J-type format the 20 {\em imm} bits are arranged such
|
||||||
@ -995,8 +995,8 @@ to form the \verb@imm_b@ value.
|
|||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
Note that \verb@imm_b@ is expressed in the instruction as a target
|
Note that \verb@imm_b@ is expressed in the instruction as a target
|
||||||
address that is converted to a 13-bit value in the range of
|
address that is converted to an even 13-bit value in the range of
|
||||||
$[-4096..4095]$ representing a \verb@pc@-relative offset to the
|
$[-4096..4094]$ $[$\verb@-0x1000..0x0ffe@$]$ representing a \verb@pc@-relative offset to the
|
||||||
target address. For example, consider the branch instructions in
|
target address. For example, consider the branch instructions in
|
||||||
the following code:
|
the following code:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user