--- Begin Message ---
Source: libjpeg-turbo
Version: 1:1.4.1-1
Severity: serious
Tags: patch upstream
Forwarded: https://github.com/libjpeg-turbo/libjpeg-turbo/pull/11
Control: found -1 1:1.4.80-115-gfb907b2-1
X-Debbugs-CC: debian-m...@lists.debian.org, m...@glandium.org
User: debian-m...@lists.debian.org
Usertags: mips-patch
Hi,
libjpeg-turbo FTBFS with GCC 5 on mips/mipsel with the following error
(full build log attached):
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -D_FORTIFY_SOURCE=2 -g
> -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic
> -ffloat-store -c jsimd_mips_dspr2.S -fPIC -DPIC -o .libs/jsimd_mips_dspr2.o
> jsimd_mips_dspr2.S: Assembler messages:
> jsimd_mips_dspr2.S:2845: Error: float register should be even, was 1
> jsimd_mips_dspr2.S:2846: Error: float register should be even, was 5
> jsimd_mips_dspr2.S:2849: Error: float register should be even, was 3
> jsimd_mips_dspr2.S:2850: Error: float register should be even, was 7
> jsimd_mips_dspr2.S:2853: Error: float register should be even, was 1
> jsimd_mips_dspr2.S:2853: Error: float register should be even, was 1
> jsimd_mips_dspr2.S:2853: Error: float register should be even, was 5
[...]
This has happened because in GCC 5 the MIPS ABI was altered very
slightly by enabling the -mfpxx GCC option by default. When this option
is enabled, the use of odd numbered floating point registers is not
allowed.
I'm afraid I did actually notice this issue with libjpeg-turbo some
months ago but filing a bug must have slipped my mind, so sorry about
that.
I've attached a patch (and forwarded it) which fixes this by changing
all the FP registers so that only even ones are used. Thankfully there
are enough FP registers in MIPS to do this quite easily.
Thanks,
James
dpkg-buildpackage -rfakeroot -D -us -uc -B
dpkg-buildpackage: source package libjpeg-turbo
dpkg-buildpackage: source version 1:1.4.1-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Ondřej Surý <ond...@debian.org>
dpkg-source --before-build libjpeg-turbo-1.4.1
dpkg-buildpackage: host architecture mipsel
fakeroot debian/rules clean
dh clean --parallel --with autoreconf
dh_testdir
debian/rules override_dh_auto_clean
make[1]: Entering directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1'
/usr/bin/make -C debian/extra clean
make[2]: Entering directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1/debian/extra'
rm -f jpegexiforient
make[2]: Leaving directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1/debian/extra'
if [ -e Makefile ]; then /usr/bin/make testclean; fi
dh_auto_clean
rm -f simd/jsimdcfg.inc
make[1]: Leaving directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1'
dh_autoreconf_clean
dh_clean
debian/rules build-arch
dh build-arch --parallel --with autoreconf
dh_testdir -a -O--parallel
dh_autoreconf -a -O--parallel
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:18: installing './ar-lib'
configure.ac:16: installing './compile'
configure.ac:22: installing './config.guess'
configure.ac:22: installing './config.sub'
configure.ac:8: installing './install-sh'
configure.ac:8: installing './missing'
Makefile.am: installing './depcomp'
dh_auto_configure -a -O--parallel
./configure --build=mipsel-linux-gnu --prefix=/usr
--includedir=\${prefix}/include --mandir=\${prefix}/share/man
--infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var
--disable-silent-rules --libdir=\${prefix}/lib/mipsel-linux-gnu
--libexecdir=\${prefix}/lib/mipsel-linux-gnu --disable-maintainer-mode
--disable-dependency-tracking
configure: WARNING: unrecognized options: --disable-maintainer-mode
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) none
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of gcc... none
checking build system type... mipsel-unknown-linux-gnu
checking host system type... mipsel-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert mipsel-unknown-linux-gnu file names to
mipsel-unknown-linux-gnu format... func_convert_file_noop
checking how to convert mipsel-unknown-linux-gnu file names to toolchain
format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether ln -s works... yes
checking size of size_t... 4
checking whether compiler supports pointers to undefined structures... yes
checking whether __SUNPRO_C is declared... no
checking for ANSI C header files... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for string.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether char is unsigned... no
checking for inline... inline
checking for size_t... yes
checking for unsigned char... yes
checking for unsigned short... yes
checking if right shift is signed... yes
checking for memset... yes
checking for memcpy... yes
checking libjpeg API version... 6.2
checking whether to include in-memory source/destination managers... yes
checking libjpeg shared library version... 62.1.0
checking whether the linker supports version scripts... yes (GNU style)
checking whether to use version script when building libjpeg-turbo... yes
checking for inline... inline __attribute__((always_inline))
checking whether to include arithmetic encoding support... yes
checking whether to include arithmetic decoding support... yes
checking whether to use 12-bit samples... no
checking whether to build TurboJPEG C wrapper... yes
checking whether to build TurboJPEG Java wrapper... no
checking if we have SIMD optimisations for cpu type... yes (mips)
checking if the assembler is GNU-compatible and can be used... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating pkgscripts/libjpeg-turbo.spec.tmpl
config.status: creating pkgscripts/makecygwinpkg.tmpl
config.status: creating pkgscripts/makedpkg.tmpl
config.status: creating pkgscripts/makemacpkg.tmpl
config.status: creating pkgscripts/uninstall.tmpl
config.status: creating tjbenchtest
config.status: creating libjpeg.map
config.status: creating Makefile
config.status: creating simd/Makefile
config.status: creating java/Makefile
config.status: creating md5/Makefile
config.status: creating config.h
config.status: creating jconfig.h
config.status: creating jconfigint.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --disable-maintainer-mode
debian/rules override_dh_auto_build
make[1]: Entering directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1'
dh_auto_build -- V=1
make -j1 V=1
make[2]: Entering directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1'
make all-recursive
make[3]: Entering directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1'
Making all in java
make[4]: Entering directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1/java'
echo timestamp > classnoinst.stamp
make[4]: Leaving directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1/java'
Making all in simd
make[4]: Entering directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1/simd'
gcc -E -I.. -I../simd ./jsimdcfg.inc.h | /bin/grep -E "^[\;%]|^\ %" | sed
's%_cpp_protection_%%' | sed 's@% define@%define@g' > jsimdcfg.inc
make all-am
make[5]: Entering directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1/simd'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I..
-I.. -D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat
-Werror=format-security -Wall -pedantic -ffloat-store -c -o jsimd_mips.lo
jsimd_mips.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -D_FORTIFY_SOURCE=2 -g -O2
-fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic
-ffloat-store -c jsimd_mips.c -fPIC -DPIC -o .libs/jsimd_mips.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -D_FORTIFY_SOURCE=2 -g -O2
-fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic
-ffloat-store -c jsimd_mips.c -fPIE -o jsimd_mips.o >/dev/null 2>&1
/bin/bash ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I..
-D_FORTIFY_SOURCE=2 -g -O2 -fPIE -fstack-protector-strong -Wformat
-Werror=format-security -Wall -pedantic -ffloat-store -c -o jsimd_mips_dspr2.lo
jsimd_mips_dspr2.S
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -D_FORTIFY_SOURCE=2 -g -O2
-fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic
-ffloat-store -c jsimd_mips_dspr2.S -fPIC -DPIC -o .libs/jsimd_mips_dspr2.o
jsimd_mips_dspr2.S: Assembler messages:
jsimd_mips_dspr2.S:2845: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2846: Error: float register should be even, was 5
jsimd_mips_dspr2.S:2849: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2850: Error: float register should be even, was 7
jsimd_mips_dspr2.S:2853: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2853: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2853: Error: float register should be even, was 5
jsimd_mips_dspr2.S:2855: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2855: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2855: Error: float register should be even, was 7
jsimd_mips_dspr2.S:2857: Error: float register should be even, was 5
jsimd_mips_dspr2.S:2859: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2859: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2861: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2861: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2863: Error: float register should be even, was 7
jsimd_mips_dspr2.S:2865: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2867: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2869: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2871: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2873: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2873: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2873: Error: float register should be even, was 5
jsimd_mips_dspr2.S:2875: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2875: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2875: Error: float register should be even, was 7
jsimd_mips_dspr2.S:2881: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2881: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2883: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2883: Error: float register should be even, was 3
jsimd_mips_dspr2.S:2889: Error: float register should be even, was 1
jsimd_mips_dspr2.S:2891: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4155: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4157: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4159: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4161: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4163: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4163: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4165: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4165: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4167: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4167: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4169: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4169: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4172: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4174: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4177: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4179: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4198: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4200: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4202: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4204: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4206: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4206: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4208: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4208: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4210: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4210: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4212: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4212: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4215: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4217: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4220: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4222: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4241: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4243: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4245: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4247: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4249: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4249: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4251: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4251: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4253: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4253: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4255: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4255: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4258: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4260: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4263: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4265: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4284: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4286: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4288: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4290: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4292: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4292: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4294: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4294: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4296: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4296: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4298: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4298: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4301: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4303: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4306: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4308: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4327: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4329: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4331: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4333: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4335: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4335: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4337: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4337: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4339: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4339: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4341: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4341: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4344: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4346: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4349: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4351: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4370: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4372: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4374: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4376: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4378: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4378: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4380: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4380: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4382: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4382: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4384: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4384: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4387: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4389: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4392: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4394: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4413: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4415: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4417: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4419: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4421: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4421: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4423: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4423: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4425: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4425: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4427: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4427: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4430: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4432: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4435: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4437: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4456: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4458: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4460: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4462: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4464: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4464: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4466: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4466: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4468: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4468: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4470: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4470: Error: float register should be even, was 7
jsimd_mips_dspr2.S:4472: Error: float register should be even, was 1
jsimd_mips_dspr2.S:4474: Error: float register should be even, was 3
jsimd_mips_dspr2.S:4476: Error: float register should be even, was 5
jsimd_mips_dspr2.S:4478: Error: float register should be even, was 7
Makefile:516: recipe for target 'jsimd_mips_dspr2.lo' failed
make[5]: *** [jsimd_mips_dspr2.lo] Error 1
make[5]: Leaving directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1/simd'
Makefile:434: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1/simd'
Makefile:1986: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1'
Makefile:770: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1'
dh_auto_build: make -j1 V=1 returned exit code 2
debian/rules:46: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory
'/media/sdcard/james/libjpeg-turbo-debian/libjpeg-turbo-1.4.1'
debian/rules:38: recipe for target 'build-arch' failed
make: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2
From a07bbf783b18bb76f0790239f899a0fe8aaab966 Mon Sep 17 00:00:00 2001
From: James Cowgill <james...@cowgill.org.uk>
Date: Sat, 15 Aug 2015 13:30:14 +0100
Subject: [PATCH] Fix build error in MIPS SIMD when compiling with -mfpxx
When compiled with -mfpxx (which is now the default on Debian), there are
some restrictions on the use of odd-numbered FP registers. More details
about FPXX can be found here:
https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
This commit simply changes all uses of FP registers to an even-numbered
equivalent like this:
f0 -> f0
f1 -> f2
f2 -> f4
...
f8 -> f16
This commit should have no observable effect except that the MIPS assembly
will now compile with -mfpxx.
---
simd/jsimd_mips_dspr2.S | 392 ++++++++++++++++++++++++------------------------
1 file changed, 196 insertions(+), 196 deletions(-)
diff --git a/simd/jsimd_mips_dspr2.S b/simd/jsimd_mips_dspr2.S
index c599096..78625bd 100644
--- a/simd/jsimd_mips_dspr2.S
+++ b/simd/jsimd_mips_dspr2.S
@@ -2842,54 +2842,54 @@ LEAF_MIPS_DSPR2(jsimd_quantize_float_mips_dspr2)
mtc1 t1, f0
li t0, 63
0:
- lwc1 f1, 0(a2)
- lwc1 f5, 0(a1)
- lwc1 f2, 4(a2)
- lwc1 f6, 4(a1)
- lwc1 f3, 8(a2)
- lwc1 f7, 8(a1)
- lwc1 f4, 12(a2)
- lwc1 f8, 12(a1)
- madd.s f1, f0, f1, f5
- madd.s f2, f0, f2, f6
- madd.s f3, f0, f3, f7
- madd.s f4, f0, f4, f8
- lwc1 f5, 16(a1)
- lwc1 f6, 20(a1)
- trunc.w.s f1, f1
+ lwc1 f2, 0(a2)
+ lwc1 f10, 0(a1)
+ lwc1 f4, 4(a2)
+ lwc1 f12, 4(a1)
+ lwc1 f6, 8(a2)
+ lwc1 f14, 8(a1)
+ lwc1 f8, 12(a2)
+ lwc1 f16, 12(a1)
+ madd.s f2, f0, f2, f10
+ madd.s f4, f0, f4, f12
+ madd.s f6, f0, f6, f14
+ madd.s f8, f0, f8, f16
+ lwc1 f10, 16(a1)
+ lwc1 f12, 20(a1)
trunc.w.s f2, f2
- trunc.w.s f3, f3
trunc.w.s f4, f4
- lwc1 f7, 24(a1)
- lwc1 f8, 28(a1)
- mfc1 t1, f1
- mfc1 t2, f2
- mfc1 t3, f3
- mfc1 t4, f4
- lwc1 f1, 16(a2)
- lwc1 f2, 20(a2)
- lwc1 f3, 24(a2)
- lwc1 f4, 28(a2)
- madd.s f1, f0, f1, f5
- madd.s f2, f0, f2, f6
- madd.s f3, f0, f3, f7
- madd.s f4, f0, f4, f8
+ trunc.w.s f6, f6
+ trunc.w.s f8, f8
+ lwc1 f14, 24(a1)
+ lwc1 f16, 28(a1)
+ mfc1 t1, f2
+ mfc1 t2, f4
+ mfc1 t3, f6
+ mfc1 t4, f8
+ lwc1 f2, 16(a2)
+ lwc1 f4, 20(a2)
+ lwc1 f6, 24(a2)
+ lwc1 f8, 28(a2)
+ madd.s f2, f0, f2, f10
+ madd.s f4, f0, f4, f12
+ madd.s f6, f0, f6, f14
+ madd.s f8, f0, f8, f16
addiu t1, t1, -16384
addiu t2, t2, -16384
addiu t3, t3, -16384
addiu t4, t4, -16384
- trunc.w.s f1, f1
trunc.w.s f2, f2
- trunc.w.s f3, f3
trunc.w.s f4, f4
+ trunc.w.s f6, f6
+ trunc.w.s f8, f8
sh t1, 0(a0)
sh t2, 2(a0)
sh t3, 4(a0)
sh t4, 6(a0)
- mfc1 t1, f1
- mfc1 t2, f2
- mfc1 t3, f3
- mfc1 t4, f4
+ mfc1 t1, f2
+ mfc1 t2, f4
+ mfc1 t3, f6
+ mfc1 t4, f8
addiu t0, t0, -8
addiu a2, a2, 32
addiu a1, a1, 32
@@ -4152,32 +4152,32 @@ LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
addiu t6, t6, -128
addiu t7, t7, -128
addiu t8, t8, -128
- mtc1 t1, f1
- mtc1 t2, f2
- mtc1 t3, f3
- mtc1 t4, f4
- mtc1 t5, f5
- mtc1 t6, f6
- mtc1 t7, f7
- mtc1 t8, f8
- cvt.s.w f1, f1
+ mtc1 t1, f2
+ mtc1 t2, f4
+ mtc1 t3, f6
+ mtc1 t4, f8
+ mtc1 t5, f10
+ mtc1 t6, f12
+ mtc1 t7, f14
+ mtc1 t8, f16
cvt.s.w f2, f2
- cvt.s.w f3, f3
cvt.s.w f4, f4
- cvt.s.w f5, f5
cvt.s.w f6, f6
- cvt.s.w f7, f7
cvt.s.w f8, f8
+ cvt.s.w f10, f10
+ cvt.s.w f12, f12
+ cvt.s.w f14, f14
+ cvt.s.w f16, f16
lw t0, 4(a0)
- swc1 f1, 0(a2)
- swc1 f2, 4(a2)
- swc1 f3, 8(a2)
+ swc1 f2, 0(a2)
+ swc1 f4, 4(a2)
+ swc1 f6, 8(a2)
addu t0, t0, a1
- swc1 f4, 12(a2)
- swc1 f5, 16(a2)
- swc1 f6, 20(a2)
- swc1 f7, 24(a2)
- swc1 f8, 28(a2)
+ swc1 f8, 12(a2)
+ swc1 f10, 16(a2)
+ swc1 f12, 20(a2)
+ swc1 f14, 24(a2)
+ swc1 f16, 28(a2)
//elemr 1
lbu t1, 0(t0)
lbu t2, 1(t0)
@@ -4195,32 +4195,32 @@ LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
addiu t6, t6, -128
addiu t7, t7, -128
addiu t8, t8, -128
- mtc1 t1, f1
- mtc1 t2, f2
- mtc1 t3, f3
- mtc1 t4, f4
- mtc1 t5, f5
- mtc1 t6, f6
- mtc1 t7, f7
- mtc1 t8, f8
- cvt.s.w f1, f1
+ mtc1 t1, f2
+ mtc1 t2, f4
+ mtc1 t3, f6
+ mtc1 t4, f8
+ mtc1 t5, f10
+ mtc1 t6, f12
+ mtc1 t7, f14
+ mtc1 t8, f16
cvt.s.w f2, f2
- cvt.s.w f3, f3
cvt.s.w f4, f4
- cvt.s.w f5, f5
cvt.s.w f6, f6
- cvt.s.w f7, f7
cvt.s.w f8, f8
+ cvt.s.w f10, f10
+ cvt.s.w f12, f12
+ cvt.s.w f14, f14
+ cvt.s.w f16, f16
lw t0, 8(a0)
- swc1 f1, 32(a2)
- swc1 f2, 36(a2)
- swc1 f3, 40(a2)
+ swc1 f2, 32(a2)
+ swc1 f4, 36(a2)
+ swc1 f6, 40(a2)
addu t0, t0, a1
- swc1 f4, 44(a2)
- swc1 f5, 48(a2)
- swc1 f6, 52(a2)
- swc1 f7, 56(a2)
- swc1 f8, 60(a2)
+ swc1 f8, 44(a2)
+ swc1 f10, 48(a2)
+ swc1 f12, 52(a2)
+ swc1 f14, 56(a2)
+ swc1 f16, 60(a2)
//elemr 2
lbu t1, 0(t0)
lbu t2, 1(t0)
@@ -4238,32 +4238,32 @@ LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
addiu t6, t6, -128
addiu t7, t7, -128
addiu t8, t8, -128
- mtc1 t1, f1
- mtc1 t2, f2
- mtc1 t3, f3
- mtc1 t4, f4
- mtc1 t5, f5
- mtc1 t6, f6
- mtc1 t7, f7
- mtc1 t8, f8
- cvt.s.w f1, f1
+ mtc1 t1, f2
+ mtc1 t2, f4
+ mtc1 t3, f6
+ mtc1 t4, f8
+ mtc1 t5, f10
+ mtc1 t6, f12
+ mtc1 t7, f14
+ mtc1 t8, f16
cvt.s.w f2, f2
- cvt.s.w f3, f3
cvt.s.w f4, f4
- cvt.s.w f5, f5
cvt.s.w f6, f6
- cvt.s.w f7, f7
cvt.s.w f8, f8
+ cvt.s.w f10, f10
+ cvt.s.w f12, f12
+ cvt.s.w f14, f14
+ cvt.s.w f16, f16
lw t0, 12(a0)
- swc1 f1, 64(a2)
- swc1 f2, 68(a2)
- swc1 f3, 72(a2)
+ swc1 f2, 64(a2)
+ swc1 f4, 68(a2)
+ swc1 f6, 72(a2)
addu t0, t0, a1
- swc1 f4, 76(a2)
- swc1 f5, 80(a2)
- swc1 f6, 84(a2)
- swc1 f7, 88(a2)
- swc1 f8, 92(a2)
+ swc1 f8, 76(a2)
+ swc1 f10, 80(a2)
+ swc1 f12, 84(a2)
+ swc1 f14, 88(a2)
+ swc1 f16, 92(a2)
//elemr 3
lbu t1, 0(t0)
lbu t2, 1(t0)
@@ -4281,32 +4281,32 @@ LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
addiu t6, t6, -128
addiu t7, t7, -128
addiu t8, t8, -128
- mtc1 t1, f1
- mtc1 t2, f2
- mtc1 t3, f3
- mtc1 t4, f4
- mtc1 t5, f5
- mtc1 t6, f6
- mtc1 t7, f7
- mtc1 t8, f8
- cvt.s.w f1, f1
+ mtc1 t1, f2
+ mtc1 t2, f4
+ mtc1 t3, f6
+ mtc1 t4, f8
+ mtc1 t5, f10
+ mtc1 t6, f12
+ mtc1 t7, f14
+ mtc1 t8, f16
cvt.s.w f2, f2
- cvt.s.w f3, f3
cvt.s.w f4, f4
- cvt.s.w f5, f5
cvt.s.w f6, f6
- cvt.s.w f7, f7
cvt.s.w f8, f8
+ cvt.s.w f10, f10
+ cvt.s.w f12, f12
+ cvt.s.w f14, f14
+ cvt.s.w f16, f16
lw t0, 16(a0)
- swc1 f1, 96(a2)
- swc1 f2, 100(a2)
- swc1 f3, 104(a2)
+ swc1 f2, 96(a2)
+ swc1 f4, 100(a2)
+ swc1 f6, 104(a2)
addu t0, t0, a1
- swc1 f4, 108(a2)
- swc1 f5, 112(a2)
- swc1 f6, 116(a2)
- swc1 f7, 120(a2)
- swc1 f8, 124(a2)
+ swc1 f8, 108(a2)
+ swc1 f10, 112(a2)
+ swc1 f12, 116(a2)
+ swc1 f14, 120(a2)
+ swc1 f16, 124(a2)
//elemr 4
lbu t1, 0(t0)
lbu t2, 1(t0)
@@ -4324,32 +4324,32 @@ LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
addiu t6, t6, -128
addiu t7, t7, -128
addiu t8, t8, -128
- mtc1 t1, f1
- mtc1 t2, f2
- mtc1 t3, f3
- mtc1 t4, f4
- mtc1 t5, f5
- mtc1 t6, f6
- mtc1 t7, f7
- mtc1 t8, f8
- cvt.s.w f1, f1
+ mtc1 t1, f2
+ mtc1 t2, f4
+ mtc1 t3, f6
+ mtc1 t4, f8
+ mtc1 t5, f10
+ mtc1 t6, f12
+ mtc1 t7, f14
+ mtc1 t8, f16
cvt.s.w f2, f2
- cvt.s.w f3, f3
cvt.s.w f4, f4
- cvt.s.w f5, f5
cvt.s.w f6, f6
- cvt.s.w f7, f7
cvt.s.w f8, f8
+ cvt.s.w f10, f10
+ cvt.s.w f12, f12
+ cvt.s.w f14, f14
+ cvt.s.w f16, f16
lw t0, 20(a0)
- swc1 f1, 128(a2)
- swc1 f2, 132(a2)
- swc1 f3, 136(a2)
+ swc1 f2, 128(a2)
+ swc1 f4, 132(a2)
+ swc1 f6, 136(a2)
addu t0, t0, a1
- swc1 f4, 140(a2)
- swc1 f5, 144(a2)
- swc1 f6, 148(a2)
- swc1 f7, 152(a2)
- swc1 f8, 156(a2)
+ swc1 f8, 140(a2)
+ swc1 f10, 144(a2)
+ swc1 f12, 148(a2)
+ swc1 f14, 152(a2)
+ swc1 f16, 156(a2)
//elemr 5
lbu t1, 0(t0)
lbu t2, 1(t0)
@@ -4367,32 +4367,32 @@ LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
addiu t6, t6, -128
addiu t7, t7, -128
addiu t8, t8, -128
- mtc1 t1, f1
- mtc1 t2, f2
- mtc1 t3, f3
- mtc1 t4, f4
- mtc1 t5, f5
- mtc1 t6, f6
- mtc1 t7, f7
- mtc1 t8, f8
- cvt.s.w f1, f1
+ mtc1 t1, f2
+ mtc1 t2, f4
+ mtc1 t3, f6
+ mtc1 t4, f8
+ mtc1 t5, f10
+ mtc1 t6, f12
+ mtc1 t7, f14
+ mtc1 t8, f16
cvt.s.w f2, f2
- cvt.s.w f3, f3
cvt.s.w f4, f4
- cvt.s.w f5, f5
cvt.s.w f6, f6
- cvt.s.w f7, f7
cvt.s.w f8, f8
+ cvt.s.w f10, f10
+ cvt.s.w f12, f12
+ cvt.s.w f14, f14
+ cvt.s.w f16, f16
lw t0, 24(a0)
- swc1 f1, 160(a2)
- swc1 f2, 164(a2)
- swc1 f3, 168(a2)
+ swc1 f2, 160(a2)
+ swc1 f4, 164(a2)
+ swc1 f6, 168(a2)
addu t0, t0, a1
- swc1 f4, 172(a2)
- swc1 f5, 176(a2)
- swc1 f6, 180(a2)
- swc1 f7, 184(a2)
- swc1 f8, 188(a2)
+ swc1 f8, 172(a2)
+ swc1 f10, 176(a2)
+ swc1 f12, 180(a2)
+ swc1 f14, 184(a2)
+ swc1 f16, 188(a2)
//elemr 6
lbu t1, 0(t0)
lbu t2, 1(t0)
@@ -4410,32 +4410,32 @@ LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
addiu t6, t6, -128
addiu t7, t7, -128
addiu t8, t8, -128
- mtc1 t1, f1
- mtc1 t2, f2
- mtc1 t3, f3
- mtc1 t4, f4
- mtc1 t5, f5
- mtc1 t6, f6
- mtc1 t7, f7
- mtc1 t8, f8
- cvt.s.w f1, f1
+ mtc1 t1, f2
+ mtc1 t2, f4
+ mtc1 t3, f6
+ mtc1 t4, f8
+ mtc1 t5, f10
+ mtc1 t6, f12
+ mtc1 t7, f14
+ mtc1 t8, f16
cvt.s.w f2, f2
- cvt.s.w f3, f3
cvt.s.w f4, f4
- cvt.s.w f5, f5
cvt.s.w f6, f6
- cvt.s.w f7, f7
cvt.s.w f8, f8
+ cvt.s.w f10, f10
+ cvt.s.w f12, f12
+ cvt.s.w f14, f14
+ cvt.s.w f16, f16
lw t0, 28(a0)
- swc1 f1, 192(a2)
- swc1 f2, 196(a2)
- swc1 f3, 200(a2)
+ swc1 f2, 192(a2)
+ swc1 f4, 196(a2)
+ swc1 f6, 200(a2)
addu t0, t0, a1
- swc1 f4, 204(a2)
- swc1 f5, 208(a2)
- swc1 f6, 212(a2)
- swc1 f7, 216(a2)
- swc1 f8, 220(a2)
+ swc1 f8, 204(a2)
+ swc1 f10, 208(a2)
+ swc1 f12, 212(a2)
+ swc1 f14, 216(a2)
+ swc1 f16, 220(a2)
//elemr 7
lbu t1, 0(t0)
lbu t2, 1(t0)
@@ -4453,30 +4453,30 @@ LEAF_MIPS_DSPR2(jsimd_convsamp_float_mips_dspr2)
addiu t6, t6, -128
addiu t7, t7, -128
addiu t8, t8, -128
- mtc1 t1, f1
- mtc1 t2, f2
- mtc1 t3, f3
- mtc1 t4, f4
- mtc1 t5, f5
- mtc1 t6, f6
- mtc1 t7, f7
- mtc1 t8, f8
- cvt.s.w f1, f1
+ mtc1 t1, f2
+ mtc1 t2, f4
+ mtc1 t3, f6
+ mtc1 t4, f8
+ mtc1 t5, f10
+ mtc1 t6, f12
+ mtc1 t7, f14
+ mtc1 t8, f16
cvt.s.w f2, f2
- cvt.s.w f3, f3
cvt.s.w f4, f4
- cvt.s.w f5, f5
cvt.s.w f6, f6
- cvt.s.w f7, f7
cvt.s.w f8, f8
- swc1 f1, 224(a2)
- swc1 f2, 228(a2)
- swc1 f3, 232(a2)
- swc1 f4, 236(a2)
- swc1 f5, 240(a2)
- swc1 f6, 244(a2)
- swc1 f7, 248(a2)
- swc1 f8, 252(a2)
+ cvt.s.w f10, f10
+ cvt.s.w f12, f12
+ cvt.s.w f14, f14
+ cvt.s.w f16, f16
+ swc1 f2, 224(a2)
+ swc1 f4, 228(a2)
+ swc1 f6, 232(a2)
+ swc1 f8, 236(a2)
+ swc1 f10, 240(a2)
+ swc1 f12, 244(a2)
+ swc1 f14, 248(a2)
+ swc1 f16, 252(a2)
j ra
nop
signature.asc
Description: This is a digitally signed message part
--- End Message ---