Skip to content

Feat: Update to .NET 10#17

Merged
mrLSD merged 4 commits into
masterfrom
feat/update-dotnet10
May 30, 2026
Merged

Feat: Update to .NET 10#17
mrLSD merged 4 commits into
masterfrom
feat/update-dotnet10

Conversation

@mrLSD

@mrLSD mrLSD commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Corrected RISC-V shift semantics so 64-bit shift behavior masks shift amounts appropriately.
  • Chores

    • Updated runtime/target framework to .NET 10.0 across projects.
    • Upgraded CI tooling and build setup to newer action versions and SDKs.
    • Bumped package version to 1.0.0.
    • Updated test frameworks and runtime dependencies, including ELFSharp and FSharp.Core.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

CI workflows and project files are upgraded to .NET 10.0 and NuGet packages are bumped; ExecuteI.fs shift instructions (execSLL, execSRL, execSRA) are changed to mask the shift amount to the low 6 bits for non-RV32 architectures.

Changes

Unified .NET 10.0 Infrastructure and Semantics Upgrade

Layer / File(s) Summary
CI workflows and project framework upgrades
.github/workflows/dotnet.yml, .travis.yml, risc-v.fsproj, Tests/Tests.fsproj
GitHub Actions actions/checkout and actions/setup-dotnet versions updated and dotnet-version changed to 10.0.x; Travis dotnet SDK set to 10.0.100. Project TargetFrameworks moved to net10.0, PackageVersion bumped to 1.0.0, and NuGet deps updated (ELFSharp2.17.3, FSharp.Core10.0.107, test packages updated).
RV64I shift instruction masking
ExecuteI.fs
execSLL, execSRL, execSRA now branch on mstate.Arch.archBits: RV32 uses unmasked rs2 cast to 32-bit; non-RV32 masks rs2 with 0x3f (rs2 &&& 0x3f) before shifting.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🐰 I hopped through CI and code tonight,
To mask the shifts and set SDKs right,
From eight to ten the builds now run,
Low six bits masked—RV64I done! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat: Update to .NET 10' accurately and clearly summarizes the main change in the pull request, which involves upgrading the project's .NET target framework to version 10.0 across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/update-dotnet10

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mrLSD mrLSD force-pushed the feat/update-dotnet10 branch from d2ce713 to 1929976 Compare May 30, 2026 21:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/dotnet.yml:
- Around line 18-22: Update the workflow to harden action references by
replacing the mutable tags for actions/checkout and actions/setup-dotnet with
their corresponding immutable commit SHAs (replace usages of actions/checkout@v6
and actions/setup-dotnet@v5 with the exact commit SHA pins for those releases)
and add persist-credentials: false to the checkout step (the actions/checkout
step) so the workflow does not retain persisted GitHub credentials during the
build/test run.

In `@ExecuteI.fs`:
- Around line 291-294: The RV32 shift-count masking is wrong: in execSLL,
execSRL and execSRA (in ExecuteI.fs) you must mask rs2 to 5 bits (use rs2 &&&
0x1f) for the RV32 branch instead of using the full register; perform the shift
on a 32-bit value (use uint32 shifts for SLL/SRL and int32 for SRA) and then
convert/extend the result back to the machine register width as the existing
code expects. Locate the RV32 pattern matches (the branches using "RV32 ->" in
execSLL/execSRL/execSRA) and replace the unmasked shifts with masked-shamt =
(mstate.getRegister rs2) &&& 0x1f, apply the appropriate 32-bit shift, and then
return the correctly-typed result.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dafd832e-678e-47b3-9882-402a78928a18

📥 Commits

Reviewing files that changed from the base of the PR and between 3f61a6e and d2ce713.

📒 Files selected for processing (86)
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • .github/workflows/dotnet.yml
  • .gitignore
  • .travis.yml
  • Arch.fs
  • Bits.fs
  • CLI.fs
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • DecodeA.fs
  • DecodeA64.fs
  • DecodeI.fs
  • DecodeI64.fs
  • DecodeM.fs
  • DecodeM64.fs
  • Decoder.fs
  • ExecuteA.fs
  • ExecuteA64.fs
  • ExecuteI.fs
  • ExecuteI64.fs
  • ExecuteM.fs
  • ExecuteM64.fs
  • LICENSE
  • MachineState.fs
  • Program.fs
  • README.md
  • Run.fs
  • Tests/Program.fs
  • Tests/Tests.fsproj
  • Tests/asm/.gitignore
  • Tests/asm/Makefile
  • Tests/asm/asm-source-tests/rv64ua/Makefrag
  • Tests/asm/asm-source-tests/rv64ua/amoadd_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoadd_w.S
  • Tests/asm/asm-source-tests/rv64ua/amoand_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoand_w.S
  • Tests/asm/asm-source-tests/rv64ua/amomax_d.S
  • Tests/asm/asm-source-tests/rv64ua/amomax_w.S
  • Tests/asm/asm-source-tests/rv64ua/amomaxu_d.S
  • Tests/asm/asm-source-tests/rv64ua/amomaxu_w.S
  • Tests/asm/asm-source-tests/rv64ua/amomin_d.S
  • Tests/asm/asm-source-tests/rv64ua/amomin_w.S
  • Tests/asm/asm-source-tests/rv64ua/amominu_d.S
  • Tests/asm/asm-source-tests/rv64ua/amominu_w.S
  • Tests/asm/asm-source-tests/rv64ua/amoor_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoor_w.S
  • Tests/asm/asm-source-tests/rv64ua/amoswap_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoswap_w.S
  • Tests/asm/asm-source-tests/rv64ua/amoxor_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoxor_w.S
  • Tests/asm/asm-source-tests/rv64ua/lrsc.S
  • Tests/asm/disasm
  • Tests/asm/init.S
  • Tests/asm/mmio.ld
  • Tests/asm/src/add.S
  • Tests/asm/src/alu.S
  • Tests/asm/src/alui.S
  • Tests/asm/src/amo.lrsc.w.S
  • Tests/asm/src/amo_d.S
  • Tests/asm/src/amo_w.S
  • Tests/asm/src/br.S
  • Tests/asm/src/j.S
  • Tests/asm/src/mem.S
  • Tests/asm/src/sys.S
  • Tests/asm/src/ui.S
  • Tests/rv32i/alu.fs
  • Tests/rv32i/alui.fs
  • Tests/rv32i/br.fs
  • Tests/rv32i/j.fs
  • Tests/rv32i/mem.fs
  • Tests/rv32i/sys.fs
  • Tests/rv32i/ui.fs
  • Tests/rv32m/alu.fs
  • Tests/rv64a/amo.fs
  • Tests/rv64i/alu.fs
  • Tests/rv64i/alui.fs
  • Tests/rv64i/br.fs
  • Tests/rv64i/j.fs
  • Tests/rv64i/mem.fs
  • Tests/rv64i/sys.fs
  • Tests/rv64i/ui.fs
  • Tests/rv64m/alu.fs
  • risc-v.fsproj
  • risc-v.sln
  • risc-v.sln.DotSettings.user

Comment thread .github/workflows/dotnet.yml
Comment thread ExecuteI.fs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/dotnet.yml (1)

18-18: ⚡ Quick win

Confirm upgraded versions: actions/checkout@v6, actions/setup-dotnet@v5, and .NET 10.0.x are available/stable (no availability/stability issue).

  • In .github/workflows/dotnet.yml (lines 18–22), consider pinning actions/checkout / actions/setup-dotnet to a full commit SHA and pinning dotnet-version to a specific patch (instead of 10.0.x) for fully reproducible builds.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/dotnet.yml at line 18, Update the workflow to pin
third-party GitHub Actions and the .NET SDK to immutable versions: replace the
floating tag actions/checkout@v6 and actions/setup-dotnet@v5 with their full
commit SHAs (the checkout and setup-dotnet uses entries) and change the
dotnet-version input from "10.0.x" to an exact patch version like "10.0.Y" (use
the specific SDK patch you tested) so the workflow uses reproducible, stable
artifacts; make these edits around the steps referencing actions/checkout and
actions/setup-dotnet and the input name dotnet-version.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/dotnet.yml:
- Line 18: Update the workflow to pin third-party GitHub Actions and the .NET
SDK to immutable versions: replace the floating tag actions/checkout@v6 and
actions/setup-dotnet@v5 with their full commit SHAs (the checkout and
setup-dotnet uses entries) and change the dotnet-version input from "10.0.x" to
an exact patch version like "10.0.Y" (use the specific SDK patch you tested) so
the workflow uses reproducible, stable artifacts; make these edits around the
steps referencing actions/checkout and actions/setup-dotnet and the input name
dotnet-version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d4761cf8-cf1f-447b-b547-b3ba986272c9

📥 Commits

Reviewing files that changed from the base of the PR and between d2ce713 and 1929976.

📒 Files selected for processing (86)
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/ISSUE_TEMPLATE/feature_request.md
  • .github/workflows/dotnet.yml
  • .gitignore
  • .travis.yml
  • Arch.fs
  • Bits.fs
  • CLI.fs
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • DecodeA.fs
  • DecodeA64.fs
  • DecodeI.fs
  • DecodeI64.fs
  • DecodeM.fs
  • DecodeM64.fs
  • Decoder.fs
  • ExecuteA.fs
  • ExecuteA64.fs
  • ExecuteI.fs
  • ExecuteI64.fs
  • ExecuteM.fs
  • ExecuteM64.fs
  • LICENSE
  • MachineState.fs
  • Program.fs
  • README.md
  • Run.fs
  • Tests/Program.fs
  • Tests/Tests.fsproj
  • Tests/asm/.gitignore
  • Tests/asm/Makefile
  • Tests/asm/asm-source-tests/rv64ua/Makefrag
  • Tests/asm/asm-source-tests/rv64ua/amoadd_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoadd_w.S
  • Tests/asm/asm-source-tests/rv64ua/amoand_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoand_w.S
  • Tests/asm/asm-source-tests/rv64ua/amomax_d.S
  • Tests/asm/asm-source-tests/rv64ua/amomax_w.S
  • Tests/asm/asm-source-tests/rv64ua/amomaxu_d.S
  • Tests/asm/asm-source-tests/rv64ua/amomaxu_w.S
  • Tests/asm/asm-source-tests/rv64ua/amomin_d.S
  • Tests/asm/asm-source-tests/rv64ua/amomin_w.S
  • Tests/asm/asm-source-tests/rv64ua/amominu_d.S
  • Tests/asm/asm-source-tests/rv64ua/amominu_w.S
  • Tests/asm/asm-source-tests/rv64ua/amoor_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoor_w.S
  • Tests/asm/asm-source-tests/rv64ua/amoswap_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoswap_w.S
  • Tests/asm/asm-source-tests/rv64ua/amoxor_d.S
  • Tests/asm/asm-source-tests/rv64ua/amoxor_w.S
  • Tests/asm/asm-source-tests/rv64ua/lrsc.S
  • Tests/asm/disasm
  • Tests/asm/init.S
  • Tests/asm/mmio.ld
  • Tests/asm/src/add.S
  • Tests/asm/src/alu.S
  • Tests/asm/src/alui.S
  • Tests/asm/src/amo.lrsc.w.S
  • Tests/asm/src/amo_d.S
  • Tests/asm/src/amo_w.S
  • Tests/asm/src/br.S
  • Tests/asm/src/j.S
  • Tests/asm/src/mem.S
  • Tests/asm/src/sys.S
  • Tests/asm/src/ui.S
  • Tests/rv32i/alu.fs
  • Tests/rv32i/alui.fs
  • Tests/rv32i/br.fs
  • Tests/rv32i/j.fs
  • Tests/rv32i/mem.fs
  • Tests/rv32i/sys.fs
  • Tests/rv32i/ui.fs
  • Tests/rv32m/alu.fs
  • Tests/rv64a/amo.fs
  • Tests/rv64i/alu.fs
  • Tests/rv64i/alui.fs
  • Tests/rv64i/br.fs
  • Tests/rv64i/j.fs
  • Tests/rv64i/mem.fs
  • Tests/rv64i/sys.fs
  • Tests/rv64i/ui.fs
  • Tests/rv64m/alu.fs
  • risc-v.fsproj
  • risc-v.sln
  • risc-v.sln.DotSettings.user
💤 Files with no reviewable changes (1)
  • ExecuteI.fs
✅ Files skipped from review due to trivial changes (1)
  • .travis.yml
🚧 Files skipped from review as they are similar to previous changes (2)
  • risc-v.fsproj
  • Tests/Tests.fsproj

@mrLSD mrLSD added this to the v0.5.0 milestone May 30, 2026
@mrLSD mrLSD added the .NET label May 30, 2026
@mrLSD mrLSD merged commit 97097d1 into master May 30, 2026
2 checks passed
@mrLSD mrLSD deleted the feat/update-dotnet10 branch May 30, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant