Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RV32 mutual recursion is not detected #134

Description

@Zaneham

sel_call refuses direct recursion because the prologue saves ra in a single slot at sp+0 and a self-call would clobber it. That check only compares the callee against the current function, so a two-function cycle passes straight through and miscompiles rather than refusing.

Detecting cycles properly is the minimum fix and should probably land regardless. Actually supporting recursion needs a deeper save area and a real frame layout, which is a bigger piece and arguably not worth it for baby-core kernels.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend: TensixTenstorrent Tensix / Metalium backendenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions