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

ksyx via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 27 03:40:47 PDT 2021


ksyx added a comment.

In D102839#2784197 <https://reviews.llvm.org/D102839#2784197>, @luismarques wrote:

> 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.

Thanks for mentioning that! Now, I changed the effect of `no-div` option into choosing a proper extension and implemented the `Zmmul` subextension. Is this solution acceptable or are there anything need further changes?


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

https://reviews.llvm.org/D102839



More information about the cfe-commits mailing list