This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit 4be9be9
[RyuJIT/ARM32] Implement for GT_STORE_OBJ (#10721)
* Implement lowering for GT_STORE_OBJ
In #10657, I commented that the messages for NYI were printed about GT_STORE_OBJ on running the CodeGenBringUpTests.
'Lowering::LowerBlockStore(GenTreeBlk* blkNode)' method implementation is just copied.
but after lowering phase, in code generation, codegenarm.cpp, below would be used.
```cpp
blkNode->gtBlkOpKind = GenTreeBlk::BlkOpKindUnroll;
```
```cpp
blkNode->gtBlkOpKind = GenTreeBlk::BlkOpKindHelper;
```
```cpp
void CodeGen::genCodeForStoreBlk(GenTreeBlk* blkOp)
{
if (blkOp->gtBlkOpGcUnsafe)
{
getEmitter()->emitDisableGC();
}
bool isCopyBlk = blkOp->OperIsCopyBlkOp();
switch (blkOp->gtBlkOpKind)
{
case GenTreeBlk::BlkOpKindHelper:
if (isCopyBlk)
{
genCodeForCpBlk(blkOp);
}
else
{
genCodeForInitBlk(blkOp);
}
break;
case GenTreeBlk::BlkOpKindUnroll:
if (isCopyBlk)
{
genCodeForCpBlkUnroll(blkOp);
}
else
{
genCodeForInitBlkUnroll(blkOp);
}
break;
default:
unreached();
}
if (blkOp->gtBlkOpGcUnsafe)
{
getEmitter()->emitEnableGC();
}
}
```
'genCodeForCpBlk' and 'genCodeForInitBlk' are implemented in ARM/ARM64 by MEMCPY/MEMSET
but 'genCodeForCpBlkUnroll' and 'genCodeForInitBlkUnroll' are not implemented both ARM and ARM64.
Therefore those need to implement.
* Implement NYI : GT_STORE_OBJ is needed of write barriers implementation
It was copied from ARM64 and removed codes related with gc write barrier which doesn't support on ARM.
* Implement CodeGen::genCodeForCpObj
* Refactor some codes
* Use INS_OPTS_LDST_POST_INC option for post-indexing
When structure is copied, the results of asm codes have been strange.
IN0013: 000048 ldr r3, [r1+4]
IN0014: 00004A str r3, [r0+4]
IN0015: 00004C ldr r3, [r1+4]
IN0016: 00004E str r3, [r0+4]
It needs that the index would increment or the post-indexing.
So I use INS_OPTS_LDST_POST_INC option for post-indexing when the instruction is emitted.
* Fix conflicts
* Fix conflicts and Apply #11219
I want to merge genCodeForCpObj to codegenarmarch.cpp but the function has modified in #11219.
So I decided to keep the code divided now.
In future, If modifying the function on ARM is also needed, it would be able to modify.
* Fix conflicts
* Remove NYI
* Fix genCountBits assertion1 parent 4a321d8 commit 4be9be9
File tree
5 files changed
+125
-19
lines changed- src/jit
5 files changed
+125
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
823 | 941 | | |
824 | 942 | | |
825 | 943 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2357 | 2357 | | |
2358 | 2358 | | |
2359 | 2359 | | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | 2360 | | |
2366 | 2361 | | |
2367 | 2362 | | |
2368 | 2363 | | |
2369 | 2364 | | |
2370 | 2365 | | |
2371 | | - | |
2372 | 2366 | | |
2373 | 2367 | | |
2374 | 2368 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | 178 | | |
184 | 179 | | |
185 | 180 | | |
| |||
205 | 200 | | |
206 | 201 | | |
207 | 202 | | |
208 | | - | |
209 | | - | |
210 | 203 | | |
211 | 204 | | |
212 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | 787 | | |
792 | 788 | | |
793 | 789 | | |
| |||
813 | 809 | | |
814 | 810 | | |
815 | 811 | | |
816 | | - | |
817 | | - | |
818 | 812 | | |
819 | 813 | | |
820 | 814 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1357 | 1357 | | |
1358 | 1358 | | |
1359 | 1359 | | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1360 | 1367 | | |
1361 | 1368 | | |
1362 | 1369 | | |
| |||
0 commit comments