blob: ae9ee1a7e63959ecacc9e8651ccb5bf2ead96c6d [file] [log] [blame]
XNNPACK Teamb455b122019-09-27 18:10:33 -07001// Copyright 2019 Google LLC
2//
3// This source code is licensed under the BSD-style license found in the
4// LICENSE file in the root directory of this source tree.
5
6#include <stdint.h>
7
XNNPACK Teamb455b122019-09-27 18:10:33 -07008#include <fp16.h>
9
Marat Dukhand343c222019-10-07 09:22:14 -070010#include <xnnpack/common.h>
11
XNNPACK Teamb455b122019-09-27 18:10:33 -070012uint32_t xnn_stub_wasm_f32_sub(uint32_t a, uint32_t b) {
13 return fp32_to_bits(fp32_from_bits(a) - fp32_from_bits(b));
14}
15
Marat Dukhan1dadbf72019-10-01 10:46:20 -070016#if XNN_ARCH_WASM || XNN_ARCH_WASMSIMD
XNNPACK Teamb455b122019-09-27 18:10:33 -070017uint32_t xnn_stub_wasm_f32_min(uint32_t a, uint32_t b) {
18 return fp32_to_bits(__builtin_wasm_min_f32(fp32_from_bits(a), fp32_from_bits(b)));
19}
Marat Dukhan1dadbf72019-10-01 10:46:20 -070020#endif // XNN_ARCH_WASM || XNN_ARCH_WASMSIMD