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

How would I create and pass a buffer for the generated assembly to scribble on? #3

Open
kozross opened this issue Jul 9, 2018 · 0 comments

Comments

@kozross
Copy link

kozross commented Jul 9, 2018

Suppose I'm dynamically generating some assembly that will need a 4K buffer to do some scratch calculations in. It is not important what's left in it after it's done, but it has to be safe to scribble in for the generated assembly. I can pass an address in one of the registers to the generated assembly before calling it, but I'm not sure how to

  1. Allocate that buffer in Haskell-land; and
  2. Get its address as a pointer

What would you need to do for this? Is it ok just to allocate it as a Data.Vector Word of the appropriate length, or is something more involved?

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

1 participant