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

Updating coredistools #414

Open
BruceForstall opened this issue Sep 18, 2024 · 7 comments
Open

Updating coredistools #414

BruceForstall opened this issue Sep 18, 2024 · 7 comments

Comments

@BruceForstall
Copy link
Member

What should be included in the next update of the coredistools library (used for x86/x64 GC stress, R2RDump disassembly, superpmi asm diffs, RyuJIT "late disassembler", ILC (?), and possibly more)?

Some proposals:

  1. Update LLVM from 17.0.6 to 19.1.0 (or whatever is latest when we finally update): https://github.com/llvm/llvm-project/releases.
  2. Add LoongArch and RISC-V disassemblers to the standard set built on win-x64, win-arm64, etc. (Allows for superpmi asm diffs using cross compilers, for example.)
  3. Does the latest LLVM contain support for the latest AVX-512? AVX10? Intel APX? Arm SVE/SVE2/SSVE/SME? Other new ISA extensions? (If not, is new LLVM ISA support for desired ISAs expected soon?)

Cordistools.cpp currently tweaks the "features string" when creating the disassembler, to create a better set of ISAs for disassembly:

  if (TheTargetArch == Target_Arm64) {
    // Enable all features for disassembly. Setting a specific advanced CPU enables all the architecture
    // features for that CPU (e.g., `Mcpu = "neoverse-n2"`), but we want to use the "meta" feature
    // string "+all" to just enable all features, even those not implemented in any current CPU.
    FeaturesStr = "+all";
  } else if (TheTargetArch == Target_RiscV64) {
    FeaturesStr = "+m,+a,+f,+d,+c,+zicsr,+zifencei";  // RV64GC
  }

Notably, when this was done, "+all" for arm64 was not in "great" shape.

Is this still the correct set, for LLVM 19.1.0 (and beyond)?

Is there any pressing need to either update coredistools, or wait to update it?

Comments?

@dotnet/jit-contrib @dotnet/samsung @shushanhf @dotnet/crossgen-contrib @khushal1996 @DeepakRajendrakumaran @anthonycanino

@shushanhf
Copy link
Contributor

shushanhf commented Sep 18, 2024

  1. Add LoongArch and RISC-V disassemblers to the standard set built on win-x64, win-arm64, etc. (Allows for superpmi asm diffs using cross compilers, for example.)

@BruceForstall
Thanks very much for adding LoongArch.
For LoongArch, if there are some work to do, you can tell me to do that.

Update LLVM from 17.0.6 to 19.1.0 (or whatever is latest when we finally update): https://github.com/llvm/llvm-project/releases.

It's ok for LoongArch.

@BruceForstall
Copy link
Member Author

Also @dotnet/arm64-contrib

@tomeksowi
Copy link
Contributor

tomeksowi commented Sep 18, 2024

Thanks for adding RISC-V disasm to the standard set. Clang 19 should be ok.

EDIT: I'll check if "+all" works now for RISC-V

@tomeksowi
Copy link
Contributor

tomeksowi commented Sep 18, 2024

Is there any pressing need to either update coredistools, or wait to update it?

Not really from RISC-V. We will be adding RVA22 profile extensions somewhere in 2025, but RV64GC is the correct set for now.

@tomeksowi
Copy link
Contributor

EDIT: I'll check if "+all" works now for RISC-V

Nope, it's AArch64 only: '+all' is not a recognized feature for this target (ignoring feature)

But while I'm here, I'll add more extensions for RISC-V to future-proof.

BruceForstall pushed a commit that referenced this issue Sep 18, 2024
Add extensions of ratified RISC-V application profiles (the unprivileged
side). JIT doesn't emit code for newly added extensions yet, this is to
future-proof since coredistools are rebuilt infrequently. See
#414 (comment)
for context.

Part of dotnet/runtime#84834, cc @dotnet/samsung @BruceForstall
@anthonycanino
Copy link

Hi Bruce, I will check internally and get back to you on ISA support in LLVM latest. I believe by just using latest we should be fine, but will confirm whether we have any pending work.

@anthonycanino
Copy link

@BruceForstall latest LLVM disassembler should have full support for APX and AVX10.2. I think we are good.

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

No branches or pull requests

4 participants