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

Assembly code for win32 #5

Open
ramiro1234 opened this issue Sep 5, 2019 · 1 comment
Open

Assembly code for win32 #5

ramiro1234 opened this issue Sep 5, 2019 · 1 comment

Comments

@ramiro1234
Copy link

No description provided.

@ramiro1234
Copy link
Author

Under win32 get a stack error that esp was not saved across a funciton call
i CHANGED 2 lines added push esi right before push ebp
else if (i == ENT) {
i = 4 * *pc++; if (i < -128 || i > 127) { printf("jit: ENT out of bounds\n"); return -1; }
*(int *)je = 0xe5895556; je = je + 4; // push esi push %ebp; movl %esp, %ebp
if (i > 0) { *(int )je = 0xec83; je = je + 2; (int)je++ = i; } // subl $(i4), %esp
}

added pop esi before ret
else if (i == LEV) { *(int *)je = 0x5e5dec89; je = je + 4; *je++ = 0xc3; }
// mov %ebp, %esp; pop %ebp; pop esi ret

esi must be saved in Win32, edi and ebx should also be saved but haven't run into any problems so far

@ramiro1234 ramiro1234 reopened this Sep 5, 2019
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