Skip to content

Stop inlining all the things #2

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

Merged
merged 1 commit into from
Jun 16, 2015
Merged

Conversation

Ryman
Copy link
Member

@Ryman Ryman commented Jun 15, 2015

Took a look at this today and figured out why we're getting the verbose output which I mentioned in computationclub/hack-assembler#3. With this patch, I've verified that running the square game through the reference jack compiler, then through our vm-translation and assembler, we get a brilliant game that runs (at least on the rust simulator, have not verified elsewhere).

A load of generated assembly will be the same for many scenarios due to being relative to the stack pointer, so we can just codegen it one time and call it (without a full stackframe setup cycle, which is
actually one of the most verbose parts of our old codegen).

This is a requirement if we are looking to fit all our instructions into the 32k provided by the hack hardware.

For reference: SquareGame ends up around 25k instructions, so there's probably still some places we could cut, but I'm happy to leave it until we encounter issues again.

A load of generated assembly will be the same for many scenarios due
to being relative to the stack pointer, so we can just codegen it one
time and call it (without a full stackframe setup cycle, which is
actually one of the most verbose parts of our old codegen).

This is a requirement if we are looking to fit all our instructions into
the 32k provided by the hack hardware.
@leocassarani
Copy link
Member

Discussed at Meeting 11 and decided this is worth merging.

leocassarani added a commit that referenced this pull request Jun 16, 2015
Stop inlining all the things
@leocassarani leocassarani merged commit 9198f31 into computationclub:master Jun 16, 2015
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