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

x86 variant for output of assign homes #152

Open
jsiek opened this issue Feb 21, 2023 · 4 comments
Open

x86 variant for output of assign homes #152

jsiek opened this issue Feb 21, 2023 · 4 comments

Comments

@jsiek
Copy link
Collaborator

jsiek commented Feb 21, 2023

We currently use x86_Var as the output of assign homes, which is a bit confusing because assign homes removes the variables. We need a variant of x86_Int that relaxes the argument restrictions.

@jnear
Copy link

jnear commented Feb 21, 2023

Currently, x86_Int doesn't restrict arguments. e.g. Figure 2.5 (Python version) allows both arguments of a movq to be memory references. I assumed this was intentional - but maybe it wasn't?

@jsiek
Copy link
Collaborator Author

jsiek commented Feb 21, 2023

The restriction is not expressed in the grammar. (That kind of restriction is difficult to express in a grammar.)
The restriction is instead expressed in the text, on page 21, and the lifting of the restrictions for x86_Var is stated on page 22.

@jsiek
Copy link
Collaborator Author

jsiek commented Feb 21, 2023

I should add, those restrictions are difficult to express without significantly increasing the size of the grammar.

@jnear
Copy link

jnear commented Feb 21, 2023

That makes sense. I think it is not bad as it is, this is just a nuance that I need to explain in class better. An alternative might be a grammar x86_Int* that just has a footnote saying there are no argument restrictions.

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

No branches or pull requests

2 participants