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

The compiler needs work #7

Open
xtremegamer1 opened this issue Nov 9, 2022 · 4 comments
Open

The compiler needs work #7

xtremegamer1 opened this issue Nov 9, 2022 · 4 comments

Comments

@xtremegamer1
Copy link

xtremegamer1 commented Nov 9, 2022

There are some issues right now with the compiler. For example, many VTIL instructions and more exotic native registers lack implementation. Also, making vexit compile into a "ret" is a bad idea. I think it would make more sense to compile into an unconditional jmp to the operand of the vexit. Whoever wrote the compiler seems to think that VTIL routines should be subroutines with their own stack frame, but at least with vmprotect it makes more sense to think of them as code that could be executed inline with the native code wrapping vmenters, because a single vmenter rarely (maybe never?) represents a routine with its own stack frame and instead represent snippets of code that modify the stack of the "caller" (vmenterer?) I am not sure the facilities provided by asmjit for virtual register allocation are best suited to this project because they seem to be bound to the notion of a function with its own stack, perhaps a custom one will need to be built or a different library used.

@xtremegamer1
Copy link
Author

i will make a pr if i can manage to get my fork working. I would call the compiler half complete but that would be generous, it is more like 40% done.

@mrexodia
Copy link
Collaborator

Yeah it was just some POC code from the Discord that I didn’t want to get lost. Improvements are definitely welcome!

@xtremegamer1
Copy link
Author

Sorry for making this rude issue. I appreciate the work you and others have put into this

@xtremegamer1 xtremegamer1 changed the title compiler sucks ass The compiler needs work Nov 18, 2022
@mrexodia
Copy link
Collaborator

mrexodia commented Nov 18, 2022 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

No branches or pull requests

2 participants