Skip to content

Instantly share code, notes, and snippets.

@hajimehoshi
Created June 29, 2018 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hajimehoshi/d354f25313571bb37edc72bfd0ce9755 to your computer and use it in GitHub Desktop.
Save hajimehoshi/d354f25313571bb37edc72bfd0ce9755 to your computer and use it in GitHub Desktop.
loop ;; label = @1
get_local 0
f32.const 0x0p+0 (;=0;)
f32.store
get_local 5
f32.const 0x0p+0 (;=0;)
f32.store
get_local 2
f32.const 0x1p+0 (;=1;)
f32.store
get_local 7
f32.const 0x1p+0 (;=1;)
f32.store
get_local 3
f32.const 0x1p+0 (;=1;)
f32.store
get_local 9
f32.const 0x0p+0 (;=0;)
f32.store
get_local 10
f32.const 0x0p+0 (;=0;)
f32.store
get_local 11
f32.const 0x1p+0 (;=1;)
f32.store
get_local 12
f32.const 0x0p+0 (;=0;)
f32.store
get_local 13
f32.const 0x1p+0 (;=1;)
f32.store
get_local 14
f32.const 0x1p+0 (;=1;)
f32.store
get_local 15
f32.const 0x0p+0 (;=0;)
f32.store
get_local 16
f32.const 0x1p+0 (;=1;)
f32.store
get_local 17
f32.const 0x1p+0 (;=1;)
f32.store
get_local 18
f32.const 0x0p+0 (;=0;)
f32.store
get_local 19
f32.const 0x0p+0 (;=0;)
f32.store
get_local 1
i32.const 15
i32.and
set_local 8
get_local 0
get_local 8
i32.const 2
i32.shl
i32.add
set_local 8
get_local 8
f32.load
set_local 21
get_local 20
get_local 21
f32.add
set_local 20
get_local 1
i32.const 1
i32.add
set_local 1
get_local 1
i32.const 10000000
i32.ne
br_if 0 (;@1;)
end
get_global 2
i64.extend_u/i32
i32.wrap/i64
f64.const 0x0p+0 (;=0;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 4
i64.add
i32.wrap/i64
f64.const 0x0p+0 (;=0;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 8
i64.add
i32.wrap/i64
f64.const 0x1p+0 (;=1;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 12
i64.add
i32.wrap/i64
f64.const 0x1p+0 (;=1;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 16
i64.add
i32.wrap/i64
f64.const 0x1p+0 (;=1;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 20
i64.add
i32.wrap/i64
f64.const 0x0p+0 (;=0;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 24
i64.add
i32.wrap/i64
f64.const 0x0p+0 (;=0;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 28
i64.add
i32.wrap/i64
f64.const 0x1p+0 (;=1;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 32
i64.add
i32.wrap/i64
f64.const 0x0p+0 (;=0;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 36
i64.add
i32.wrap/i64
f64.const 0x1p+0 (;=1;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 40
i64.add
i32.wrap/i64
f64.const 0x1p+0 (;=1;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 44
i64.add
i32.wrap/i64
f64.const 0x0p+0 (;=0;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 48
i64.add
i32.wrap/i64
f64.const 0x1p+0 (;=1;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 52
i64.add
i32.wrap/i64
f64.const 0x1p+0 (;=1;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 56
i64.add
i32.wrap/i64
f64.const 0x0p+0 (;=0;)
f32.demote/f64
f32.store
get_global 2
i64.extend_u/i32
i64.const 60
i64.add
i32.wrap/i64
f64.const 0x0p+0 (;=0;)
f32.demote/f64
f32.store
i64.const 4
i64.const 64
i64.lt_u
i64.extend_u/i32
set_local 1
i64.const 4
i64.const 63
get_local 1
i32.wrap/i64
select
set_local 2
get_local 0
i64.const 63
i64.const 63
i64.const 63
i64.const 64
i64.lt_u
i64.extend_u/i32
i32.wrap/i64
select
i64.shr_s
i64.const 60
i64.shr_u
set_local 3
i64.const 60
i64.const 64
i64.lt_u
i64.extend_u/i32
set_local 4
get_local 0
get_local 3
i64.const 0
get_local 4
i32.wrap/i64
select
get_local 0
i64.add
get_local 2
i64.shr_s
i64.const 4
i64.shl
i64.const 0
get_local 1
i32.wrap/i64
select
i64.sub
tee_local 1
i64.const 16
i64.lt_u
i64.extend_u/i32
i32.wrap/i64
i32.eqz
if ;; label = @6
i32.const 8
set_global 1
br 5 (;@1;)
end
i32.const 4
set_global 1
br 4 (;@1;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment