Commit f3dda925 authored by norvell's avatar norvell
Browse files

Add FIX_USAN_L_DEPOSIT_H to resolve undefined behavior in L_deposit_h

parent 2805f2da
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2790,7 +2790,11 @@ Word32 L_deposit_h( Word16 var1 )
{
    Word32 L_var_out;

#ifdef FIX_USAN_L_DEPOSIT_H
    L_var_out = (Word32) ( ( (UWord32) var1 ) << 16 );
#else
    L_var_out = (Word32) var1 << 16;
#endif

#ifdef WMOPS
    multiCounter[currCounter].L_deposit_h++;
+1 −0
Original line number Diff line number Diff line
@@ -98,4 +98,5 @@
#define FIX_1486_IND_SHB_RES                   /* VA: Fix for issue 1486: align the usage of IND_SHB_RES_GS indices with float code */

#define TEST_HR
#define FIX_USAN_L_DEPOSIT_H                    /* Eri: (Issue #1528): The L_deposit_h does left-shift of negative numbers, which is undefined. This is resolved by casting to an unsigned number before the shift. */
#endif