Skip to content

[RISC-V] R2RDump: revamp probing quirks - #118980

Merged
jakobbotsch merged 2 commits into
dotnet:mainfrom
tomeksowi:r2rdump-probe-quirks
Nov 4, 2025
Merged

[RISC-V] R2RDump: revamp probing quirks#118980
jakobbotsch merged 2 commits into
dotnet:mainfrom
tomeksowi:r2rdump-probe-quirks

Conversation

@tomeksowi

@tomeksowitomeksowi commented Aug 22, 2025

Copy link
Copy Markdown
Member

Bring back ProbeRiscV64Quirks disabled in #117408, see #117408 (comment) for context.

I reimplemented it to avoid iterating the instruction stream backwards, which is impossible with compressed instructions without keeping a backlog of seen instruction sizes.

The new implementation recognizes only canonical auipc + jalr/ld/addi patterns. On one hand it introduces a temporary inconvenience of putting the cell name next to unnecessary addi instead of ld/jalr for patterns like this:

18ef20: 17 bf 4401 auipc t5,519518ef24: 13 0f 8f 45 addi t5, t5,1112 // void Interop.ThrowExceptionForIoErrno(Interop+ErrorInfo, string, bool) (METHOD_ENTRY_DEF_TOKEN)18ef28: 8336 0f 00 ld a3,0(t5) // <----- addi's immediate should go here instead18ef2c: e7 800600 jalr a3

On the other hand, it is much simpler (one third of the original code size) and comments on all handles (e.g. strings), the hitherto implementation limited itself to only to calls.

Compressed jalr/ld/addi are not recognized yet, they will be implemented as we teach JIT to emit these encodings.

Part of #84834, cc @dotnet/samsung

@github-actionsgithub-actionsBot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 22, 2025
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label Aug 22, 2025
@am11am11 added area-ReadyToRun arch-riscv Related to the RISC-V architecture and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Aug 22, 2025
@tomeksowi

Copy link
Copy Markdown
MemberAuthor

@risc-vv /run

@risc-vv

risc-vv commented Aug 22, 2025

Copy link
Copy Markdown
RISC-V pull_request-CLR-QEMU: 9106 / 9136 (99.67%)
=======================
passed: 9106
failed: 2
skipped: 586
killed: 28
------------------------
TOTAL tests: 9722
VIRTUAL time: 80h 21min 16s 6ms
REAL time: 1h 19min 45s 645ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V pull_request-CLR-VF2: 9107 / 9137 (99.67%)
=======================
passed: 9107
failed: 2
skipped: 586
killed: 28
------------------------
TOTAL tests: 9723
VIRTUAL time: 32h 29min 53s 724ms
REAL time: 2h 9min 2s 711ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V pull_request-FX-QEMU: 0 / 1 (0.00%)
=======================
passed: 0
failed: 0
skipped: 14
killed: 1
------------------------
TOTAL tests: 15
VIRTUAL time: 15s 616ms
REAL time: 4h 30min 0s 520ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

RISC-V pull_request-FX-VF2: 0 / 67 (0.00%)
=======================
passed: 0
failed: 0
skipped: 14
killed: 67
------------------------
TOTAL tests: 81
VIRTUAL time: 1min 29s 737ms
REAL time: 12h 30min 8s 431ms
=======================

report.xml, report.md, failures.xml, testclr_details.tar.zst

Build information and commands

GIT: dd1c556bac2ac5505f2300b147e25cad11c30e69
CI: d023c7d591ab286aa343d644f00b5daa59d8d6b0
REPO: dotnet/runtime
BRANCH: main
CONFIG: Checked
LIB_CONFIG: Release

@JulieLeeMSFT

Copy link
Copy Markdown
Member

We will review .NET 11 PRs when we are done with .NET 10 last minute works and less busy. Please give us a few more weeks.
CC @jakobbotsch.

@steveisoksteveisok added this to the 11.0.0 milestone Oct 6, 2025

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Anyone else from @dotnet/crossgen-contrib want to take a look?

@jakobbotsch

Copy link
Copy Markdown
Member

/azp run runtime

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@JulieLeeMSFT

Copy link
Copy Markdown
Member

@tomeksowi please check test failures.

@JulieLeeMSFTJulieLeeMSFT added the needs-author-action An issue or pull request that requires more info or actions from the author. label Nov 3, 2025
@tomeksowi

Copy link
Copy Markdown
MemberAuthor

@tomeksowi please check test failures.

Failing on Send to Helix, looks unrelated.

@dotnet-policy-servicedotnet-policy-serviceBot removed the needs-author-action An issue or pull request that requires more info or actions from the author. label Nov 3, 2025
@jakobbotsch

Copy link
Copy Markdown
Member

/ba-g Android timeout and known issue #114924

@jakobbotsch
jakobbotsch merged commit c084ef3 into dotnet:mainNov 4, 2025
94 of 99 checks passed
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Dec 5, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-ReadyToRuncommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@tomeksowi@risc-vv@JulieLeeMSFT@jakobbotsch@steveisok@clamp03@am11