-
Notifications
You must be signed in to change notification settings - Fork 34
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
a86: Check immediate ranges #115
Comments
This is going to be a pain to check. For example, |
Regardless of whether we move to the OO technique in #113, I've been planning to revise how instruction AST nodes are defined to make things like this easier to specify, so I'm not sure whether we ought to do it right now in the main branch or not. |
I think this is orthogonal to that, since these are just checks on the target language AST |
I've added checks in a branch which we can merge later. (Probably after the exam is fine.) I haven't done the "if moving into memory you only get 32-bits" part yet. |
Just remembered you can't move immediates into memory, so I think this is done now. |
Instructions that take immediate values should check that values are in range. Some instructions, e.g.
Cmp
can only take 32-bit immediate, and will silently do something unexpected if you use a 64-bit immediate.The text was updated successfully, but these errors were encountered: