This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] RISC-V: Reject empty rouding mode and fence operand.


Hi Jim:

Current assembler will accept empty operand for fence and rounding
mode, such as "fence ," or "fadd.s fa1,fa1,fa1,", it cause by strncmp
with zero length in arg_lookup function.

This patch including the fix and add 2 test cases for that, those case
was explored by LLVM's MC fuzzer testing tool developed by Ana's team
(Codeaurora) :)


gas/ChangeLog

2018-08-21  Kito Cheng  <kito@andestech.com>

        * config/tc-riscv.c (arg_lookup): Checking
        lenght before look up.
        * testsuite/gas/riscv/fence-fail.d: New file.
        * testsuite/gas/riscv/fence-fail.l: Likewise.
        * testsuite/gas/riscv/fence-fail.s: Likewise.
        * testsuite/gas/riscv/rouding-fail.d: Likewise.
        * testsuite/gas/riscv/rouding-fail.l: Likewise.
        * testsuite/gas/riscv/rouding-fail.s: Likewise.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]