Skip to content

Comments

fix: ARMv7 addresses#24

Merged
RubixDev merged 1 commit intoRubixDev:mainfrom
cfung89:fix_address
Nov 6, 2025
Merged

fix: ARMv7 addresses#24
RubixDev merged 1 commit intoRubixDev:mainfrom
cfung89:fix_address

Conversation

@cfung89
Copy link
Contributor

@cfung89 cfung89 commented Nov 1, 2025

Hello, here is a small fix to make ARMv7 addresses compatible.

For LDR A1, =addr:

Before:

(program ; [0, 0] - [1, 0]
  (instruction ; [0, 0] - [0, 13]
    kind: (word) ; [0, 0] - [0, 3]
    (ident ; [0, 4] - [0, 6]
      (reg ; [0, 4] - [0, 6]
        (word))) ; [0, 4] - [0, 6]
    (ERROR ; [0, 8] - [0, 9]
      (ERROR)) ; [0, 8] - [0, 9]
    (ident ; [0, 9] - [0, 13]
      (reg ; [0, 9] - [0, 13]
        (word))))) ; [0, 9] - [0, 13]

After:

(program ; [0, 0] - [1, 0]
  (instruction ; [0, 0] - [0, 13]
    kind: (word) ; [0, 0] - [0, 3]
    (ident ; [0, 4] - [0, 6]
      (reg ; [0, 4] - [0, 6]
        (word))) ; [0, 4] - [0, 6]
    (ident ; [0, 8] - [0, 13]
      (reg ; [0, 8] - [0, 13]
        (address))))) ; [0, 8] - [0, 13]

Thank you very much for this great project! I apologize for opening so many PRs in a short amount of time, but I already had a few changes done, and thought it would be best to have different changes in different PRs. Please let me know if there are any changes/improvements you would like me to make.

@RubixDev
Copy link
Owner

RubixDev commented Nov 1, 2025

Hi! I'm just gonna write this here once, instead of on every PR:

Thank you very much for submittimg your changes here instead of just quietly using them yourself. I will try to review them as soon as I can. In the meantime, just kindly make sure your changes don't break any inputs of asm dialects that were supported before. I'm not actually sure the tests are enough for that, so some manual testing won't hurt.

@cfung89
Copy link
Contributor Author

cfung89 commented Nov 2, 2025

Hi, thank you very much! I did a couple manual checks with a few examples longer examples found online, in x86 and ARM64, and everything seems to be the same (and even less errors in ARM64).

@RubixDev
Copy link
Owner

RubixDev commented Nov 6, 2025

Thanks again for all your contributions!

@RubixDev RubixDev merged commit ac345bc into RubixDev:main Nov 6, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants