[PATCH] D126451: [Clang][CSKY] Add support about CSKYABIInfo
David Spickett via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 26 05:41:30 PDT 2022
DavidSpickett added a comment.
Looks good to me. Can you just clarify how the tests are split? My guess is that one is stuff that doesn't vary with hard/soft float and the other is the bits that change when hardfloat is enabled. If so is it worth checking those situations with soft float too or have you already done that.
================
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") ||
----------------
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.
================
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
----------------
Silly question, was/is there an fpuv1 and was it 32 bit only? (I assume so)
================
Comment at: clang/test/CodeGen/CSKY/csky-abi.c:3
+// RUN: %clang_cc1 -no-opaque-pointers -triple csky -target-feature +fpuv2_df -target-feature +fpuv2_sf \
+// RUN: -target-feature +hard-float -target-feature +hard-float-abi -emit-llvm %s -o - | FileCheck %s
+
----------------
Is this file checking things that don't vary between hard float/not hard float? If so please add a comment that states that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126451/new/
https://reviews.llvm.org/D126451
More information about the cfe-commits
mailing list