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

Add support for disjoint helper id address space #70

Closed
wants to merge 1 commit into from

Conversation

Alan-Jowett
Copy link
Collaborator

Add support for disjoint helper id address space

Signed-off-by: Alan Jowett alan.jowett@microsoft.com

Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 95.182% when pulling 4410943 on Alan-Jowett:issue66 into c7c019c on iovisor:master.

@jpsamaroo
Copy link

Why not have the helper resolver just return an index into the ext_funcs array? Do you have a need for arbitrary functions to be returned (since you could really return whatever you want)? It feels like we're adding a whole extra layer of independent complexity, when we could just reuse what already exists.

@Alan-Jowett
Copy link
Collaborator Author

@jpsamaroo That is an excellent point. Technically, the helper ids that were originally in the program don't have to be the same as the ones passed to the jitter.

To solve this for my scenario I can do the following:

  1. Build a table of the original helper IDs
  2. Resolve original helper IDs to literal addresses
  3. Register table index -> literal address with jitter
  4. Replace original helper ID -> table index in the byte code

The jitter will then do the right thing of replacing IMM value (which is a table index at this point) with literal address.

No need to modify the jitter.

I think I will go ahead and close this PR.

@Alan-Jowett
Copy link
Collaborator Author

Changed the caller to re-map helper ids from our disjointed address space to the supported [0,63] address space.

@Alan-Jowett Alan-Jowett deleted the issue66 branch June 18, 2022 23:42
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.

None yet

3 participants