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

Chapter 2: First argument to a function call should be placed in %rdi #180

Closed

Conversation

abhinav-upadhyay
Copy link
Contributor

There was a typo in the example shown in the assign homes pass. The generated assembly should put the argument for print_int into %rdi instead of %rax, before the callq instruction.

The assembly shown for the Python version in the patch instructions pass looks correct, but the racket version still had the typo.

There was a typo in the example shown in the assign homes pass. The generated assembly should put the argument for print_int into %rdi instead of %rax, before the callq instruction.

The assembly shown for the Python version in the patch instructions pass looks correct, but the racket version still had the typo.
Copy link
Collaborator

@jsiek jsiek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing this problem!
The solution is a bit more complicated because the assembly code is correct for the Racket version of the book but not for the Python version. I'll need to split this out into different code for the different versions.

@jsiek
Copy link
Collaborator

jsiek commented Sep 28, 2024

I've pushed a fix to this problem. Thanks again!

@jsiek jsiek closed this Sep 28, 2024
@abhinav-upadhyay
Copy link
Contributor Author

abhinav-upadhyay commented Sep 28, 2024 via email

@abhinav-upadhyay
Copy link
Contributor Author

abhinav-upadhyay commented Sep 28, 2024 via email

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