bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/25212] [RISCV] gas doesn't flag invalid march and mabi combinat


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gas/25212] [RISCV] gas doesn't flag invalid march and mabi combinations
Date: Mon, 24 May 2021 03:47:41 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=25212

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Nelson Chu <nelsonc1225@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5d0ed830d362fb8bb200a4f52bf973ba30920802

commit 5d0ed830d362fb8bb200a4f52bf973ba30920802
Author: Nelson Chu <nelson.chu@sifive.com>
Date:   Fri May 21 15:40:33 2021 +0800

    RISC-V: PR25212, Report errors for invalid march and mabi combinations.

    This patch clarify the following invalid combinations of march and mabi,
    * ilp32f/lp64f abi without f extension.
    * ilp32d/lp64d abi without d extension.
    * ilp32q/lp64q abi without q extension.
    * e extension with any abi except ilp32e

    GNU assembler reports errors when finding the above invalid combinations.
    But LLVM-MC reports warnings and ignores these invalid cases.  It help to
    set the correct ilp32/lp64/ilp32e abi according to rv32/rv64/rve.  This
    looks good and convenient, so perhaps we can do the same things.  However,
    if you don't set the mabi, GNU assembler also try to set the suitable
    ABI according to march/elf-attribute.  Compared to LLVM-MC, we will choose
    double/quad abi if d/f extension is set.

    gas/
        PR 25212
        * config/tc-riscv.c (riscv_set_abi_by_arch): If -mabi isn't set, we
        will choose ilp32e abi for rv32e.  Besides, report errors for the
        invalid march and mabi combinations.
        * testsuite/gas/riscv/mabi-attr-rv32e.s: New testcase.  Only accept
        ilp32e abi for rve extension.
        * testsuite/gas/riscv/mabi-fail-rv32e-lp64f.d: Likewise.
        * testsuite/gas/riscv/mabi-fail-rv32e-lp64f.l: Likewise.
        * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.d: Likewise.
        * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.l: Likewise.
        * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.q: Likewise.
        * testsuite/gas/riscv/mabi-fail-rv32e-lp64d.q: Likewise.
        Renamed all mabi testcases to their march-mabi settings.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]