Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions benchmarks/wasm/select.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
(module
(type (;0;) (func (param i32)))
(type (;1;) (func))
(import "console" "assert" (func (;0;) (type 0)))
(func (;1;) (type 1)
i32.const 11
i32.const 22
i32.const 1
select
i32.const 11
i32.eq
call 0
i64.const 33
i64.const 44
i32.const 0
select
i64.const 44
i64.eq
call 0
f32.const 0x1.6p+2 (;=5.5;)
f32.const 0x1.ap+2 (;=6.5;)
i32.const 1
select
f32.const 0x1.6p+2 (;=5.5;)
f32.eq
call 0
f64.const 0x1.dp+2 (;=7.25;)
f64.const 0x1.08p+3 (;=8.25;)
i32.const 0
select
f64.const 0x1.08p+3 (;=8.25;)
f64.eq
call 0)
(export "real_main" (func 1)))
2 changes: 1 addition & 1 deletion grammar/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Download ANTLR from https://www.antlr.org/download.html
ANTLR4 = antlr-4.12.0-complete.jar
ANTLR4 = antlr-4.13.0-complete.jar

llvm:
java -jar $(ANTLR4) LLVMLexer.g4
Expand Down
2 changes: 1 addition & 1 deletion grammar/WatLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ RETURN: 'return' ;
IF: 'if' ;
THEN: 'then' ;
ELSE: 'else' ;
SELECT: '.select' ;
SELECT: 'select' ;
CALL: 'call' ;
CALL_INDIRECT: 'call_indirect' ;
RETURN_CALL: 'return_call' ;
Expand Down
2 changes: 1 addition & 1 deletion grammar/WatParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ store
;

selectInstr
: numType SELECT
: SELECT
;

callIndirectInstr
Expand Down
2,518 changes: 1,259 additions & 1,259 deletions src/main/java/wasm/WatLexer.java

Large diffs are not rendered by default.

Loading