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

Behavior change for .equ #77

Open
mikeakohn opened this issue May 19, 2019 · 0 comments
Open

Behavior change for .equ #77

mikeakohn opened this issue May 19, 2019 · 0 comments

Comments

@mikeakohn
Copy link
Owner

Currently anything defined with equ is put into the define / macro table as is. Example:

SOMETHING equ 0x500+5

This will put "0x500+5" into the macros table under the name something. Instead I'm thinking naken_asm should evaluate 0x500+5 to 0x505 and put that in the symbol table (the same table that holds labels).

Positives:

  1. All equ's will end up listed as symbols in .elf file output.
  2. During disassembly, instructions that have addresses as operands can use the symbol table to print the address name with the address (maybe needing a command line option to turn feature that on).

Negatives:

  1. Might break existing code if equ is used as a macro.
  2. Have to change include files in the include/ directory since some things that aren't addresses were defined with equ.
  3. The include files that came from Atmel also define non-address things with equ.

Also, it might make sense to put equ things in an equ table so that the regular symbol table that is mostly generated from labels get precedence over the equ table during disassembly.

I'm a little afraid of breaking code or having this not be quite right so I'm filing an issue hoping to get a discussion (hopefully there are some people following this project) on this before I get started on it or cancel the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant