Skip to content

Introduce new constraint for register pair#39

Closed
kito-cheng wants to merge 1 commit intomainfrom
reg-pair
Closed

Introduce new constraint for register pair#39
kito-cheng wants to merge 1 commit intomainfrom
reg-pair

Conversation

@kito-cheng
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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