wasm_core/
fp_ops.rs

1use executor::{ExecuteResult, ExecuteError};
2
3#[inline]
4pub fn i32_reinterpret_f32(v: f32) -> i32 {
5    unsafe {
6        ::std::mem::transmute(v)
7    }
8}
9
10#[inline]
11pub fn i64_reinterpret_f64(v: f64) -> i64 {
12    unsafe {
13        ::std::mem::transmute(v)
14    }
15}
16
17#[inline]
18pub fn f32_reinterpret_i32(v: i32) -> f32 {
19    unsafe {
20        ::std::mem::transmute(v)
21    }
22}
23
24#[inline]
25pub fn f64_reinterpret_i64(v: i64) -> f64 {
26    unsafe {
27        ::std::mem::transmute(v)
28    }
29}