Skip to content

Commit

Permalink
spec: mixed-input arguments for prim ops are no longer allowed (#1085)
Browse files Browse the repository at this point in the history
This updates the spec to refelect the changes made in #587.
It also fixes issue #968.
  • Loading branch information
ekiwi authored and mergify[bot] committed Jun 3, 2019
1 parent eb64bf5 commit e747c8c
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions spec/spec.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,6 @@ \subsection{Add Operation}
\begin{tabular}{ |c|c|c|c|c|c| }
\opheader
add & (e1,e2) & () & (UInt,UInt) & UInt & max(w\ts{e1},w\ts{e2})+1\\
&&& (UInt,SInt) & SInt & max(w\ts{e1},w\ts{e2}-1)+2\\
&&& (SInt,UInt) & SInt & max(w\ts{e1}-1,w\ts{e2})+2\\
&&& (SInt,SInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\
\hline
\end{tabular}
Expand All @@ -1195,8 +1193,6 @@ \subsection{Subtract Operation}
\begin{tabular}{ |c|c|c|c|c|c| }
\opheader
sub & (e1,e2) & () & (UInt,UInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\
&&& (UInt,SInt) & SInt & max(w\ts{e1}+2,w\ts{e2}+1)\\
&&& (SInt,UInt) & SInt & max(w\ts{e1}+1,w\ts{e2}+2)\\
&&& (SInt,SInt) & SInt & max(w\ts{e1},w\ts{e2})+1\\
\hline
\end{tabular}
Expand All @@ -1212,8 +1208,6 @@ \subsection{Multiply Operation}
\begin{tabular}{ |c|c|c|c|c|c| }
\opheader
mul & (e1,e2) & () & (UInt,UInt) & UInt & w\ts{e1}+w\ts{e2}\\
&&& (UInt,SInt) & SInt & w\ts{e1}+w\ts{e2}\\
&&& (SInt,UInt) & SInt & w\ts{e1}+w\ts{e2}\\
&&& (SInt,SInt) & SInt & w\ts{e1}+w\ts{e2}\\
\hline
\end{tabular}
Expand All @@ -1229,8 +1223,6 @@ \subsection{Divide Operation}
\begin{tabular}{ |c|c|c|c|c|c| }
\opheader
div & (num,den) & () & (UInt,UInt) & UInt & w\ts{num}\\
&&& (UInt,SInt) & SInt & w\ts{num}+1\\
&&& (SInt,UInt) & SInt & w\ts{num}\\
&&& (SInt,SInt) & SInt & w\ts{num}+1\\
\hline
\end{tabular}
Expand All @@ -1246,8 +1238,6 @@ \subsection{Modulus Operation}
\begin{tabular}{ |c|c|c|c|c|c| }
\opheader
rem & (num,den) & () & (UInt,UInt) & UInt & min(w\ts{num},w\ts{den})\\
&&& (UInt,SInt) & UInt & min(w\ts{num},w\ts{den})\\
&&& (SInt,UInt) & SInt & min(w\ts{num},w\ts{den}+1)\\
&&& (SInt,SInt) & SInt & min(w\ts{num},w\ts{den})\\
\hline
\end{tabular}
Expand All @@ -1266,9 +1256,7 @@ \subsection{Comparison Operations}
\begin{tabular}{ |c|c|c|c|c|c| }
\opheader
lt,leq,gt, & (e1,e2) & () & (UInt,UInt) & UInt & 1\\
geq,eq,neq &&& (UInt,SInt) & UInt & 1\\
&&& (SInt,UInt) & UInt & 1\\
&&& (SInt,SInt) & UInt & 1\\
geq,eq,neq &&& (SInt,SInt) & UInt & 1\\
\hline
\end{tabular}
}}
Expand Down Expand Up @@ -1464,9 +1452,7 @@ \subsection{Binary Bitwise Operations}
\begin{tabular}{ |c|c|c|c|c|c| }
\opheader
and,or,xor & (e1, e2) & () & (UInt,UInt) & UInt & max(w\ts{e1},w\ts{e2})\\
&&& (UInt,SInt) & UInt & max(w\ts{e1},w\ts{e2})\\
&&& (SInt,UInt) & UInt & max(w\ts{e1},w\ts{e2})\\
&&& (SInt,SInt) & UInt & max(w\ts{e1},w\ts{e2})\\
&&& (SInt,SInt) & UInt & max(w\ts{e1},w\ts{e2})\\
\hline
\end{tabular}
}}
Expand Down Expand Up @@ -1498,8 +1484,6 @@ \subsection{Concatenate Operation}
\begin{tabular}{ |c|c|c|c|c|c| }
\opheader
cat & (e1,e2) & () & (UInt, UInt) & UInt & w\ts{e1}+w\ts{e2}\\
&&& (UInt, SInt) & UInt & w\ts{e1}+w\ts{e2}\\
&&& (SInt, UInt) & UInt & w\ts{e1}+w\ts{e2}\\
&&& (SInt, SInt) & UInt & w\ts{e1}+w\ts{e2}\\
\hline
\end{tabular}
Expand Down

0 comments on commit e747c8c

Please sign in to comment.