-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 local label support within preproc. #1302
base: master
Are you sure you want to change the base?
Conversation
cases tested: - defining a label before it's referenced, then defining the label / - defining a label before it's referenced, and not defining it / - defining multiple of the same label before it's referenced, and not defining it / - defining multiple different labels before they're referenced, and not defining them / - defining multiple different labels multiple times before they're referenced, and not defining them / - defining local label as global / - defining local label before a non-local label is defined / - defining just the local label prefix / - referencing a local label at the end of a file / - validating local labels at the end of the file /
When you say it will not work in macros do you mean a label in a macro definition or a label given as an argument to a macro? If the latter I'm struggling to see a use case for this given that the repo's scripts are almost all macro |
I mean label in a macro definition. So:
would not work when the macro is actually used. |
So you're saying with this it's possible to add labels in macro definitions within the macros themselves? Would this PR still be relevant in today's pokeemerald? |
Either way though it still needs a rebase to fix merge conflicts |
The above merge conflict was trivial and unrelated; seems like this doesn't build on current pokeemerald. Do you still have any interest in this? |
What purpose is this for that isn't already possible with GAS's built-in local labels |
gas local labels suck because they can't be named |
Description
The prefix chosen was
$
since it's a valid gnu assembler name character and isn't used by other directives..
would have been preferable but it would require extra coding.Semantics:
.word $localLabel
->.word NonlocalLabel2$localLabel
) will only happen if the$
is directly after a non-word character (anything that isn't alphanumeric,_
,.
, or$
).Discord contact info
luckytyphlosion#1166