Skip to content

Conversation

@sagar-a16z
Copy link
Contributor

Implement RISCVTrace with inline_sequence for LR.W, LR.D, SC.W, and SC.D instructions. Reserve virtual register 32 for storing the reservation address, enabling proper constraint generation for atomic operations.

  • Add reservation_register() to VirtualRegisterAllocator (register 32)
  • Update allocate() and allocate_for_inline() to skip reserved register
  • LR.W/LR.D: Store reservation address in v_reservation, then load
  • SC.W/SC.D: Assert reservation matches, store value, clear reservation

Implement RISCVTrace with inline_sequence for LR.W, LR.D, SC.W, and SC.D
instructions. Reserve virtual register 32 for storing the reservation
address, enabling proper constraint generation for atomic operations.

- Add reservation_register() to VirtualRegisterAllocator (register 32)
- Update allocate() and allocate_for_inline() to skip reserved register
- LR.W/LR.D: Store reservation address in v_reservation, then load
- SC.W/SC.D: Assert reservation matches, store value, clear reservation
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.

2 participants