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

Push/pop.b lifted incorrectly #1

Open
jrozner opened this issue Dec 27, 2021 · 0 comments
Open

Push/pop.b lifted incorrectly #1

jrozner opened this issue Dec 27, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jrozner
Copy link
Owner

jrozner commented Dec 27, 2021

Push/Pop operations always decrement/increment the stack pointer by 2, presumably to keep the stack aligned, whether using word or byte operand width. It doesn't look like there is a way to using BNIL to correctly represent the behavior explained below while using push/pop instructions.

push

push.b should push the low byte of the operand onto the stack while leaving the high byte unchanged and decrement the stack pointer by 2.

pop

pop.b should move the stack pointer down by 2 and pop the top value, with the high byte zeroed out, into the register specified.

@jrozner jrozner added the bug Something isn't working label Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant