Skip to content

Conversation

@am11
Copy link
Member

@am11 am11 commented Jan 12, 2025

This ignores the emitter assertion in AOT mode seen here #106223 (comment). Also, removes JALR redundant reloc (merged with PC reloc).

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jan 12, 2025
@am11 am11 requested a review from a team January 12, 2025 16:46
@am11 am11 mentioned this pull request Jan 12, 2025
@am11 am11 added area-NativeAOT-coreclr arch-riscv Related to the RISC-V architecture and removed area-crossgen2-coreclr labels Jan 12, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

@am11 am11 force-pushed the feature/nativeaot/riscv64-port branch from 2dd124f to afa2118 Compare January 12, 2025 22:16
am11 and others added 2 commits January 13, 2025 01:26
am11 and others added 2 commits January 14, 2025 02:03
Co-authored-by: Tomek Sowiński <tomeksowi@gmail.com>
@am11
Copy link
Member Author

am11 commented Jan 14, 2025

@dotnet/samsung with these patches,
-r linux-riscv64 -p:PublishAot=true -p:SysRoot=/crossrootfs/riscv64 -p:LinkerFlavor=lld

succeeds. Execution throws SIGILL.

With the default linker (LinkerFlavor=bfd), it doesn't publish. bfd throws:

/usr/bin/riscv64-linux-gnu-ld.bfd: tls_CurrentThread: TLS definition in /runtime/artifacts/bin/coreclr/linux.riscv64.Checked/aotsdk/libRuntime.WorkstationGC.a(threadstore.cpp.o) section .tbss mismatches non-TLS reference in /runtime/artifacts/bin/coreclr/linux.riscv64.Checked/aotsdk/libRuntime.WorkstationGC.a(AllocFast.S.o)

Overall it's a progress. We can take this in and continue hackathon in the tracking issue. PTAL.

@clamp03
Copy link
Member

clamp03 commented Jan 15, 2025

@am11 I removed IMAGE_REL_RISCV64_JALR in #97368 because I think its behavior of IMAGE_REL_RISCV64_JALR and IMAGE_REL_RISCV64_PC looks identical in RISCV. Do you have any reason to add IMAGE_REL_RISCV64_JALR?

@am11
Copy link
Member Author

am11 commented Jan 15, 2025

Thanks. They are handled the same way in ILC as well, only distinguishing themselves at the JIT interface level. I can remove it if the separate identity is not desired.

@am11 am11 force-pushed the feature/nativeaot/riscv64-port branch from cca299f to 070c3ba Compare January 17, 2025 01:10
@am11 am11 force-pushed the feature/nativeaot/riscv64-port branch from 070c3ba to 8a95da2 Compare January 17, 2025 01:10
Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jkotas jkotas merged commit 0d18978 into dotnet:main Jan 17, 2025
107 of 109 checks passed
@am11 am11 deleted the feature/nativeaot/riscv64-port branch January 17, 2025 14:16
grendello added a commit to grendello/runtime that referenced this pull request Jan 20, 2025
* main: (89 commits)
  Add Dispose for X509Chain instance (dotnet#110740)
  Fix XML comment on regex split enumerator (dotnet#111572)
  JIT: tolerate missing InitClass map in SPMI (dotnet#111555)
  Build ilasm/ildasm packages for the host machine (dotnet#111512)
  Unicode 16.0 Support (dotnet#111469)
  Improve performance of interface method resolution in ILC (dotnet#103066)
  Fix building the host-targeting components and packing ILC (dotnet#111552)
  Improve JSON validation perf (dotnet#111332)
  Update github-merge-flow.jsonc to autoflow 9.0 to 9.0-staging (dotnet#111549)
  Include GPL-3 licence text in the notice (dotnet#111528)
  Remove explicit __compact_unwind entries from x64 assembler (dotnet#111530)
  Add MemoryExtensions overloads with comparer (dotnet#110197)
  Avoid capturing the ExecutionContext for the whole HTTP connection lifetime (dotnet#111475)
  Forward DefaultArtifactVisibility down from the VMR orchestrator (dotnet#111513)
  Fix relocs errors on riscv64 (dotnet#111317)
  Added JITDUMP_USE_ARCH_TIMESTAMP support. (dotnet#111359)
  add rcl/rcr tp and latency info (dotnet#111442)
  Fix stack overflow in compiler-generated state (dotnet#109207)
  Produce a package with the host-running ILC for repos in the VMR (dotnet#111443)
  Delete dead code in ilasm PE writer (dotnet#111218)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscv Related to the RISC-V architecture area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants