Commit 1c434d82 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

remove define from LC3plus changes and update integration script

parent 6d9be436
Loading
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -705,11 +705,7 @@ void ac_shift_fl(Encoder_State_fl* st)
        st->carry_count = st->carry_count + 1;
    }

#ifdef FIX_1288_SPLIT_REND_XSAN
    st->low = (LC3_INT)((LC3_UINT32)st->low << 8);
#else
    st->low = st->low << 8;
#endif
    st->low = (st->low) & (16777215); /* 2^24 - 1 */
}

+2 −10
Original line number Diff line number Diff line
@@ -88,17 +88,9 @@ static int null_in_list(void **list, int n)
/* return pointer to aligned base + base_size, *base_size += size + 4 bytes align */
void *balloc(void *base, size_t *base_size, size_t size)
{
#ifdef FIX_1288_SPLIT_REND_XSAN
    uintptr_t ptr = ((uintptr_t)base + *base_size + 3) & (uintptr_t)(~3);
#else
    uintptr_t ptr = ((uintptr_t)base + *base_size + 3) & ~3;
#endif
    assert((uintptr_t)base % 4 == 0); /* base must be 4-byte aligned */
#ifdef FIX_1288_SPLIT_REND_XSAN
    *base_size = (*base_size + size + 3) & (uintptr_t)(~3);
#else
    *base_size = (*base_size + size + 3) & ~3;
#endif
    return (void *)ptr;
}

+4 −0
Original line number Diff line number Diff line
@@ -57,6 +57,10 @@ find lib_lc3plus -name '*.[ch]' -type f -print0 | \
xargs -0 -I {} \
sed -i 's/^#[[:space:]]\+/#/' {}

# fix for sanitizer issues
sed -i 's/st->low << 8/(LC3_INT)((LC3_UINT32)st->low << 8)/' lib_lc3plus/ari_codec.c
sed -i 's/~3/(uintptr_t)(~3)/' lib_lc3plus/lc3.c

# Add .clang-format file to lib_lc3plus to disable formatting there
printf "Disabling clang-format in lib_lc3plus directory\n"
printf '