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

Add bounds checking for constant expression contexts #5

Open
kevinhartman opened this issue May 26, 2020 · 0 comments
Open

Add bounds checking for constant expression contexts #5

kevinhartman opened this issue May 26, 2020 · 0 comments
Labels
assembler bug Something isn't working

Comments

@kevinhartman
Copy link
Owner

When a reference to an expression appears in the assembly, it can be resolved in the second pass if the expression does not contain external references. The context in which the reference appears will usually have a size requirement.

For example, in the case of a dc.w <expr> directive, the value of the expression must fit in a word. We should add limits checking to these expression operands so that if they're resolved in the second pass, the appropriate error is thrown if the result does not fit.

@kevinhartman kevinhartman added bug Something isn't working assembler labels May 26, 2020
@kevinhartman kevinhartman changed the title Add bounds checking for constant expressions contexts Add bounds checking for constant expression contexts May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assembler bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant