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

Assembler bug on call instructions #2

Open
rsinha opened this issue May 4, 2016 · 0 comments
Open

Assembler bug on call instructions #2

rsinha opened this issue May 4, 2016 · 0 comments
Assignees

Comments

@rsinha
Copy link

rsinha commented May 4, 2016

First of all, thank you for writing this blog post in such incredible detail!

From what I understand, there is a bug in the assembling of call instructions, which causes the target to be one byte lower than the correct address.
Current implementation computes src address after emiting the opcode byte 0xE8:
emit [0xE8]
src <- gets _memoff
imm (dst - (src + 5))

I believe that src <- gets _memoff should happen prior to emit [0xE8]

@sdiehl sdiehl self-assigned this Dec 4, 2016
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