Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a25eb356 authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Turn off overflow protection for various math functions am: cbf5e691

am: 72b1fdbf

Change-Id: I46daf840866183690f27ff7b3e6ed7ffe8bec9f5
parents 0a4db601 72b1fdbf
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -50,6 +50,7 @@ extern "C"






    __attribute__((no_sanitize("integer")))
    __inline int32 pv_abs(int32 a)
    __inline int32 pv_abs(int32 a)
    {
    {
        int32 b = (a < 0) ? -a : a;
        int32 b = (a < 0) ? -a : a;
@@ -59,49 +60,58 @@ extern "C"






    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_mul32_Q30(const Int32 a, const Int32 b)
    __inline Int32 fxp_mul32_Q30(const Int32 a, const Int32 b)
    {
    {
        return (Int32)(((int64)(a) * b) >> 30);
        return (Int32)(((int64)(a) * b) >> 30);
    }
    }


    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_mac32_Q30(const Int32 a, const Int32 b, Int32 L_add)
    __inline Int32 fxp_mac32_Q30(const Int32 a, const Int32 b, Int32 L_add)
    {
    {
        return (L_add + (Int32)(((int64)(a) * b) >> 30));
        return (L_add + (Int32)(((int64)(a) * b) >> 30));
    }
    }


    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_mul32_Q32(const Int32 a, const Int32 b)
    __inline Int32 fxp_mul32_Q32(const Int32 a, const Int32 b)
    {
    {
        return (Int32)(((int64)(a) * b) >> 32);
        return (Int32)(((int64)(a) * b) >> 32);
    }
    }




    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_mul32_Q28(const Int32 a, const Int32 b)
    __inline Int32 fxp_mul32_Q28(const Int32 a, const Int32 b)
    {
    {
        return (Int32)(((int64)(a) * b) >> 28);
        return (Int32)(((int64)(a) * b) >> 28);
    }
    }


    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_mul32_Q27(const Int32 a, const Int32 b)
    __inline Int32 fxp_mul32_Q27(const Int32 a, const Int32 b)
    {
    {
        return (Int32)(((int64)(a) * b) >> 27);
        return (Int32)(((int64)(a) * b) >> 27);
    }
    }


    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_mul32_Q26(const Int32 a, const Int32 b)
    __inline Int32 fxp_mul32_Q26(const Int32 a, const Int32 b)
    {
    {
        return (Int32)(((int64)(a) * b) >> 26);
        return (Int32)(((int64)(a) * b) >> 26);
    }
    }




    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_mac32_Q32(Int32 L_add, const Int32 a, const Int32 b)
    __inline Int32 fxp_mac32_Q32(Int32 L_add, const Int32 a, const Int32 b)
    {
    {
        return (L_add + (Int32)(((int64)(a) * b) >> 32));
        return (L_add + (Int32)(((int64)(a) * b) >> 32));
    }
    }


    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_msb32_Q32(Int32 L_sub, const Int32 a, const Int32 b)
    __inline Int32 fxp_msb32_Q32(Int32 L_sub, const Int32 a, const Int32 b)
    {
    {
        return (L_sub - ((Int32)(((int64)(a) * b) >> 32)));
        return (L_sub - ((Int32)(((int64)(a) * b) >> 32)));
    }
    }




    __attribute__((no_sanitize("integer")))
    __inline Int32 fxp_mul32_Q29(const Int32 a, const Int32 b)
    __inline Int32 fxp_mul32_Q29(const Int32 a, const Int32 b)
    {
    {
        return (Int32)(((int64)(a) * b) >> 29);
        return (Int32)(((int64)(a) * b) >> 29);
+3 −0
Original line number Original line Diff line number Diff line
@@ -149,6 +149,7 @@ const int32 CosTable_dct32[16] =
; FUNCTION CODE
; FUNCTION CODE
----------------------------------------------------------------------------*/
----------------------------------------------------------------------------*/


__attribute__((no_sanitize("integer")))
void pvmp3_dct_16(int32 vec[], int32 flag)
void pvmp3_dct_16(int32 vec[], int32 flag)
{
{
    int32 tmp0;
    int32 tmp0;
@@ -308,6 +309,7 @@ void pvmp3_dct_16(int32 vec[], int32 flag)
/*----------------------------------------------------------------------------
/*----------------------------------------------------------------------------
; FUNCTION CODE
; FUNCTION CODE
----------------------------------------------------------------------------*/
----------------------------------------------------------------------------*/
__attribute__((no_sanitize("integer")))
void pvmp3_merge_in_place_N32(int32 vec[])
void pvmp3_merge_in_place_N32(int32 vec[])
{
{


@@ -366,6 +368,7 @@ void pvmp3_merge_in_place_N32(int32 vec[])






__attribute__((no_sanitize("integer")))
void pvmp3_split(int32 *vect)
void pvmp3_split(int32 *vect)
{
{


+1 −0
Original line number Original line Diff line number Diff line
@@ -117,6 +117,7 @@ Returns
; FUNCTION CODE
; FUNCTION CODE
----------------------------------------------------------------------------*/
----------------------------------------------------------------------------*/


__attribute__((no_sanitize("integer")))
void pvmp3_dct_9(int32 vec[])
void pvmp3_dct_9(int32 vec[])
{
{


+1 −0
Original line number Original line Diff line number Diff line
@@ -129,6 +129,7 @@ const int32 cosTerms_1_ov_cos_phi[18] =






__attribute__((no_sanitize("integer")))
void pvmp3_mdct_18(int32 vec[], int32 *history, const int32 *window)
void pvmp3_mdct_18(int32 vec[], int32 *history, const int32 *window)
{
{
    int32 i;
    int32 i;