Skip to content

label assignment with freespaced labels is broken #386

Description

@trillllian
!rb as2 -s
segment bank=$80
stuff:
test = stuff

errors with Elabel_ambiguous, because stuff is properly recognized as being within the freespace, but test isn't. so when the freespace placement after pass1 moves stuff, test isn't moved with it and thus moves between pass1 and 2 causing the error.

there's a few hacky fixes for this (detect if the assignment is of the form x = y or x = y+z where z is a constant expression, and in that case set x to be in the same freespace as y) which should cover most practical cases, but idk how to give nice errors in the other cases. (and there's some cases that should stay legal, like subtracting two labels to get the distance between them)

i'm now thinking if these kinds of expressions should mark the label as "unknown bank, cannot participate in label optimization". in that case the value changing in pass2 would be fine. ....would it really actually? idk, i'm tired.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions