[PATCH] D102839: [RISCV][Clang] Add -mno-div option to disable hardware int division

Luís Marques via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 27 03:00:51 PDT 2021


luismarques added a comment.

In D102839#2783636 <https://reviews.llvm.org/D102839#2783636>, @ksyx wrote:

> So it seems the better way to do this would definitely by adding a subextension as the spec had changed. But I'd like  also to ask how will GCC deal with this option, and should we make this option an alias to turn off M extension and turn on ZMMul extension?

Regarding "turn off M extension", see Krste's comment in the PR:

> I think -mno-div is OK as a compiler option, but it's meaning is for the compiler not to generate divide instructions, not to indicate what the ISA is. So for example, -mno-div should not set ELF flags in binary to indicate ISA doesn't have divide - it should simply not generate divide instructions.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102839/new/

https://reviews.llvm.org/D102839



More information about the cfe-commits mailing list