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

Kito Cheng kito.cheng@gmail.com
Tue Aug 21 15:54:00 GMT 2018
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.



More information about the Binutils mailing list