From f517c3e04d0a375949dc7f049b05c068dd0b3746 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 29 Sep 2025 13:52:48 +0200 Subject: [PATCH 1/5] add mechanism to enable a trap on underflows - tested only on gcc so far --- apps/decoder.c | 6 +++ apps/encoder.c | 7 ++- apps/renderer.c | 6 +++ lib_com/options.h | 1 + lib_debug/flp_debug.h | 102 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 121 insertions(+), 1 deletion(-) create mode 100755 lib_debug/flp_debug.h diff --git a/apps/decoder.c b/apps/decoder.c index 41089d057e..14deb7de54 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -56,6 +56,9 @@ #include "debug.h" #endif #include "wmc_auto.h" +#ifdef DENORMAL_TRAP +#include "flp_debug.h" +#endif #define WMC_TOOL_SKIP @@ -229,6 +232,9 @@ int main( reset_wmops(); reset_mem( USE_BYTES ); #endif +#ifdef DENORMAL_TRAP + enable_denorm_trap(); +#endif hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ hHrtfBinary.hHrtfStatistics = NULL; /* just to avoid compilation warning */ diff --git a/apps/encoder.c b/apps/encoder.c index 61bb8ebb3f..4f3238f2d9 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -15,7 +15,6 @@ the software. This notice grants no license of any kind, including but not limited to patent license, nor is any license granted by implication, estoppel or otherwise. - Contributors are required to enter into the IVAS codec Public Collaboration agreement before making Contributors are required to enter into the IVAS codec Public Collaboration agreement before making contributions. @@ -43,6 +42,9 @@ #include "debug.h" #endif #include "wmc_auto.h" +#ifdef DENORMAL_TRAP +#include "flp_debug.h" +#endif #define WMC_TOOL_SKIP @@ -206,6 +208,9 @@ int main( reset_wmops(); reset_mem( USE_BYTES ); #endif +#ifdef DENORMAL_TRAP + enable_denorm_trap(); +#endif /*------------------------------------------------------------------------------------------* * Parse command-line arguments diff --git a/apps/renderer.c b/apps/renderer.c index cf5a7e33d2..a9b1626f95 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -53,6 +53,9 @@ #include "debug.h" #endif #include "wmc_auto.h" +#ifdef DENORMAL_TRAP +#include "flp_debug.h" +#endif #define WMC_TOOL_SKIP @@ -723,6 +726,9 @@ int main( reset_wmops(); reset_mem( USE_BYTES ); #endif +#ifdef DENORMAL_TRAP + enable_denorm_trap(); +#endif for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) { diff --git a/lib_com/options.h b/lib_com/options.h index 8b761e69b2..14937ce1e4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -55,6 +55,7 @@ /*#define WMOPS_DETAIL*/ /* Output detailed complexity printout for every function. Increases runtime overhead */ /*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output detailed complexity analysis for the worst-case frame */ /*#define MEM_COUNT_DETAILS*/ /* Output detailed memory analysis for the worst-case frame (writes to the file "mem_analysis.csv") */ +/*#define DENORMAL_TRAP*/ /* Enable trap for denormals */ #ifdef DEBUGGING /*#define DBG_BITSTREAM_ANALYSIS*/ /* Write bitstream with annotations to a text file */ diff --git a/lib_debug/flp_debug.h b/lib_debug/flp_debug.h new file mode 100755 index 0000000000..d24d909272 --- /dev/null +++ b/lib_debug/flp_debug.h @@ -0,0 +1,102 @@ +/****************************************************************************************************** + + (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB, + Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., + Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, + Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other + contributors to this repository. All Rights Reserved. + + This software is protected by copyright law and by international treaties. + The IVAS codec Public Collaboration consisting of Dolby International AB, Ericsson AB, + Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V., Huawei Technologies Co. LTD., + Koninklijke Philips N.V., Nippon Telegraph and Telephone Corporation, Nokia Technologies Oy, Orange, + Panasonic Holdings Corporation, Qualcomm Technologies, Inc., VoiceAge Corporation, and other + contributors to this repository retain full ownership rights in their respective contributions in + the software. This notice grants no license of any kind, including but not limited to patent + license, nor is any license granted by implication, estoppel or otherwise. + + Contributors are required to enter into the IVAS codec Public Collaboration agreement before making + contributions. + + This software is provided "AS IS", without any express or implied warranties. The software is in the + development stage. It is intended exclusively for experts who have experience with such software and + solely for the purpose of inspection. All implied warranties of non-infringement, merchantability + and fitness for a particular purpose are hereby disclaimed and excluded. + + Any dispute, controversy or claim arising under or in relation to providing this software shall be + submitted to and settled by the final, binding jurisdiction of the courts of Munich, Germany in + accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and + the United Nations Convention on Contracts on the International Sales of Goods. + +*******************************************************************************************************/ + +#include + +#if defined(_MSC_VER) + // MSVC, x87 + #include +#elif defined(__GNUC__) && (defined(__SSE__)||defined(__SSE2__)||defined(__AVX__)) + // GCC/Clang, x86 SSE/AVX + #include +#endif + +/* + detect underflow execption, which results in a denormal; + this will not detect each and every denormal - otherwise, + all FLP values would have to be tested for denormals using + e.g. fpclassify()/fpstatus or bitmasks +*/ + + +static inline void enable_denorm_trap(void) { +#if defined(_MSC_VER) + // MSVC, x87 + unsigned int cw = _controlfp(0,0); + cw &= ~_EM_UNDERFLOW; + _controlfpEM_DENORMAL(cw, _MCW_EM); + +#elif defined(__GNUC__) && (defined(__SSE__)||defined(__SSE2__)||defined(__AVX__)) + // GCC/Clang, x86 SSE/AVX + unsigned int mx = _mm_getcsr(); + mx &= ~_MM_MASK_UNDERFLOW; // unmaks underflows + _mm_setcsr(mx); + +#elif defined(__aarch64__) + // AArch64 (Apple Silicon) + uint64_t fpcr; + __asm__ volatile("mrs %0, fpcr" : "=r"(fpcr)); + // disable sits 24(FZ) & 25(DN) --> allow denormals to happen + fpcr &= ~((1ull<<24)|(1ull<<25)); + // set bit 3 (UFE) to unmask underflow exceptions + fpcr |= (1ull<<3); + __asm__ volatile("msr fpcr, %0" :: "r"(fpcr)); + +#else + fprintf(stderr, "enable_denorm_trap() not supported on platform!\n"); +#endif +} + +static inline void disable_denorm_trap(void) { +#if defined(_MSC_VER) + unsigned int cw = _controlfp(0,0); + cw |= _EM_UNDERFLOW; + _controlfp(cw, _MCW_EM); + +#elif defined(__GNUC__) && (defined(__SSE__)||defined(__SSE2__)||defined(__AVX__)) + unsigned int mx = _mm_getcsr(); + mx |= _MM_MASK_UNDERFLOW; // mask underflows + _mm_setcsr(mx); + +#elif defined(__aarch64__) + // AArch64 (Apple Silicon) + uint64_t fpcr; + __asm__ volatile("mrs %0, fpcr" : "=r"(fpcr)); + // delete bit 3 (UFE), set bits 24/25 (FZ/DN) again + fpcr &= ~(1ull<<3); + fpcr |= (1ull<<24)|(1ull<<25); + __asm__ volatile("msr fpcr, %0" :: "r"(fpcr)); + +#else + fprintf(stderr, "disable_denorm_trap() not supported on platform!\n"); +#endif +} -- GitLab From b51ccce8fe1694fe0e7485f26db61803d2ebd074 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 29 Sep 2025 14:36:36 +0200 Subject: [PATCH 2/5] set correct UFE bit for AArch64 --- lib_debug/flp_debug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_debug/flp_debug.h b/lib_debug/flp_debug.h index d24d909272..c11e97fe72 100755 --- a/lib_debug/flp_debug.h +++ b/lib_debug/flp_debug.h @@ -67,8 +67,8 @@ static inline void enable_denorm_trap(void) { __asm__ volatile("mrs %0, fpcr" : "=r"(fpcr)); // disable sits 24(FZ) & 25(DN) --> allow denormals to happen fpcr &= ~((1ull<<24)|(1ull<<25)); - // set bit 3 (UFE) to unmask underflow exceptions - fpcr |= (1ull<<3); + // set bit 11 (UFE) to unmask underflow exceptions + fpcr |= (1ull<<11); __asm__ volatile("msr fpcr, %0" :: "r"(fpcr)); #else @@ -91,8 +91,8 @@ static inline void disable_denorm_trap(void) { // AArch64 (Apple Silicon) uint64_t fpcr; __asm__ volatile("mrs %0, fpcr" : "=r"(fpcr)); - // delete bit 3 (UFE), set bits 24/25 (FZ/DN) again - fpcr &= ~(1ull<<3); + // delete bit 11 (UFE), set bits 24/25 (FZ/DN) again + fpcr &= ~(1ull<<11); fpcr |= (1ull<<24)|(1ull<<25); __asm__ volatile("msr fpcr, %0" :: "r"(fpcr)); -- GitLab From ddb7b3e9c5af0a798e036d0392b6c182775cc53e Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 29 Sep 2025 14:52:07 +0200 Subject: [PATCH 3/5] fix copy & paste error --- lib_debug/flp_debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_debug/flp_debug.h b/lib_debug/flp_debug.h index c11e97fe72..87a208a69c 100755 --- a/lib_debug/flp_debug.h +++ b/lib_debug/flp_debug.h @@ -53,7 +53,7 @@ static inline void enable_denorm_trap(void) { // MSVC, x87 unsigned int cw = _controlfp(0,0); cw &= ~_EM_UNDERFLOW; - _controlfpEM_DENORMAL(cw, _MCW_EM); + _controlfp(cw, _MCW_EM); #elif defined(__GNUC__) && (defined(__SSE__)||defined(__SSE2__)||defined(__AVX__)) // GCC/Clang, x86 SSE/AVX -- GitLab From fa69c6376b33643255a62dcba2fda1839bb630d7 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Tue, 30 Sep 2025 15:55:36 +0200 Subject: [PATCH 4/5] revised version of trap for floating-point exceptions --- apps/decoder.c | 6 +- apps/encoder.c | 6 +- apps/renderer.c | 6 +- lib_com/options.h | 2 +- lib_debug/flp_debug.h | 243 +++++++++++++++++++++++++++++++++++------- 5 files changed, 212 insertions(+), 51 deletions(-) mode change 100644 => 100755 lib_com/options.h mode change 100755 => 100644 lib_debug/flp_debug.h diff --git a/apps/decoder.c b/apps/decoder.c index 14deb7de54..74e78fa6e3 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -56,7 +56,7 @@ #include "debug.h" #endif #include "wmc_auto.h" -#ifdef DENORMAL_TRAP +#ifdef FLP_EXCEPTION_TRAP #include "flp_debug.h" #endif @@ -232,8 +232,8 @@ int main( reset_wmops(); reset_mem( USE_BYTES ); #endif -#ifdef DENORMAL_TRAP - enable_denorm_trap(); +#ifdef FLP_EXCEPTION_TRAP + enable_float_exception_trap( FLE_MASK_DENORM | FLE_MASK_UNDERFLOW ); #endif hHrtfBinary.hHrtfTD = NULL; /* just to avoid compilation warning */ diff --git a/apps/encoder.c b/apps/encoder.c index 4f3238f2d9..25550974df 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -42,7 +42,7 @@ #include "debug.h" #endif #include "wmc_auto.h" -#ifdef DENORMAL_TRAP +#ifdef FLP_EXCEPTION_TRAP #include "flp_debug.h" #endif @@ -208,8 +208,8 @@ int main( reset_wmops(); reset_mem( USE_BYTES ); #endif -#ifdef DENORMAL_TRAP - enable_denorm_trap(); +#ifdef FLP_EXECPTION_TRAP + enable_float_exception_trap( FLE_MASK_DENORM | FLE_MASK_UNDERFLOW ); #endif /*------------------------------------------------------------------------------------------* diff --git a/apps/renderer.c b/apps/renderer.c index a9b1626f95..fa12006ce3 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -53,7 +53,7 @@ #include "debug.h" #endif #include "wmc_auto.h" -#ifdef DENORMAL_TRAP +#ifdef FLP_EXCEPTION_TRAP #include "flp_debug.h" #endif @@ -726,8 +726,8 @@ int main( reset_wmops(); reset_mem( USE_BYTES ); #endif -#ifdef DENORMAL_TRAP - enable_denorm_trap(); +#ifdef FLP_EXCEPTION_TRAP + enable_float_exception_trap( FLE_MASK_DENORM | FLE_MASK_UNDERFLOW ); #endif for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i ) diff --git a/lib_com/options.h b/lib_com/options.h old mode 100644 new mode 100755 index 14937ce1e4..726a383feb --- a/lib_com/options.h +++ b/lib_com/options.h @@ -55,7 +55,7 @@ /*#define WMOPS_DETAIL*/ /* Output detailed complexity printout for every function. Increases runtime overhead */ /*#define WMOPS_WC_FRAME_ANALYSIS*/ /* Output detailed complexity analysis for the worst-case frame */ /*#define MEM_COUNT_DETAILS*/ /* Output detailed memory analysis for the worst-case frame (writes to the file "mem_analysis.csv") */ -/*#define DENORMAL_TRAP*/ /* Enable trap for denormals */ +/*#define FLP_EXCEPTION_TRAP*/ /* Enable trap for floating-point exceptions (e.g., denormals, underflow, overflow, ...) */ #ifdef DEBUGGING /*#define DBG_BITSTREAM_ANALYSIS*/ /* Write bitstream with annotations to a text file */ diff --git a/lib_debug/flp_debug.h b/lib_debug/flp_debug.h old mode 100755 new mode 100644 index 87a208a69c..d0fd894a2e --- a/lib_debug/flp_debug.h +++ b/lib_debug/flp_debug.h @@ -32,71 +32,232 @@ #include -#if defined(_MSC_VER) - // MSVC, x87 - #include -#elif defined(__GNUC__) && (defined(__SSE__)||defined(__SSE2__)||defined(__AVX__)) - // GCC/Clang, x86 SSE/AVX - #include +#if defined( _MSC_VER ) +// MSVC, x87 +#include +#elif defined( __GNUC__ ) && ( defined( __SSE__ ) || defined( __SSE2__ ) || defined( __AVX__ ) ) +// GCC/Clang, x86 SSE/AVX +#include #endif -/* - detect underflow execption, which results in a denormal; - this will not detect each and every denormal - otherwise, - all FLP values would have to be tested for denormals using +#define FLE_MASK_INVALID 0x080 +#define FLE_MASK_DENORM 0x100 +#define FLE_MASK_DIV_ZERO 0x200 +#define FLE_MASK_OVERFLOW 0x400 +#define FLE_MASK_UNDERFLOW 0x800 + +/* + detect underflow execption, which results in a denormal; + this will not detect each and every denormal - otherwise, + all FLP values would have to be tested for denormals using e.g. fpclassify()/fpstatus or bitmasks */ -static inline void enable_denorm_trap(void) { -#if defined(_MSC_VER) +static inline void enable_float_exception_trap( uint32_t fle_mask ) +{ + +#if defined( _MSC_VER ) + // MSVC, x87 - unsigned int cw = _controlfp(0,0); - cw &= ~_EM_UNDERFLOW; - _controlfp(cw, _MCW_EM); + unsigned int cw = _controlfp( 0, 0 ); + + if ( fle_mask & FLE_MASK_INVALID ) + { + cw &= ~_EM_INVALID; + } + if ( fle_mask & FLE_MASK_DENORM ) + { + cw &= ~_EM_DENORMAL; + } + if ( fle_mask & FLE_MASK_DIV_ZERO ) + { + cw &= ~_EM_ZERODIVIDE; + } + if ( fle_mask & FLE_MASK_OVERFLOW ) + { + cw &= ~_EM_OVERFLOW; + } + if ( fle_mask & FLE_MASK_UNDERFLOW ) + { + cw &= ~_EM_UNDERFLOW; + } + + _controlfp( cw, _MCW_EM ); + +#elif defined( __GNUC__ ) && ( defined( __SSE__ ) || defined( __SSE2__ ) || defined( __AVX__ ) ) -#elif defined(__GNUC__) && (defined(__SSE__)||defined(__SSE2__)||defined(__AVX__)) // GCC/Clang, x86 SSE/AVX unsigned int mx = _mm_getcsr(); - mx &= ~_MM_MASK_UNDERFLOW; // unmaks underflows - _mm_setcsr(mx); -#elif defined(__aarch64__) - // AArch64 (Apple Silicon) + if ( fle_mask & FLE_MASK_INVALID ) + { + mx &= ~_MM_MASK_INVALID; + } + if ( fle_mask & FLE_MASK_DENORM ) + { + mx &= ~_MM_MASK_DENORM; + } + if ( fle_mask & FLE_MASK_DIV_ZERO ) + { + mx &= ~_MM_MASK_DIV_ZERO; + } + if ( fle_mask & FLE_MASK_OVERFLOW ) + { + mx &= ~_MM_MASK_OVERFLOW; + } + if ( fle_mask & FLE_MASK_UNDERFLOW ) + { + mx &= ~_MM_MASK_UNDERFLOW; + } + + _mm_setcsr( mx ); + +#elif defined( __aarch64__ ) + + // AArch64 (e.g., Apple Silicon) uint64_t fpcr; - __asm__ volatile("mrs %0, fpcr" : "=r"(fpcr)); + __asm__ volatile( "mrs %0, fpcr" + : "=r"( fpcr ) ); + // disable sits 24(FZ) & 25(DN) --> allow denormals to happen - fpcr &= ~((1ull<<24)|(1ull<<25)); - // set bit 11 (UFE) to unmask underflow exceptions - fpcr |= (1ull<<11); - __asm__ volatile("msr fpcr, %0" :: "r"(fpcr)); + fpcr &= ~( ( 1ull << 24 ) | ( 1ull << 25 ) ); + + if ( fle_mask & FLE_MASK_INVALID ) + { + // set bit 8 (IOE) to unmask invalid operations exceptions + fpcr |= ( 1ull << 8 ); + } + if ( fle_mask & FLE_MASK_DENORM ) + { + // set bit 15 (IDE) to unmask input denormal exceptions + fpcr |= ( 1ull << 15 ); + } + if ( fle_mask & FLE_MASK_DIV_ZERO ) + { + // set bit 9 (DZE) to unmask div_zero exceptions + fpcr |= ( 1ull << 9 ); + } + if ( fle_mask & FLE_MASK_OVERFLOW ) + { + // set bit 10 (OFE) to unmask overflow exceptions + fpcr |= ( 1ull << 10 ); + } + if ( fle_mask & FLE_MASK_UNDERFLOW ) + { + // set bit 11 (UFE) to unmask underflow exceptions + fpcr |= ( 1ull << 11 ); + } + + __asm__ volatile( "msr fpcr, %0" ::"r"( fpcr ) ); #else - fprintf(stderr, "enable_denorm_trap() not supported on platform!\n"); + fprintf( stderr, "enable_float_exception_trap() not supported on platform!\n" ); #endif } -static inline void disable_denorm_trap(void) { -#if defined(_MSC_VER) - unsigned int cw = _controlfp(0,0); - cw |= _EM_UNDERFLOW; - _controlfp(cw, _MCW_EM); +static inline void disable_float_exception_trap( uint32_t fle_mask ) +{ + +#if defined( _MSC_VER ) -#elif defined(__GNUC__) && (defined(__SSE__)||defined(__SSE2__)||defined(__AVX__)) + // MSVC, x87 + unsigned int cw = _controlfp( 0, 0 ); + + if ( fle_mask & FLE_MASK_INVALID ) + { + cw |= _EM_INVALID; + } + if ( fle_mask & FLE_MASK_DENORM ) + { + cw |= _EM_DENORMAL; + } + if ( fle_mask & FLE_MASK_DIV_ZERO ) + { + cw |= _EM_ZERODIVIDE; + } + if ( fle_mask & FLE_MASK_OVERFLOW ) + { + cw |= _EM_OVERFLOW; + } + if ( fle_mask & FLE_MASK_UNDERFLOW ) + { + cw |= _EM_UNDERFLOW; + } + + _controlfp( cw, _MCW_EM ); + +#elif defined( __GNUC__ ) && ( defined( __SSE__ ) || defined( __SSE2__ ) || defined( __AVX__ ) ) + + // GCC/Clang, x86 SSE/AVX unsigned int mx = _mm_getcsr(); - mx |= _MM_MASK_UNDERFLOW; // mask underflows - _mm_setcsr(mx); -#elif defined(__aarch64__) + if ( fle_mask & FLE_MASK_INVALID ) + { + mx |= _MM_MASK_INVALID; + } + if ( fle_mask & FLE_MASK_DENORM ) + { + mx |= _MM_MASK_DENORM; + } + if ( fle_mask & FLE_MASK_DIV_ZERO ) + { + mx |= _MM_MASK_DIV_ZERO; + } + if ( fle_mask & FLE_MASK_OVERFLOW ) + { + mx |= _MM_MASK_OVERFLOW; + } + if ( fle_mask & FLE_MASK_UNDERFLOW ) + { + mx |= _MM_MASK_UNDERFLOW; + } + + _mm_setcsr( mx ); + +#elif defined( __aarch64__ ) + // AArch64 (Apple Silicon) uint64_t fpcr; - __asm__ volatile("mrs %0, fpcr" : "=r"(fpcr)); - // delete bit 11 (UFE), set bits 24/25 (FZ/DN) again - fpcr &= ~(1ull<<11); - fpcr |= (1ull<<24)|(1ull<<25); - __asm__ volatile("msr fpcr, %0" :: "r"(fpcr)); + __asm__ volatile( "mrs %0, fpcr" + : "=r"( fpcr ) ); + + if ( fle_mask & FLE_MASK_INVALID ) + { + // unset bit 8 (IOE) to mask invalid operations exceptions + fpcr &= ~( 1ull << 8 ); + } + if ( fle_mask & FLE_MASK_DENORM ) + { + // unset bit 15 (IDE) to mask input denormal exceptions + fpcr &= ~( 1ull << 15 ); + } + if ( fle_mask & FLE_MASK_DIV_ZERO ) + { + // unset bit 9 (DZE) to mask div_zero exceptions + fpcr &= ~( 1ull << 9 ); + } + if ( fle_mask & FLE_MASK_OVERFLOW ) + { + // unset bit 10 (OFE) to mask overflow exceptions + fpcr &= ~( 1ull << 10 ); + } + if ( fle_mask & FLE_MASK_UNDERFLOW ) + { + // unset bit 11 (UFE) to mask underflow exceptions + fpcr &= ~( 1ull << 11 ); + } + + + // set bits 24/25 (FZ/DN) again + fpcr |= ( 1ull << 24 ) | ( 1ull << 25 ); + fprintf( stderr, "float_exception_trap(): Setting bits 24/25 (FZ/DN) again\n" ); + + __asm__ volatile( "msr fpcr, %0" ::"r"( fpcr ) ); #else - fprintf(stderr, "disable_denorm_trap() not supported on platform!\n"); + + fprintf( stderr, "float_exception_trap() not supported on platform!\n" ); + #endif } -- GitLab From 403ba96b3daecff4542940416f5f9f6821f04f99 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Tue, 30 Sep 2025 16:01:46 +0200 Subject: [PATCH 5/5] fix typo --- apps/encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/encoder.c b/apps/encoder.c index 25550974df..4d9626edc3 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -208,7 +208,7 @@ int main( reset_wmops(); reset_mem( USE_BYTES ); #endif -#ifdef FLP_EXECPTION_TRAP +#ifdef FLP_EXCEPTION_TRAP enable_float_exception_trap( FLE_MASK_DENORM | FLE_MASK_UNDERFLOW ); #endif -- GitLab