diff options
| author | Schuyler Eldridge | 2018-02-08 22:31:42 -0500 |
|---|---|---|
| committer | Adam Izraelevitz | 2018-02-16 13:43:07 -0800 |
| commit | 74a3b302df4422bec47e754cad1703b36ff75cd2 (patch) | |
| tree | 72e9619ed6bc2291ed943bf2e9448d4a979b486d | |
| parent | e9578bca5ea7368bbc484fdd83e13fcaf4138e1f (diff) | |
Update spec for rhs
Fixes #450
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
| -rw-r--r-- | spec/spec.pdf | bin | 245322 -> 245456 bytes | |||
| -rw-r--r-- | spec/spec.tex | 12 |
2 files changed, 7 insertions, 5 deletions
diff --git a/spec/spec.pdf b/spec/spec.pdf Binary files differindex 7a771d33..99cf3b4f 100644 --- a/spec/spec.pdf +++ b/spec/spec.pdf diff --git a/spec/spec.tex b/spec/spec.tex index dc7b3757..dab27ddd 100644 --- a/spec/spec.tex +++ b/spec/spec.tex @@ -1355,16 +1355,18 @@ The shift left operation concatenates \vv{n} zero bits to the least significant \begin{figure}[H] { \fontsize{10pt}{1.10em}\selectfont {\ttfamily -\begin{tabular}{ |c|c|c|c|c|c| } - \opheader -shr & (e) & (n) & (UInt) & UInt & w\ts{e}-n\\ - &&& (SInt) & SInt & w\ts{e}-n\\ +\begin{tabular}{ |c|c|c|c|c|c| } + \opheader +shr & (e) & (n) & (UInt) & UInt & max(1, w\ts{e}-n)\\ + &&& (SInt) & SInt & max(1, w\ts{e}-n)\\ \hline \end{tabular} }} \end{figure} -The shift right operation truncates the least significant \vv{n} bits from \vv{e}. \vv{n} must be non-negative and strictly less than the bit width of \vv{e}. +The shift right operation truncates the least significant \vv{n} bits from \vv{e}. +If \vv{n} is greater than or equal to the bit-width of \vv{e}, the resulting value will be zero for unsigned types and the sign bit for signed types. +\vv{n} must be non-negative. \subsection{Dynamic Shift Left Operation} |
