From 74a3b302df4422bec47e754cad1703b36ff75cd2 Mon Sep 17 00:00:00 2001 From: Schuyler Eldridge Date: Thu, 8 Feb 2018 22:31:42 -0500 Subject: Update spec for rhs Fixes #450 Signed-off-by: Schuyler Eldridge --- spec/spec.pdf | Bin 245322 -> 245456 bytes spec/spec.tex | 12 +++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/spec.pdf b/spec/spec.pdf index 7a771d33..99cf3b4f 100644 Binary files a/spec/spec.pdf and b/spec/spec.pdf differ 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} -- cgit v1.2.3