According to the CSKY ABIv2 document, construct the ABIInfo to handle argument passing and return of clang data type. It also includes how to emit and expand VAArg intrinsic.
Details
Diff Detail
Unit Tests
Event Timeline
Can you reupload with more context? See https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface
I doubt I'll be able to give any in depth review but if things look good generally I'm sure you'll find the issues through your own testing as time goes on.
This looks good to me, but wait to make sure others see it, too.
My reasons are: it is largely similar to RISCV implementation, it seems to follow what I expected of the ABI (which is similar to other targets) and has a large corpus of tests.
I can't comment on the specifics of the ABI implementation (I haven't read the ABI document *that* thoroughly), but as David said, issues will be picked up by tests until the target reaches maturity.
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.
clang/lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
11708 | 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. | |
11710 | Silly question, was/is there an fpuv1 and was it 32 bit only? (I assume so) | |
clang/test/CodeGen/CSKY/csky-abi.c | ||
3 | Is this file checking things that don't vary between hard float/not hard float? If so please add a comment that states that. |
I don't think it is largely similar to RISCV implementation except for the code structure and test reuse. And the test result is big different.
Sorry, that's what I meant. There are no new things added, except for the RISCV specific logic, which makes it very easy to review, so thanks! :D
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.