From d918ed31f7c720fad48a6ff627a345a6d3cf6011 Mon Sep 17 00:00:00 2001 From: Ng Zhi An Date: Mon, 18 May 2020 09:43:27 -0700 Subject: [PATCH] Move sign-extension-ops before saturating truncation ops. Fixes #1144. --- document/core/binary/instructions.rst | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/document/core/binary/instructions.rst b/document/core/binary/instructions.rst index a0ae94b4d9..d2bfa25035 100644 --- a/document/core/binary/instructions.rst +++ b/document/core/binary/instructions.rst @@ -374,6 +374,16 @@ All other numeric instructions are plain opcodes without any immediates. \hex{BF} &\Rightarrow& \F64.\REINTERPRET\K{\_}\I64 \\ \end{array} +.. math:: + \begin{array}{llclll} + \phantom{\production{instruction}} & \phantom{\Binstr} &\phantom{::=}& \phantom{\dots} && \phantom{thisshouldbeenough} \\[-2ex] &&|& + \hex{C0} &\Rightarrow& \I32.\EXTEND\K{8\_s} \\ &&|& + \hex{C1} &\Rightarrow& \I32.\EXTEND\K{16\_s} \\ &&|& + \hex{C2} &\Rightarrow& \I64.\EXTEND\K{8\_s} \\ &&|& + \hex{C3} &\Rightarrow& \I64.\EXTEND\K{16\_s} \\ &&|& + \hex{C4} &\Rightarrow& \I64.\EXTEND\K{32\_s} \\ + \end{array} + .. _binary-cvtop-trunc-sat: The saturating truncation instructions all have a one byte prefix. @@ -392,17 +402,6 @@ The saturating truncation instructions all have a one byte prefix. \end{array} -.. math:: - \begin{array}{llclll} - \phantom{\production{instruction}} & \phantom{\Binstr} &\phantom{::=}& \phantom{\dots} && \phantom{thisshouldbeenough} \\[-2ex] &&|& - \hex{C0} &\Rightarrow& \I32.\EXTEND\K{8\_s} \\ &&|& - \hex{C1} &\Rightarrow& \I32.\EXTEND\K{16\_s} \\ &&|& - \hex{C2} &\Rightarrow& \I64.\EXTEND\K{8\_s} \\ &&|& - \hex{C3} &\Rightarrow& \I64.\EXTEND\K{16\_s} \\ &&|& - \hex{C4} &\Rightarrow& \I64.\EXTEND\K{32\_s} \\ - \end{array} - - .. index:: expression pair: binary format; expression single: expression; constant