Fix shift math helpers to mask the shift operand (#98481)

This commit is contained in:
Filip Navara 2024-02-15 17:15:26 +01:00 committed by GitHub
parent eab4b76713
commit bd5f6eb73f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -139,17 +139,17 @@ EXTERN_C NATIVEAOT_API uint64_t REDHAWK_CALLCONV RhpULMul(uint64_t i, uint64_t j
EXTERN_C NATIVEAOT_API uint64_t REDHAWK_CALLCONV RhpLRsz(uint64_t i, int32_t j)
{
return i >> j;
return i >> (j & 0x3f);
}
EXTERN_C NATIVEAOT_API int64_t REDHAWK_CALLCONV RhpLRsh(int64_t i, int32_t j)
{
return i >> j;
return i >> (j & 0x3f);
}
EXTERN_C NATIVEAOT_API int64_t REDHAWK_CALLCONV RhpLLsh(int64_t i, int32_t j)
{
return i << j;
return i << (j & 0x3f);
}
EXTERN_C NATIVEAOT_API int64_t REDHAWK_CALLCONV RhpDbl2Lng(double val)