summaryrefslogtreecommitdiff
path: root/scripts/gen-s-parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen-s-parser.py')
-rwxr-xr-xscripts/gen-s-parser.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/gen-s-parser.py b/scripts/gen-s-parser.py
index 2f63efe70..04f10c471 100755
--- a/scripts/gen-s-parser.py
+++ b/scripts/gen-s-parser.py
@@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import sys
+
instructions = [
("unreachable", "makeUnreachable()"),
("nop", "makeNop()"),
@@ -197,9 +199,9 @@ instructions = [
("i64.extend16_s", "makeUnary(s, UnaryOp::ExtendS16Int64)"),
("i64.extend32_s", "makeUnary(s, UnaryOp::ExtendS32Int64)"),
# atomic instructions
- ("wake", "makeAtomicWake(s)"),
- ("i32.wait", "makeAtomicWait(s, i32)"),
- ("i64.wait", "makeAtomicWait(s, i64)"),
+ ("atomic.notify", "makeAtomicNotify(s)"),
+ ("i32.atomic.wait", "makeAtomicWait(s, i32)"),
+ ("i64.atomic.wait", "makeAtomicWait(s, i64)"),
("i32.atomic.load8_u", "makeLoad(s, i32, /*isAtomic=*/true)"),
("i32.atomic.load16_u", "makeLoad(s, i32, /*isAtomic=*/true)"),
("i32.atomic.load", "makeLoad(s, i32, /*isAtomic=*/true)"),
@@ -541,6 +543,10 @@ def generate_with_guard(generator, guard):
def main():
+ if sys.version_info.major != 3:
+ import datetime
+ print("It's " + str(datetime.datetime.now().year) + "! Use Python 3!")
+ sys.exit(1)
print_header()
generate_with_guard(instruction_parser, "INSTRUCTION_PARSER")