-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RISC-V][LoongArch64] JIT: pass structs according to floating-point calling convention properly #104237
Open
tomeksowi
wants to merge
57
commits into
dotnet:main
Choose a base branch
from
tomeksowi:jit-empty-struct-passing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,468
−154
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…carries also exact field sizes and offsets
… FpStruct info calculation
…omputeReturnFlags() This fixes JIT/HardwareIntrinsics/General/Vector* tests.
Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>
Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>
Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>
Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>
…they were write-only. Replace with offset from new ABI info
…tack slot over-allocation
RISC-V qemu-prio1-checked: 9341 / 9345 (99.96%)
Failed
Killed
Skipped
|
This was referenced Jul 9, 2024
RISC-V starfive-prio1-checked: 9326 / 9345 (99.80%)
Failed
Killed
Skipped
|
RISC-V qemu-prio1-checked: 9341 / 9345 (99.96%)
Failed
Killed
Skipped
|
RISC-V starfive-prio1-checked: 9326 / 9345 (99.80%)
Failed
Killed
Skipped
|
… because they were identical. Move it to Common\Internal/Runtime because it's no longer exposed in JIT interface.
RISC-V starfive-prio1-checked: 9326 / 9345 (99.80%)
Failed
Killed
Skipped
|
tomeksowi
commented
Jul 26, 2024
RISC-V qemu-prio1-checked: 9352 / 9353 (99.99%)
Failed
Killed
Skipped
|
PR ready for review |
5 tasks
RISC-V starfive-prio1-checked: 9353 / 9353 (100.00%)
Failed
Killed
Skipped
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
arch-riscv
Related to the RISC-V architecture
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
community-contribution
Indicates that the PR has been added by a community member
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Small structs containing one or two fields, at least one of them floating-point, can be passed (or returned) according to hardware floating-point calling convention: each field occupying one register. The existing implementation worked only for the narrow case when the fields were naturally placed. However, the ABIs on both platforms when enregistering fields disregard placement hints such as manual alignment, packing attributes, or padding with empty structs (when they are sized 1 byte like in C++ or .NET). This means additional information such as field offsets and sizes needs to be passed wherever registers<->memory copying of such structs happens.
This change uses the new passing information information introduced in #103945 to implement passing such structs in JIT properly.
Stems from #101796, part of #84834, cc @dotnet/samsung