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 #include <stdint.h> 6 7 #ifndef WASM_EXTERNAL_REFS_H 8 #define WASM_EXTERNAL_REFS_H 9 10 namespace v8 { 11 namespace internal { 12 namespace wasm { 13 14 void f32_trunc_wrapper(float* param); 15 16 void f32_floor_wrapper(float* param); 17 18 void f32_ceil_wrapper(float* param); 19 20 void f32_nearest_int_wrapper(float* param); 21 22 void f64_trunc_wrapper(double* param); 23 24 void f64_floor_wrapper(double* param); 25 26 void f64_ceil_wrapper(double* param); 27 28 void f64_nearest_int_wrapper(double* param); 29 30 void int64_to_float32_wrapper(int64_t* input, float* output); 31 32 void uint64_to_float32_wrapper(uint64_t* input, float* output); 33 34 void int64_to_float64_wrapper(int64_t* input, double* output); 35 36 void uint64_to_float64_wrapper(uint64_t* input, double* output); 37 38 int32_t float32_to_int64_wrapper(float* input, int64_t* output); 39 40 int32_t float32_to_uint64_wrapper(float* input, uint64_t* output); 41 42 int32_t float64_to_int64_wrapper(double* input, int64_t* output); 43 44 int32_t float64_to_uint64_wrapper(double* input, uint64_t* output); 45 46 int32_t int64_div_wrapper(int64_t* dst, int64_t* src); 47 48 int32_t int64_mod_wrapper(int64_t* dst, int64_t* src); 49 50 int32_t uint64_div_wrapper(uint64_t* dst, uint64_t* src); 51 52 int32_t uint64_mod_wrapper(uint64_t* dst, uint64_t* src); 53 54 uint32_t word32_ctz_wrapper(uint32_t* input); 55 56 uint32_t word64_ctz_wrapper(uint64_t* input); 57 58 uint32_t word32_popcnt_wrapper(uint32_t* input); 59 60 uint32_t word64_popcnt_wrapper(uint64_t* input); 61 62 void float64_pow_wrapper(double* param0, double* param1); 63 64 typedef void (*WasmTrapCallbackForTesting)(); 65 66 void set_trap_callback_for_testing(WasmTrapCallbackForTesting callback); 67 68 void call_trap_callback_for_testing(); 69 70 } // namespace wasm 71 } // namespace internal 72 } // namespace v8 73 #endif 74