Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/autotools-cross-mips.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Autotools-cross-MIPS

on: [push, pull_request]

jobs:

AutoMakeBuild:
name: AutoMake/${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "MIPS32/GCC",
os: ubuntu-latest,
vcpu: 24Kf,
toolchain-triple: mipsel-unknown-linux-musl,
buildconfig: ,
cflags: -mips32 -mtune=24kf,
}
- {
name: "MIPS32/GCC/Fixed",
os: ubuntu-latest,
vcpu: 24Kc,
toolchain-triple: mipsel-unknown-linux-muslsf,
buildconfig: --enable-fixed-point,
cflags: -mips32 -mtune=24kc,
}
- {
name: "MIPS32/GCC/Fixed/DSP",
os: ubuntu-latest,
vcpu: 24KEc,
toolchain-triple: mipsel-unknown-linux-muslsf,
buildconfig: --enable-fixed-point,
cflags: -mips32r2 -mdsp -mtune=24kec,
}
- {
name: "MIPS64/GCC",
os: ubuntu-latest,
vcpu: MIPS64R2-generic,
toolchain-triple: mips64el-unknown-linux-musl,
buildconfig: ,
cflags: -mips64,
}
- {
name: "MIPS64/GCC/Fixed",
os: ubuntu-latest,
vcpu: MIPS64R2-generic,
toolchain-triple: mips64el-unknown-linux-musl,
buildconfig: --enable-fixed-point,
cflags: -mips64,
}
- {
name: "MIPS64/GCC/Fixed/DSP",
os: ubuntu-latest,
vcpu: mips64dspr2,
toolchain-triple: mips64el-unknown-linux-musl,
buildconfig: --enable-fixed-point,
cflags: -mips64r2 -mdsp,
}
steps:
- uses: actions/checkout@v3
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y qemu-user
- name: Install prebuilt toolchain
run: wget https://github.com/cross-tools/musl-cross/releases/download/20250815/${{ matrix.config.toolchain-triple }}.tar.xz -O toolchain.tar.xz && sudo tar -C /opt/ -xf toolchain.tar.xz
- name: Autogen
run: ./autogen.sh
- name: Configure
run: CC=/opt/${{ matrix.config.toolchain-triple }}/bin/${{ matrix.config.toolchain-triple }}-gcc CFLAGS="${{ matrix.config.cflags }} -g -O2 -fvisibility=hidden -D_FORTIFY_SOURCE=2 -W -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes" ./configure --disable-shared --enable-assertions --enable-custom-modes --enable-check-asm --host=${{ matrix.config.toolchain-triple }} ${{ matrix.config.buildconfig }}
- name: Build
run: make -j 2
- name: Test
run: QEMU_LD_PREFIX=/opt/${{ matrix.config.toolchain-triple }}/${{ matrix.config.toolchain-triple }}/sysroot/ QEMU_CPU=${{ matrix.config.vcpu }} make check -j 2
2 changes: 1 addition & 1 deletion celt/_kiss_fft_guts.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
#if defined(OPUS_ARM_INLINE_EDSP)
#include "arm/kiss_fft_armv5e.h"
#endif
#if defined(__mips_dsp)
#if defined(__mips_dsp) && __mips == 32
#include "mips/kiss_fft_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion celt/celt.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define PACKAGE_VERSION "unknown"
#endif

#if defined(FIXED_POINT) && defined(__mips_dsp)
#if defined(FIXED_POINT) && defined(__mips_dsp) && __mips == 32
#include "mips/celt_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion celt/fixed_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
/** Divide a 32-bit value by a 32-bit value. Result fits in 32 bits */
#define DIV32(a,b) (((opus_val32)(a))/((opus_val32)(b)))

#if defined(__mips_dsp)
#if defined(__mips_dsp) && __mips == 32
#include "mips/fixed_generic_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion celt/mdct.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#include "mathops.h"
#include "stack_alloc.h"

#if defined(FIXED_POINT) && defined(__mips_dsp)
#if defined(FIXED_POINT) && defined(__mips_dsp) && __mips == 32
#include "mips/mdct_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion celt/pitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "x86/pitch_sse.h"
#endif

#if defined(FIXED_POINT) && defined(__mips_dsp)
#if defined(FIXED_POINT) && defined(__mips_dsp) && __mips == 32
#include "mips/pitch_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion celt/vq.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include "rate.h"
#include "pitch.h"

#if defined(FIXED_POINT) && defined(__mips_dsp)
#if defined(FIXED_POINT) && defined(__mips_dsp) && __mips == 32
#include "mips/vq_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion silk/NSQ_del_dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ typedef struct {

typedef NSQ_sample_struct NSQ_sample_pair[ 2 ];

#if defined(FIXED_POINT) && defined(__mips_dsp)
#if defined(FIXED_POINT) && defined(__mips_dsp) && __mips == 32
#include "mips/NSQ_del_dec_mipsr1.h"
#endif
static OPUS_INLINE void silk_nsq_del_dec_scale_states(
Expand Down
2 changes: 1 addition & 1 deletion silk/SigProc_FIX.h
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b)
#include "arm/SigProc_FIX_armv5e.h"
#endif

#if defined(FIXED_POINT) && defined(__mips_dsp)
#if defined(FIXED_POINT) && defined(__mips_dsp) && __mips == 32
#include "mips/sigproc_fix_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion silk/fixed/noise_shape_analysis_FIX.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static OPUS_INLINE void limit_warped_coefs(
}

/* Disable MIPS DSP version until it's updated. */
#if 0 && defined(__mips_dsp)
#if 0 && defined(__mips_dsp) && __mips == 32
#include "mips/noise_shape_analysis_FIX_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion silk/fixed/warped_autocorrelation_FIX.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.

#include "main_FIX.h"

#if defined(__mips_dsp)
#if defined(__mips_dsp) && __mips == 32
#include "mips/warped_autocorrelation_FIX_mipsr1.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion silk/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ POSSIBILITY OF SUCH DAMAGE.
(( (a) & ((b)^0x80000000) & 0x80000000) ? silk_int32_MIN : (a)-(b)) : \
((((a)^0x80000000) & (b) & 0x80000000) ? silk_int32_MAX : (a)-(b)) )

#if defined(FIXED_POINT) && defined(__mips_dsp)
#if defined(FIXED_POINT) && defined(__mips_dsp) && __mips == 32
#include "mips/macros_mipsr1.h"
#endif

Expand Down
Loading