https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77757

            Bug ID: 77757
           Summary: mips16: generated assembly has loads too far away
           Product: gcc
           Version: 6.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ggo at andred dot net
  Target Milestone: ---

Created attachment 39697
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39697&action=edit
pre-processed output

The attached doesn't compile on mips16:

mipsel-poky-linux-musl-gcc -mel -mabi=32 -msoft-float -march=mips32r2 -mips16
-minterlink-compressed -mtune=24kec -mdsp
--sysroot=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/tgm-r2 -Wall
-Os -g -feliminate-unused-debug-types -fstack-protector-strong
-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -c
./havegecollect.i  -fPIC -DPIC -o .libs/libhavege_la-havegecollect.o  -pipe -v
Using built-in specs.
COLLECT_GCC=mipsel-poky-linux-musl-gcc
Target: mipsel-poky-linux-musl
Configured with: ../../../../../../work-shared/gcc-6.2.0-r0/gcc-6.2.0/configure
--build=x86_64-linux --host=x86_64-linux --target=mipsel-poky-linux-musl
--prefix=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr
--exec_prefix=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr
--bindir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/bin/mipsel-poky-linux-musl
--sbindir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/bin/mipsel-poky-linux-musl
--libexecdir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/libexec/mipsel-poky-linux-musl
--datadir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/share
--sysconfdir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/etc
--sharedstatedir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/com
--localstatedir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/var
--libdir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/lib/mipsel-poky-linux-musl
--includedir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/include
--oldincludedir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/include
--infodir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/share/info
--mandir=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/share/man
--disable-silent-rules --disable-dependency-tracking
--with-libtool-sysroot=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux
--enable-clocale=generic --with-gnu-ld --enable-shared --enable-languages=c,c++
--enable-threads=posix --disable-multilib --enable-c99 --enable-long-long
--enable-symvers=gnu --enable-libstdcxx-pch
--program-prefix=mipsel-poky-linux-musl- --without-local-prefix --enable-lto
--enable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap
--with-system-zlib --with-linker-hash-style=sysv --enable-linker-build-id
--with-ppl=no --with-cloog=no --enable-checking=release
--enable-cheaders=c_global --without-isl
--with-gxx-include-dir=/not/exist/usr/include/c++/6.2.0
--with-sysroot=/not/exist
--with-build-sysroot=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/tgm-r2
--with-mips-plt --without-long-double-128 --enable-poison-system-directories
--with-mpfr=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr
--with-system-zlib --disable-static --disable-nls
Thread model: posix
gcc version 6.2.0 (GCC) 
COLLECT_GCC_OPTIONS='--sysroot=/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/tgm-r2'
'-mel' '-mabi=32' '-msoft-float' '-march=mips32r2' '-mips16'
'-minterlink-compressed' '-mtune=24kec' '-mdsp' '-Wall' '-Os' '-g'
'-feliminate-unused-debug-types' '-fstack-protector-strong' '-D'
'_FORTIFY_SOURCE=2' '-Wformat=1' '-Wformat-security' '-Werror=format-security'
'-c' '-fPIC' '-D' 'PIC' '-o' '.libs/libhavege_la-havegecollect.o' '-pipe' '-v'
'-mllsc'  '-mips32r2' '-EL'

/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/libexec/mipsel-poky-linux-musl/gcc/mipsel-poky-linux-musl/6.2.0/cc1
-fpreprocessed ./havegecollect.i -isysroot
/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/tgm-r2 -mel -quiet
-dumpbase havegecollect.i -mel -mabi=32 -msoft-float -march=mips32r2 -mips16
-minterlink-compressed -mtune=24kec -mdsp -mllsc -mips32r2 -auxbase-strip
.libs/libhavege_la-havegecollect.o -g -Os -Wall -Wformat=1 -Wformat-security
-Werror=format-security -version -feliminate-unused-debug-types
-fstack-protector-strong -fPIC -o - |

/scratch/yocto/build-tgm-r2-poky-fpp-tgm/tmp/sysroots/x86_64-linux/usr/libexec/mipsel-poky-linux-musl/gcc/mipsel-poky-linux-musl/6.2.0/as
-v -EL -mips32r2 -mips16 -mdsp -O2 -g -no-mdebug -mabi=32 -march=mips32r2
-mtune=24kec -msoft-float -KPIC -o .libs/libhavege_la-havegecollect.o
GNU assembler version 2.27.0 (mipsel-poky-linux-musl) using BFD version (GNU
Binutils) 2.27.0.20160806
GNU C11 (GCC) version 6.2.0 (mipsel-poky-linux-musl)
        compiled by GNU C version 6.2.0 20160914, GMP version 6.1.1, MPFR
version 3.1.4, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C11 (GCC) version 6.2.0 (mipsel-poky-linux-musl)
        compiled by GNU C version 6.2.0 20160914, GMP version 6.1.1, MPFR
version 3.1.4, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 7fe58876c8caf5daea9b770ae42cf9e4
{standard input}: Assembler messages:
{standard input}:41095: Error: operand value out of range for instruction
{standard input}:41142: Error: operand value out of range for instruction
{standard input}:41180: Error: operand value out of range for instruction
{standard input}:41218: Error: operand value out of range for instruction
{standard input}:41256: Error: operand value out of range for instruction
{standard input}:41294: Error: operand value out of range for instruction
{standard input}:41332: Error: operand value out of range for instruction
{standard input}:41370: Error: operand value out of range for instruction
{standard input}:41408: Error: operand value out of range for instruction
{standard input}:41446: Error: operand value out of range for instruction
{standard input}:41484: Error: operand value out of range for instruction
{standard input}:41522: Error: operand value out of range for instruction
{standard input}:41560: Error: operand value out of range for instruction
{standard input}:41598: Error: operand value out of range for instruction
{standard input}:41636: Error: operand value out of range for instruction
{standard input}:41674: Error: operand value out of range for instruction
{standard input}:41712: Error: operand value out of range for instruction
{standard input}:41750: Error: operand value out of range for instruction
{standard input}:41788: Error: operand value out of range for instruction


(Changing the optimisation level makes no difference)

Reply via email to