From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 86F80385E442; Tue, 1 Feb 2022 13:56:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86F80385E442 From: "gcc-v850-bugs at engineer dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104324] New: v850-elf-as regression: displacement is too large Date: Tue, 01 Feb 2022 13:56:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 10.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc-v850-bugs at engineer dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Feb 2022 13:56:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104324 Bug ID: 104324 Summary: v850-elf-as regression: displacement is too large Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gcc-v850-bugs at engineer dot com Target Milestone: --- The following minimum example fails to assemble in "newer" gcc versions. In 4.9.2 (prebuilt and retrieved from here https://llvm-gcc-renesas.com/v850/v850-download-toolchains/) all targets li= sted below works, but in 10.3 and 11.2 only later targets works, see below. The = 10.3 and 11.2 are built from source from a Dockerfile as listed later on. I fail= to build older versions of gcc myself due to various compilation issues, didn't investigate those further. Would love to git bisect this issue, but can't s= ince I fail to build old enough gcc's. file.S: _RESET: mov 0x37, r15 st.b r15, 0xfffff06e[zero] -- Works in 4.9.2, fails in (at least) 10.3 and 11.2: -- $ v850-elf-as -mv850 -c file.S -- $ v850-elf-as -mv850e -c file.S -- $ v850-elf-as -mv850e1 -c file.S -- $ v850-elf-as -mv850es -c file.S -- Works in 4.9.2, 10.3, 11.2: -- $ v850-elf-as -mv850e2 -c file.S -- $ v850-elf-as -mv850e2v3 -c file.S -- $ v850-elf-as -mv850e2v4 -c file.S -- $ v850-elf-as -mv850e3v5 -c file.S Dockerfile: ARG TARGET_ARCH=3D"v850-elf" ARG TOOLCHAIN_VERSION=3D"master" ARG TOOLCHAIN_NAME=3D"gcc-${TARGET_ARCH}-${TOOLCHAIN_VERSION}" ARG TOOLCHAIN_PATH=3D"/opt/${TOOLCHAIN_NAME}" FROM debian:10 as build ARG DEBIAN_FRONTEND=3Dnoninteractive ARG TARGET_ARCH ARG TOOLCHAIN_VERSION ARG TOOLCHAIN_NAME ARG TOOLCHAIN_PATH ENV PATH=3D"${TOOLCHAIN_PATH}/bin:${PATH}" ENV DEBIAN_FRONTEND=3Dnoninteractive RUN apt-get -y update && \ apt-get -y install --no-install-recommends \ build-essential \ texinfo \ wget \ && rm -rf /var/lib/apt/lists/* ENV DOWNLOAD_PATH=3D"/tmp/${TOOLCHAIN_NAME}/download" \ SOURCES_PATH=3D"/tmp/${TOOLCHAIN_NAME}/sources" \ BUILD_PATH=3D"/tmp/${TOOLCHAIN_NAME}/build" ENV BINUTILS_VERSION=3D"2.36.1" \ GCC_VERSION=3D"11.2.0" \ GMP_VERSION=3D"6.2.1" \ MPC_VERSION=3D"1.2.1" \ MPFR_VERSION=3D"4.1.0" \ GDB_VERSION=3D"10.2" \ NEWLIB_VERSION=3D"4.1.0" RUN wget --tries=3D10 --continue --no-check-certificate --no-verbose \ https://ftp.gnu.org/gnu/binutils/binutils-${BINUTILS_VERSION}.tar.g= z \ =20=20=20=20=20=20=20 https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.gz \ https://ftp.gnu.org/gnu/gmp/gmp-${GMP_VERSION}.tar.bz2 \ https://ftp.gnu.org/gnu/mpc/mpc-${MPC_VERSION}.tar.gz \ https://ftp.gnu.org/gnu/mpfr/mpfr-${MPFR_VERSION}.tar.gz \ https://ftp.gnu.org/gnu/gdb/gdb-${GDB_VERSION}.tar.gz \ ftp://sourceware.org/pub/newlib/newlib-${NEWLIB_VERSION}.tar.gz \ -P ${DOWNLOAD_PATH} RUN mkdir -p ${SOURCES_PATH} && \ for f in ${DOWNLOAD_PATH}/*.tar.gz; \ do \ tar xf "$f" -C ${SOURCES_PATH}; \ done; \ for f in ${DOWNLOAD_PATH}/*.tar.bz2; \ do \ tar xjf "$f" -C ${SOURCES_PATH}; \ done RUN cd ${SOURCES_PATH}/gcc-${GCC_VERSION} && \ ln -s ../gmp-${GMP_VERSION} gmp && \ ln -s ../mpc-${MPC_VERSION} mpc && \ ln -s ../mpfr-${MPFR_VERSION} mpfr # build binutils RUN mkdir -p ${BUILD_PATH}/binutils && \ cd ${BUILD_PATH}/binutils && \ ${SOURCES_PATH}/binutils-${BINUTILS_VERSION}/configure \ --target=3D${TARGET_ARCH} \ --prefix=3D${TOOLCHAIN_PATH} \ --disable-nls \ && \ make -j$(nproc) all && \ make install ENV GCC_OPTS=3D" \ --with-gnu-as \ --with-gnu-ld \ --disable-shared \ --disable-libssp \ --disable-threads \ --disable-nls \ --with-newlib \ " # build gcc - 1st pass RUN mkdir -p ${BUILD_PATH}/gcc && \ cd ${BUILD_PATH}/gcc && \ ${SOURCES_PATH}/gcc-${GCC_VERSION}/configure \ --target=3D${TARGET_ARCH} \ --prefix=3D${TOOLCHAIN_PATH} \ --enable-languages=3Dc \ --without-headers \ ${GCC_OPTS} \ && \ make -j$(nproc) all-gcc && \ make install-gcc # build newlib RUN mkdir -p ${BUILD_PATH}/newlib && \ cd ${BUILD_PATH}/newlib && \ export CFLAGS_FOR_TARGET=3D"-Os -fcommon" && \ ${SOURCES_PATH}/newlib-${NEWLIB_VERSION}/configure \ --target=3D${TARGET_ARCH} \ --prefix=3D${TOOLCHAIN_PATH} \ --enable-newlib-nano-formatted-io \ --disable-nls \ && \ make -j$(nproc) all && \ make install # build gcc - 2nd pass RUN cd ${BUILD_PATH}/gcc && \ ${SOURCES_PATH}/gcc-${GCC_VERSION}/configure \ --target=3D${TARGET_ARCH} \ --prefix=3D${TOOLCHAIN_PATH} \ --enable-languages=3Dc,c++ \ ${GCC_OPTS} \ && \ make -j$(nproc) all && \ make install-strip # build gdb RUN mkdir -p ${BUILD_PATH}/gdb && \ cd ${BUILD_PATH}/gdb &&\ ${SOURCES_PATH}/gdb-${GDB_VERSION}/configure \ --target=3D${TARGET_ARCH} \ --prefix=3D${TOOLCHAIN_PATH} \ --disable-nls \ && \ make -j$(nproc) all && \ make install=