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

Inline Call to Original Function bytes into 'Swap Space' if it's possible on x86. #11

Open
Sewer56 opened this issue May 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Sewer56
Copy link
Member

Sewer56 commented May 6, 2024

When calling convention conversion is not needed, you will have

  • 5 byte jmp into your function
  • 5 byte jmp to original function
  • 5-16 bytes stolen from original function

If it happens to be that we stole <= 6 bytes, which may be common in x86, we can safely inline the instructions to call original into the swap space to save 16 bytes of memory.

@Sewer56 Sewer56 added the enhancement New feature or request label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant