From 53e08548a92855faa2d53cd14e9f78c1b7e8a852 Mon Sep 17 00:00:00 2001 From: Marcin Hajder Date: Wed, 12 Apr 2023 09:38:29 +0200 Subject: [PATCH] Added more corrections related to presubmit check arm build --- test_conformance/conversions/fplib.h | 5 +++++ test_conformance/conversions/test_conversions.cpp | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/test_conformance/conversions/fplib.h b/test_conformance/conversions/fplib.h index 534550a32..c69b1e891 100644 --- a/test_conformance/conversions/fplib.h +++ b/test_conformance/conversions/fplib.h @@ -13,6 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. // +#ifndef CONVERSIONS_FPLIB_H +#define CONVERSIONS_FPLIB_H + #include #include @@ -28,3 +31,5 @@ typedef enum float qcom_u64_2_f32(uint64_t data, bool sat, roundingMode rnd); float qcom_s64_2_f32(int64_t data, bool sat, roundingMode rnd); + +#endif diff --git a/test_conformance/conversions/test_conversions.cpp b/test_conformance/conversions/test_conversions.cpp index 71fde8622..92f673a7b 100644 --- a/test_conformance/conversions/test_conversions.cpp +++ b/test_conformance/conversions/test_conversions.cpp @@ -59,6 +59,16 @@ #include "harness/mt19937.h" +#if (defined(__arm__) || defined(__aarch64__)) && defined(__GNUC__) +#include "fplib.h" +#endif + +#if (defined(__arm__) || defined(__aarch64__)) && defined(__GNUC__) +/* Rounding modes and saturation for use with qcom 64 bit to float conversion library */ + bool qcom_sat; + roundingMode qcom_rm; +#endif + //////////////////////////////////////////////////////////////////////////////////////// static int ParseArgs(int argc, const char **argv);