On Wed, Nov 18, 2020 at 5:29 AM Jim Wilson <j...@sifive.com> wrote: > > On Thu, Nov 12, 2020 at 11:28 PM Kito Cheng <kito.ch...@sifive.com> wrote: >> >> +#ifndef HAVE_AS_MARCH_ZIFENCE >> + /* Skip since older binutils don't recognize zifencei, >> + we mad a mistake that is binutils 2.35 support zicsr but not support >> + zifencei. */ >> + skip_zifencei = true; >> +#endif > > > I'd suggest something like "Skip since older binutils doesn't recognize > zifencei, we made a mistake in that binutils 2.35 supports zicsr but not > zifencei."
Thanks for suggestions :) >> >> diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h >> index 172c7ca7c98..9dec5415eab 100644 >> --- a/gcc/config/riscv/riscv.h >> +++ b/gcc/config/riscv/riscv.h >> @@ -70,13 +70,20 @@ extern const char *riscv_default_mtune (int argc, const >> char **argv); >> #define TARGET_64BIT (__riscv_xlen == 64) >> #endif /* IN_LIBGCC2 */ >> >> +#ifdef HAVE_AS_MISA_SPEC >> +#define ASM_MISA_SPEC "" >> +#else >> +#define ASM_MISA_SPEC "%{misa-spec=*}" >> +#endif > > > This is backwards. We do want to pass -misa-spec to the assembler if it > supports it. Or maybe you meant ifndef? Oh, it should be ifndef here.