summaryrefslogtreecommitdiff
path: root/test/wasm2js/unary-ops.2asm.js.opt
blob: f5d49d3f619bf5303ba1425fe5063ca6034266cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

function asmFunc(imports) {
 var Math_imul = Math.imul;
 var Math_fround = Math.fround;
 var Math_abs = Math.abs;
 var Math_clz32 = Math.clz32;
 var Math_min = Math.min;
 var Math_max = Math.max;
 var Math_floor = Math.floor;
 var Math_ceil = Math.ceil;
 var Math_trunc = Math.trunc;
 var Math_sqrt = Math.sqrt;
 var i64toi32_i32$HIGH_BITS = 0;
 function $0($0_1) {
  $0_1 = $0_1 | 0;
  var $1 = 0;
  while (1) {
   if ($0_1) {
    $0_1 = $0_1 - 1 & $0_1;
    $1 = $1 + 1 | 0;
    continue;
   }
   break;
  };
  return $1 | 0;
 }
 
 function $5($0_1) {
  $0_1 = $0_1 | 0;
  return Math_clz32($0_1) | 0;
 }
 
 function $6($0_1) {
  $0_1 = $0_1 | 0;
  if ($0_1) {
   $0_1 = 31 - Math_clz32($0_1 - 1 ^ $0_1) | 0
  } else {
   $0_1 = 32
  }
  return $0_1 | 0;
 }
 
 function legalstub$1($0_1, $1, $2, $3) {
  var $4 = 0, $5_1 = 0, $6_1 = 0;
  $4 = $0_1;
  while (1) {
   if ($1 | $4) {
    $0_1 = $4;
    $4 = $0_1 & $0_1 - 1;
    $1 = $1 - !$0_1 & $1;
    $5_1 = $5_1 + 1 | 0;
    $6_1 = $5_1 ? $6_1 : $6_1 + 1 | 0;
    continue;
   }
   break;
  };
  i64toi32_i32$HIGH_BITS = $6_1;
  return ($2 | 0) == ($5_1 | 0) & ($3 | 0) == (i64toi32_i32$HIGH_BITS | 0);
 }
 
 function legalstub$2($0_1, $1, $2) {
  return !$2 & ($0_1 | 0) == ($1 | 0);
 }
 
 function legalstub$3($0_1, $1, $2) {
  return ($0_1 | 0) == ($1 | 0) & ($2 | 0) == $0_1 >> 31;
 }
 
 function legalstub$4($0_1, $1) {
  return !($0_1 | $1);
 }
 
 function legalstub$7($0_1, $1, $2, $3) {
  var $4 = 0;
  $4 = Math_clz32($0_1) + 32 | 0;
  $0_1 = Math_clz32($1);
  return !$3 & ($2 | 0) == ((($0_1 | 0) == 32 ? $4 : $0_1) | 0);
 }
 
 function legalstub$8($0_1, $1, $2, $3) {
  var $4 = 0, $5_1 = 0, $6_1 = 0, $7 = 0;
  __inlined_func$__wasm_ctz_i64$3 : {
   if ($1 | $0_1) {
    $4 = $1 - 1 | 0;
    $5_1 = $4 + 1 | 0;
    $6_1 = $4;
    $4 = $0_1 - 1 | 0;
    $7 = Math_clz32($0_1 ^ $4) + 32 | 0;
    $0_1 = Math_clz32($1 ^ (($4 | 0) != -1 ? $5_1 : $6_1));
    $0_1 = ($0_1 | 0) == 32 ? $7 : $0_1;
    $1 = 63 - $0_1 | 0;
    i64toi32_i32$HIGH_BITS = 0 - ($0_1 >>> 0 > 63) | 0;
    break __inlined_func$__wasm_ctz_i64$3;
   }
   i64toi32_i32$HIGH_BITS = 0;
   $1 = 64;
  }
  return ($1 | 0) == ($2 | 0) & ($3 | 0) == (i64toi32_i32$HIGH_BITS | 0);
 }
 
 return {
  "i32_popcnt": $0, 
  "check_popcnt_i64": legalstub$1, 
  "check_extend_ui32": legalstub$2, 
  "check_extend_si32": legalstub$3, 
  "check_eqz_i64": legalstub$4, 
  "i32_clz": $5, 
  "i32_ctz": $6, 
  "check_clz_i64": legalstub$7, 
  "check_ctz_i64": legalstub$8
 };
}

var retasmFunc = asmFunc({
});
export var i32_popcnt = retasmFunc.i32_popcnt;
export var check_popcnt_i64 = retasmFunc.check_popcnt_i64;
export var check_extend_ui32 = retasmFunc.check_extend_ui32;
export var check_extend_si32 = retasmFunc.check_extend_si32;
export var check_eqz_i64 = retasmFunc.check_eqz_i64;
export var i32_clz = retasmFunc.i32_clz;
export var i32_ctz = retasmFunc.i32_ctz;
export var check_clz_i64 = retasmFunc.check_clz_i64;
export var check_ctz_i64 = retasmFunc.check_ctz_i64;