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

Properly handle resolution of [-1], [-2], etc in thecl10.c's expressions. #25

Open
Lymia opened this issue Aug 18, 2017 · 0 comments
Open

Comments

@Lymia
Copy link

Lymia commented Aug 18, 2017

There's a couple cases we can't handle, and we don't handle any of them particularly well:

  • Some opcodes directly pop values off the stack when they read [-1] through [-100], regardless of the exact value. To my knowledge (someone please verify), this is the only kind of opcode from TH10-13. Others read an offset from the current stack pointer for [-1] through [-100], then subtract th10_instr_t->zero from the stack pointer.
  • For the second kind of opcode, instruction([-1], [-1]) will need to be handled somehow. While the transformation from, say, 1 + 2; ins_XXX([-1], [-1]) to ins_XXX(1 + 2, 1 + 2) will not change the semantics of ECL code, it will make the output and input no longer bit-for-but identical.

Currently, the handling covers this corner case poorly, and neither kind of opcode perfectly.

@Lymia Lymia changed the title Resolution of [-1], [-2], etc in thecl10.c's expression resolution is screwed up. Properly handle resolution of [-1], [-2], etc in thecl10.c's expressions. Aug 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant