Skip to content
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

[LoongArch64] A plan for amending the LoongArch64‘s port #69705

Closed
shushanhf opened this issue May 24, 2022 · 19 comments
Closed

[LoongArch64] A plan for amending the LoongArch64‘s port #69705

shushanhf opened this issue May 24, 2022 · 19 comments

Comments

@shushanhf
Copy link
Contributor

shushanhf commented May 24, 2022

Description

After the supporting for LoongArch64 finished by #59561 ,
there are still some TODOs for LA that should be implemented.

Here creating a new issue to track these.

(1) Fixing all the bugs anytime;
(2) Amend the LoongArch64's ABI;
(3) Enable the promote feature;
(4) Pushing the crossgen2 for LA;
(5) Supporting the SIMD/intrinsic for LA;
(6) ...

The CoreRoot for LoongArch64 will be updated here

Reproduction Steps

Testing all the test-cases of the runtime on LoongArch64's Linux.

Expected behavior

The test cases should pass.

Actual behavior

Failed.

Regression?

No response

Known Workarounds

Using the SDK6-LoongArch64 which published by Loongson based on the offical-SDK6.

Configuration

LoongArch64’s Linux

Other information

No response

@ghost ghost added the untriaged New issue has not been triaged by the area owner label May 24, 2022
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@shushanhf
Copy link
Contributor Author

@jkotas @BruceForstall

we will push some PRs to amend the LA's port after we had fixed some test cases on LA-linux.

@huoyaoyuan
Copy link
Member

huoyaoyuan commented May 24, 2022

Supporting the SIMD/intrinsic for LA

I've read the instruction spec for LA, and found some instructions interesting. As a brand new architecture, we may be concerned about exposing intrinsics in public API. However, we can implement an internal intrinsic class first and use in BitOperations etc.

@shushanhf
Copy link
Contributor Author

Supporting the SIMD/intrinsic for LA

I've read the instruction spec for LA, and found some instructions interesting. As a bread new architecture, we may be concerned about exposing intrinsics in public API. However, we can implement an internal intrinsic class first and use in BitOperations etc.

Thanks.

@jeffschwMSFT jeffschwMSFT added area-VM-coreclr and removed untriaged New issue has not been triaged by the area owner labels May 24, 2022
@jeffschwMSFT jeffschwMSFT added this to the Future milestone May 24, 2022
@am11
Copy link
Member

am11 commented Aug 28, 2022

@shushanhf, should we have native->uc_mcontext.__fcsr = lpContext->Fcsr; before this line:

for (int i = 0; i < 32; i++)
as we do the opposite here:
lpContext->Fcsr = native->uc_mcontext.__fcsr;

@shushanhf
Copy link
Contributor Author

@shushanhf, should we have native->uc_mcontext.__fcsr = lpContext->Fcsr; before this line:

for (int i = 0; i < 32; i++)

as we do the opposite here:

lpContext->Fcsr = native->uc_mcontext.__fcsr;

Thanks, you are right.
And maybe I have to sync these to the upstream because the last merged by the kernel and glibc might be different with these.
As the reviewing of some projects liking the kernel and glibc was too slow.
I will update these later.

@shushanhf
Copy link
Contributor Author

shushanhf commented May 16, 2023

The OSR for LA64 is just for optimization and we will do it later. #86022

After today's PRs #86289 #86290 #86294 , all tests passed on LA64 except the crossgen2 not tested.

@shushanhf
Copy link
Contributor Author

shushanhf commented May 18, 2023

The OSR for LA64 is just for optimization and we will do it later. #86022

After today's PRs #86289 #86290 #86294 , all tests passed on LA64 except the crossgen2 not tested.

qiao@Lap5K2:~/tests$ ./dotnet-sdk-8.0.100-preview.4.23260.1-linux-loongarch64/dotnet --info
.NET SDK:
 Version:   8.0.100-preview.4.23260.1
 Commit:    2268e7b15c

运行时环境:
 OS Name:     Loongnix
 OS Version:  20
 OS Platform: Linux
 RID:         linux-loongarch64
 Base Path:   /home/qiao/tests/dotnet-sdk-8.0.100-preview.4.23260.1-linux-loongarch64/sdk/8.0.100-preview.4.23260.1/

.NET workloads installed:
没有要显示的已安装工作负载。

Host:
  Version:      8.0.100-preview.4.23260.1
  Architecture: loongarch64
  Commit:       a8507f7c8c

.NET SDKs installed:
  8.0.100-preview.4.23260.1 [/home/qiao/tests/dotnet-sdk-8.0.100-preview.4.23260.1-linux-loongarch64/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.0-preview.4.23260.4 [/home/qiao/tests/dotnet-sdk-8.0.100-preview.4.23260.1-linux-loongarch64/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.0-preview.4.23259.5 [/home/qiao/tests/dotnet-sdk-8.0.100-preview.4.23260.1-linux-loongarch64/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download


qiao@Lap5K2:~/tests/hello$ 
qiao@Lap5K2:~/tests/hello$ ../dotnet-sdk-8.0.100-preview.4.23260.1-linux-loongarch64/dotnet new console
已成功创建模板“控制台应用”。

正在处理创建后操作...
正在还原 /home/qiao/tests/hello/hello.csproj:
  Determining projects to restore...
  Restored /home/qiao/tests/hello/hello.csproj (in 874 ms).
已成功还原。


qiao@Lap5K2:~/tests/hello$ ../dotnet-sdk-8.0.100-preview.4.23260.1-linux-loongarch64/dotnet run 
Hello, World!

Next we will continue to improve the LA64-SDK8.0's reliability first, then pushing the OSR and some others.
We will do our best to add LoongArch64 into the CI althought it depends on the Debian community merging the LA64‘s progress.

Thanks very much for your reviewing and helps @jakobbotsch @jkotas

@shushanhf
Copy link
Contributor Author

Hi, @jkotas
How to apply for adding lables liking arch-loongarch64 ? when I push PRs I can add some lables.

Thanks

@jkotas
Copy link
Member

jkotas commented Jun 21, 2023

I have sent you invitation to join dotnet org on github. Once you are accept, I will grant you rights to apply labels.

@shushanhf
Copy link
Contributor Author

I have sent you invitation to join dotnet org on github. Once you are accept, I will grant you rights to apply labels.

Thanks, I had joined the team.

@jkotas
Copy link
Member

jkotas commented Jun 21, 2023

I made you member of https://github.com/orgs/dotnet/teams/dotnet-runtime-triage that gives you triage rights for this repo, that includes rights to apply labels. Please use these rights for LoongArch64 related issues only.

@shushanhf
Copy link
Contributor Author

I made you member of https://github.com/orgs/dotnet/teams/dotnet-runtime-triage that gives you triage rights for this repo, that includes rights to apply labels. Please use these rights for LoongArch64 related issues only.

OK, Thanks

@shushanhf
Copy link
Contributor Author

We had fixed many errors for LoongArch64 and it’s preliminary available.
I will close this issue later.

The instrinsic and crossgen2 will be added one by one subsequently.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants