Skip to content

Commit

Permalink
[LoongArch64] enable the promote feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
shushanhf committed May 26, 2022
1 parent 9e9a3e9 commit c1052fd
Show file tree
Hide file tree
Showing 7 changed files with 414 additions and 236 deletions.
4 changes: 0 additions & 4 deletions src/coreclr/jit/codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -1393,10 +1393,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
void genMultiRegStoreToSIMDLocal(GenTreeLclVar* lclNode);
void genMultiRegStoreToLocal(GenTreeLclVar* lclNode);

#if defined(TARGET_LOONGARCH64)
void genMultiRegCallStoreToLocal(GenTree* treeNode);
#endif

// Codegen for multi-register struct returns.
bool isStructReturn(GenTree* treeNode);
#ifdef FEATURE_SIMD
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8251,6 +8251,10 @@ void CodeGen::genMultiRegStoreToLocal(GenTreeLclVar* lclNode)
}
else
{
#ifdef TARGET_LOONGARCH64
// should consider the pading field within a struct.
offset = (offset % genTypeSize(srcType)) ? AlignUp(offset, genTypeSize(srcType)) : offset;
#endif
// Several fields could be passed in one register, copy using the register type.
// It could rewrite memory outside of the fields but local on the stack are rounded to POINTER_SIZE so
// it is safe to store a long register into a byte field as it is known that we have enough padding after.
Expand Down
Loading

0 comments on commit c1052fd

Please sign in to comment.