Skip to content

[Wasm RyuJit] Update codegenwasm.cpp to address code quality issues #122156

Description

@kg

The WebAssembly RyuJIT backend in codegenwasm.cpp and other files needs to be updated as follows:

  1. Move the GT_DIV, GT_MOD, GT_UDIV and GT_UMOD cases from CodeGen::genCodeForBinary to CodeGen::genCodeForDivMod, which does not currently have a definition in codegenwasm.cpp (you will need to add one that matches the existing declaration in codegen.h.) Make sure to include the header and footer from genCodeForBinary in the new genCodeForDivMod so it will work correctly.
  2. Remove the declaration for genCodeForShiftOrRotate in codegen.h along with the #ifdef TARGET_WASM around it. The declaration is redundant.
  3. Rename the CodeGen::genCodeForShiftOrRotate definition in codegenwasm.cpp to genCodeForShift to match the existing declaration in codegen.h.
  4. Update the cases in CodeGen::genCodeForTreeNode so that GT_DIV, GT_MOD, GT_UDIV and GT_UMOD are implemented by calling genCodeForDivMod instead of calling genCodeForBinary.

Activity

  1. self-assigned this
    on Dec 3, 2025
  2. added
    arch-wasm
    area-CodeGen-coreclr
    on Dec 3, 2025
  3. added theissue type on Dec 3, 2025
  4. added
    untriaged
    on Dec 3, 2025
  5. dotnet-policy-service commented on Dec 3, 2025

    @dotnet-policy-service
    Contributor

    Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
    See info in area-owners.md if you want to be subscribed.

  6. dotnet-policy-service commented on Dec 3, 2025

    @dotnet-policy-service
    Contributor

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

  7. removed
    untriaged
    on Dec 4, 2025
  8. added this to the 11.0.0 milestone on Dec 4, 2025
  9. locked and limited conversation to collaborators on Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-CodeGen-coreclr

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions