From d0853d71f3282acccc126096728d375b3757e792 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Fri, 28 Jun 2019 15:08:49 -0400 Subject: vppinfra: add dummy/noop f32/f64 endian swap fns Makes life easier for binary API language bindings Type: fix Change-Id: Ib459274fda05153d01cbb7bc328a8407e3ee5027 Signed-off-by: Dave Barach --- src/vppinfra/byte_order.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/vppinfra/byte_order.h b/src/vppinfra/byte_order.h index 4cdc06fb329..87918f14e5c 100644 --- a/src/vppinfra/byte_order.h +++ b/src/vppinfra/byte_order.h @@ -210,6 +210,14 @@ _(i64); #undef _ +/* Dummy endian swap functions for IEEE floating-point numbers */ +/* *INDENT-OFF* */ +always_inline f64 clib_net_to_host_f64 (f64 x) { return x; } +always_inline f64 clib_host_to_net_f64 (f64 x) { return x; } +always_inline f32 clib_net_to_host_f32 (f32 x) { return x; } +always_inline f32 clib_host_to_net_f32 (f32 x) { return x; } +/* *INDENT-ON* */ + #endif /* included_clib_byte_order_h */ /* -- cgit 1.2.3-korg