Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
binji committed Feb 4, 2020
1 parent f514e94 commit bf92293
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions document/core/exec/instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ See :ref:`above <exec-atomic-store>`.
.. math::
\begin{array}{l}
\begin{array}{lcl@{\qquad}l}
F; (\I64.\CONST~k)~(\K{i}{N}.\CONST~c)~(\I32.\CONST~i)~\MEMORYATOMICWAIT{N}
F; (\I64.\CONST~k)~(\iN.\CONST~c)~(\I32.\CONST~i)~\MEMORYATOMICWAIT{N}
&\stepto^{(\ARD~a.\LLEN~n)~(\ARD~a.\LDATA[i]~b^{N})}&
F; (\WAITX~a.\LDATA[i])
\end{array}
Expand All @@ -987,7 +987,7 @@ See :ref:`above <exec-atomic-store>`.
\end{array}
\\[1ex]
\begin{array}{lcl@{\qquad}l}
F; (\I64.\CONST~k)~(\K{i}{N}.\CONST~c)~(\I32.\CONST~i)~\MEMORYATOMICWAIT{N}
F; (\I64.\CONST~k)~(\iN.\CONST~c)~(\I32.\CONST~i)~\MEMORYATOMICWAIT{N}
&\stepto^{(\ARD~a.\LLEN~n)~(\ARD~a.\LDATA[i]~b^{N})}&
F; (\I32.\CONST~1)
\end{array}
Expand All @@ -999,7 +999,7 @@ See :ref:`above <exec-atomic-store>`.
\end{array}
\\[1ex]
\begin{array}{lcl@{\qquad}l}
F; (\I64.\CONST~k)~(\K{i}{N}.\CONST~c)~(\I32.\CONST~i)~\MEMORYATOMICWAIT{N}
F; (\I64.\CONST~k)~(\iN.\CONST~c)~(\I32.\CONST~i)~\MEMORYATOMICWAIT{N}
&\stepto^{(\ARD~a.\LLEN~n)}&
F; \TRAP
\end{array}
Expand Down
10 changes: 5 additions & 5 deletions interpreter/text/lexer.mll
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ let string = '"' character* '"'
let name = '$' (letter | digit | '_' | symbol)+
let reserved = ([^'\"''('')'';'] # space)+ (* hack for table size *)

let nn = ("32" | "64")
let ixx = "i" ("32" | "64")
let fxx = "f" ("32" | "64")
let xx = "32" | "64"
let ixx = "i" xx
let fxx = "f" xx
let nxx = ixx | fxx
let mixx = "i" ("8" | "16" | "32" | "64")
let mfxx = "f" ("32" | "64")
let mfxx = "f" xx
let sign = "s" | "u"
let mem_size = "8" | "16" | "32"
let rmw = "add" | "sub" | "and" | "or" | "xor" | "xchg"
Expand Down Expand Up @@ -254,7 +254,7 @@ rule token = parse

| "memory.atomic.notify"
{ MEMORY_ATOMIC_NOTIFY (fun a o -> (memory_atomic_notify (opt a 2)) o) }
| "memory.atomic.wait"(nn as sz)
| "memory.atomic.wait"(xx as sz)
{ MEMORY_ATOMIC_WAIT (fun a o ->
intop ("i" ^ sz)
(memory_atomic_wait32 (opt a 2))
Expand Down

0 comments on commit bf92293

Please sign in to comment.