Conversation
Implement Rsbs (reverse subtract with flags) handler for ARM Thumb in ArithmeticOps.cs. Decode rn and rd from the 3-bit opcode fields, read rn, perform subtraction of rn from immediate 0 using existing SubWithFlags helper, and write result back to rd while updating CPU flags. Mark method aggressive-inline for performance. This enables correct execution of Rsbs opcodes on the RP2040 Cortex-M0+ emulation core and fixes missing behavior for instructions that rely on reverse subtract semantics.
Add a dotnet-tools.json to pin csharpier 1.2.5 for consistent formatting across the repo. Refactor InstructionDecoder declaration to "public sealed unsafe and remove unused singleton and complex initialization scaffolding. This change simplifies the class header ordering and ensures proper unsafe modifier placement without altering decoder logic. Also reformat surrounding code to match the project's style expectations.
Remove an extra blank line introduced at top of src/RP2040.Core/Cpu/Instructions/ArithmeticOps.cs and normalize file whitespace. This reverts an unintended insertion of a stray newline that affected file formatting and kept the rest of the file contents unchanged. This is purely a non-functional cleanup to keep repository style consistent and avoid spurious whitespace diffs.
Implement Rsbs instruction encoding generation in InstructionEmiter, including argument validation for register indices. Add the RSBS opcode to the InstructionDecoder rules so the decoder recognizes the instruction. Restore RSBS-related unit tests in InstructionDecoderTests and add a new ArithmeticOps test that verifies negating zero sets Z and C flags correctly. Also remove an unused using and add a missing copyright line in LICENSE. These changes enable correct assembly emission, decoding, and execution testing of the RSBS (Negate) instruction.
Remove Spanish comments and redundant notes, rename and tidy up fetch-cache handling and fast-fetch path to improve readability and keep implementation intent clear. - Strip non-English comments and extraneous TODO-like lines to unify code language and reduce. - Keep fetch cache fields and update logic intact; remove commented notes and redundant explanatory headers. - Preserve fast-guard/fallback behavior but simplify inline comments and ensure fetchPtr null check behavior remains explicit. - Minor comment wording tweaks (Spanish -> English) and a small comment fix for exception cycle wording (cycles instead of ciclos). No behavioral changes intended; changes are purely comment/annotation cleanup and minor code comment clarifications to improve maintainability.
Collaborator
Author
|
SonarQube is complaining about Test Coverage, it will be fixed after finishing the ISA implementation |
lmSeryi
approved these changes
Feb 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of change
Checklist
dotnet test)Screenshots / Hex Dumps (Optional)