Repository navigation
avr: preserve symbols after byte selectors - #209
Open
Firat17aze wants to merge 1 commit into
Open
Firat17aze wants to merge 1 commit into
Firat17aze wants to merge 1 commit into
Conversation
The whole-template assembler treated lo8 and the other AVR byte-selection operators as undefined symbols. In a multi-statement inline asm block, that occupied the external-symbol slot before a following call or jump and left its real target unrelocatable. Classify the AVR expression operators as assembler words, alongside the numeric I/O register names. The regression uses the two 18-character EmbLinkRTOS entry points, failed before this change, and now verifies that both full names reach the relocation table. Validation: PATH=/opt/homebrew/opt/llvm/bin:$PATH sh tests/golden/avr-inline-asm.sh (passed, including QEMU at -O0/-O1/-O2/-Os). Host build passed with -std=c99 -Wall -Wextra -Werror. make check could not run the corpus because the configured x86-64 newlib and reference libstdc++ trees are absent.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #205.
AVR whole-template assembly treated
lo8,hi8, and the related byte-selection operators as undefined symbols. In a multi-statement inline-assembly block, that occupied the external-symbol slot before a followingcallorjmp, so the real target could not be relocated. The 16-character text in the diagnostic was its display limit rather than a shortened symbol in the object.This classifies the AVR expression operators as assembler words, alongside the numeric I/O register names. The regression uses EmbLinkRTOS's
emb_arch_switch_toandembk_thread_launchentry points and verifies that both complete names reach the relocation table.Validation:
make -j8 embcc embld— passed with the default-std=c99 -Wall -Wextra -WerrorbuildPATH=/opt/homebrew/opt/llvm/bin:$PATH sh tests/golden/avr-inline-asm.sh— passed, including LLVM byte comparisons and QEMU ATmega328P execution at-O0,-O1,-O2, and-Osgit diff --checkandsh -n tests/golden/avr-inline-asm.sh— passedmake checkcould not run the execution corpus because the configured x86-64 newlib and reference libstdc++ trees are absent; it skipped the corpus and exited withno tests foundNo physical AVR board was available. The attempted current EmbLinkRTOS integration configure was also blocked locally because the Python >=3.10 installation lacks PyYAML, while the Python installation with PyYAML is 3.9; the exact RTOS entry points are covered by the relocation regression above.
LLMs were used for review and code generation in some parts of this pull request.