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

[SOL] Create explicit sign extension instruction #114

Open
wants to merge 1 commit into
base: solana-rustc/18.1-2024-05-19
Choose a base branch
from

Conversation

LucasSte
Copy link
Collaborator

As described in solana-foundation/solana-improvement-documents#174, mov32 reg, reg will now serve for sign extension.

The changes in this PR are the following:

  1. Use mov64 for copying 32-bit registers.
  2. Use mov32 reg, reg for sign extension.
  3. Use mov64 reg, reg for zero extension. I'm assuming I'll always keep the high bits clear in 32-bit sub-registers.
  4. Use and32 reg, -1 for truncation.

I haven't done yet an integration test in the VM, because jump instructions do not work with ALU32. I'll fix that in a following PR and work on the necessary tests.

@LucasSte LucasSte marked this pull request as ready for review November 25, 2024 20:28
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