[PATCH] D126451: [Clang][CSKY] Add support about CSKYABIInfo

Zixuan Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 26 19:19:42 PDT 2022


zixuan-wu added inline comments.


================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:11708
+  case llvm::Triple::csky: {
+    bool IsSoftFloat = !getTarget().hasFeature("hard-float-abi");
+    bool hasFP64 = getTarget().hasFeature("fpuv2_df") ||
----------------
DavidSpickett wrote:
> I see a "hard-float" and "hard-float-abi" in this change. Is it safe to check just for "hard-float-abi" here?
> 
> Just checking, I assume it's fine. You could have hardware with hard float but you want to compile for soft float abi. This allows that.
> You could have hardware with hard float but you want to compile for soft float abi. This allows that.

Yes. As you said.


================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:11710
+    bool hasFP64 = getTarget().hasFeature("fpuv2_df") ||
+                   getTarget().hasFeature("fpuv3_df");
+    return SetCGInfo(new CSKYTargetCodeGenInfo(Types, IsSoftFloat ? 0
----------------
DavidSpickett wrote:
> Silly question, was/is there an fpuv1 and was it 32 bit only? (I assume so)
I think fpuv1 is not supported anymore in llvm.


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

https://reviews.llvm.org/D126451



More information about the cfe-commits mailing list