ksyx added a comment.

In D102839#2775732 <https://reviews.llvm.org/D102839#2775732>, @craig.topper 
wrote:

> Isn't the gcc name for this -mno-div? Should we be consistent?

I am not sure whether using `-mno-div` might bring in some confusion since from 
the name `no-div` itself it expresses a sense of excluding all hardware 
division instructions, both float ones and integral ones, from my personal 
understanding. However, as in the documentation 
<https://gcc.gnu.org/onlinedocs/gcc/RISC-V-Options.html>, it only affects the 
integral ones and float one was controlled by another. Thus for the clearance I 
used this naming.

I have not much understanding about what compatibility with GCC we need to 
achieve but I am okay with both kinds of naming and changing this is totally ok 
if required.



================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:154
+  if (DisableHardwareIntDiv) {
+    Builder.defineMacro("__riscv_no_idiv");
   }
----------------
craig.topper wrote:
> Does gcc also have this define? Why do we need this in addition to not 
> defining __riscv_div. 
Ok. I will remove it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102839

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to