This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] RISC-V: Reject empty rouding mode and fence operand.
- From: Kito Cheng <kito dot cheng at gmail dot com>
- To: Jim Wilson <jimw at sifive dot com>, binutils at sourceware dot org, patches at groups dot riscv dot org
- Cc: Ana Pazos <apazos at codeaurora dot org>, Alex Bradbury <asb at lowrisc dot org>
- Date: Tue, 21 Aug 2018 23:53:50 +0800
- Subject: [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.