Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#0: add .ttinsn to sfpi #17800

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

#0: add .ttinsn to sfpi #17800

wants to merge 1 commit into from

Conversation

nathan-TT
Copy link
Contributor

@nathan-TT nathan-TT commented Feb 10, 2025

Ticket

NA

Problem description

We currently create bespoke sfpu insns using .word, that has 2 shortcomings

  1. because of mapping symbols, they never disassemble to instructions (the dissassembler always shows them as data)
  2. we have to manually swizzle them (move 2 bits from the front to the back)

We can't use .insn because spu insns do not use the regular riscv encoding, so its length checking goes wrong.

What's changed

Added .ttinsn to the assembler. This will do the swizzling, and arrange for them to be disassemblable.
Alter the ckernel_ops.h header appropriately (although this is machine-generated the generator is unavailable)
There are other instances of the ckernel_ops.h headers in submodules, that will also need updating.

This makes disassembling kernels much more pleasant. See SFPI release notes for example (https://github.com/tenstorrent/sfpi/releases/tag/v6.2.0)

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant