• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_WASM_WASM_EXTERNAL_REFS_H_
6 #define V8_WASM_WASM_EXTERNAL_REFS_H_
7 
8 #include <stdint.h>
9 
10 #include "src/common/globals.h"
11 
12 namespace v8 {
13 namespace internal {
14 namespace wasm {
15 
16 V8_EXPORT_PRIVATE void f32_trunc_wrapper(Address data);
17 
18 V8_EXPORT_PRIVATE void f32_floor_wrapper(Address data);
19 
20 V8_EXPORT_PRIVATE void f32_ceil_wrapper(Address data);
21 
22 V8_EXPORT_PRIVATE void f32_nearest_int_wrapper(Address data);
23 
24 V8_EXPORT_PRIVATE void f64_trunc_wrapper(Address data);
25 
26 V8_EXPORT_PRIVATE void f64_floor_wrapper(Address data);
27 
28 V8_EXPORT_PRIVATE void f64_ceil_wrapper(Address data);
29 
30 V8_EXPORT_PRIVATE void f64_nearest_int_wrapper(Address data);
31 
32 V8_EXPORT_PRIVATE void int64_to_float32_wrapper(Address data);
33 
34 V8_EXPORT_PRIVATE void uint64_to_float32_wrapper(Address data);
35 
36 V8_EXPORT_PRIVATE void int64_to_float64_wrapper(Address data);
37 
38 V8_EXPORT_PRIVATE void uint64_to_float64_wrapper(Address data);
39 
40 V8_EXPORT_PRIVATE int32_t float32_to_int64_wrapper(Address data);
41 
42 V8_EXPORT_PRIVATE int32_t float32_to_uint64_wrapper(Address data);
43 
44 V8_EXPORT_PRIVATE int32_t float64_to_int64_wrapper(Address data);
45 
46 V8_EXPORT_PRIVATE int32_t float64_to_uint64_wrapper(Address data);
47 
48 V8_EXPORT_PRIVATE void float32_to_int64_sat_wrapper(Address data);
49 
50 V8_EXPORT_PRIVATE void float32_to_uint64_sat_wrapper(Address data);
51 
52 V8_EXPORT_PRIVATE void float64_to_int64_sat_wrapper(Address data);
53 
54 V8_EXPORT_PRIVATE void float64_to_uint64_sat_wrapper(Address data);
55 
56 V8_EXPORT_PRIVATE int32_t int64_div_wrapper(Address data);
57 
58 V8_EXPORT_PRIVATE int32_t int64_mod_wrapper(Address data);
59 
60 V8_EXPORT_PRIVATE int32_t uint64_div_wrapper(Address data);
61 
62 V8_EXPORT_PRIVATE int32_t uint64_mod_wrapper(Address data);
63 
64 V8_EXPORT_PRIVATE uint32_t word32_ctz_wrapper(Address data);
65 
66 V8_EXPORT_PRIVATE uint32_t word64_ctz_wrapper(Address data);
67 
68 V8_EXPORT_PRIVATE uint32_t word32_popcnt_wrapper(Address data);
69 
70 V8_EXPORT_PRIVATE uint32_t word64_popcnt_wrapper(Address data);
71 
72 V8_EXPORT_PRIVATE uint32_t word32_rol_wrapper(Address data);
73 
74 V8_EXPORT_PRIVATE uint32_t word32_ror_wrapper(Address data);
75 
76 V8_EXPORT_PRIVATE void word64_rol_wrapper(Address data);
77 
78 V8_EXPORT_PRIVATE void word64_ror_wrapper(Address data);
79 
80 V8_EXPORT_PRIVATE void float64_pow_wrapper(Address data);
81 
82 V8_EXPORT_PRIVATE void f64x2_ceil_wrapper(Address data);
83 
84 V8_EXPORT_PRIVATE void f64x2_floor_wrapper(Address data);
85 
86 V8_EXPORT_PRIVATE void f64x2_trunc_wrapper(Address data);
87 
88 V8_EXPORT_PRIVATE void f64x2_nearest_int_wrapper(Address data);
89 
90 V8_EXPORT_PRIVATE void f32x4_ceil_wrapper(Address data);
91 
92 V8_EXPORT_PRIVATE void f32x4_floor_wrapper(Address data);
93 
94 V8_EXPORT_PRIVATE void f32x4_trunc_wrapper(Address data);
95 
96 V8_EXPORT_PRIVATE void f32x4_nearest_int_wrapper(Address data);
97 
98 // The return type is {int32_t} instead of {bool} to enforce the compiler to
99 // zero-extend the result in the return register.
100 int32_t memory_init_wrapper(Address data);
101 
102 // The return type is {int32_t} instead of {bool} to enforce the compiler to
103 // zero-extend the result in the return register.
104 int32_t memory_copy_wrapper(Address data);
105 
106 // The return type is {int32_t} instead of {bool} to enforce the compiler to
107 // zero-extend the result in the return register.
108 int32_t memory_fill_wrapper(Address data);
109 
110 using WasmTrapCallbackForTesting = void (*)();
111 
112 V8_EXPORT_PRIVATE void set_trap_callback_for_testing(
113     WasmTrapCallbackForTesting callback);
114 
115 V8_EXPORT_PRIVATE void call_trap_callback_for_testing();
116 
117 }  // namespace wasm
118 }  // namespace internal
119 }  // namespace v8
120 
121 #endif  // V8_WASM_WASM_EXTERNAL_REFS_H_
122