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

Introduce new constraint for register pair #39

Closed
wants to merge 1 commit into from
Closed

Conversation

kito-cheng
Copy link
Collaborator

@kito-cheng kito-cheng commented Apr 27, 2023

Must start with an even-numbered register.

NOTE: This is NOT implemented on either on LLVM or GCC yet, this PR will hold until at least one compiler has implemented.

Fix #37

Must start with an even-numbered register.
@cmuellner
Copy link
Collaborator

There is a decision between two options:

  • an even-numbered register
  • a register pair that is identified by the even, lower-numbered register

The difference is, that the second implies the amount of registers in the constraint, while the other one does not (or implies 1 if not stated otherwise).

#37 requests the first option. This PR introduces the second. Is there a reason to go for the second option besides personal preference (I admit that I prefer the second option for this reason)?

And would clobbering a register with the constraint "G" imply that a register pair is clobbered (is this easy to implement in GCC/LLVM)?

@lenary
Copy link
Contributor

lenary commented Oct 15, 2024

I see my proposal in #92 conflicts with this, as it proposes a different name (Pr vs R). I chose Pr because I felt it was extensible to other kinds of paired registers in the future, potentially.

@kito-cheng
Copy link
Collaborator Author

@lenary Yeah, I agree this should be designed for more extensibility, and your proposal is better than this one :) so let me drop this proposal to prevent misleading that we have two competing proposals.

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.

Asm constraint to require an even register
3 participants