diff --git a/test_conformance/conversions/fplib.h b/test_conformance/conversions/fplib.h index 534550a32f..c69b1e8919 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 71fde8622c..92f673a7b5 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);