Closed Francessco121 closed 6 years ago
You're right, it doesn't check the sign for labels.
This is quite an easy fix, one would only have to check the sign (first character of the string) and apply it to data
Is this issue still up for grabs?
@bobbyjudd Yes. Let me know if you need assistance with the issue / project setup (Ideally in the slack channel, see README.md for the link)
Thank you!
When using a memory displacement, the operator is not taken into account when the displacement value is a label.
For example:
The encoded value to be added to the registers will be the same for both
mov
instructions, instead of the second one being negated.Disassembling the previous example results in the following (note, the actual address isn't really relevant):
The issue seems to be that this code block only gets the address of the label and doesn't check the operator. With an integer literal, handling of the operator is offloaded to
Integer.decode
.