Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

py/asmthumb: Implement long jumps on Thumb/armv6m architecture.#17293

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dpgeorge wants to merge1 commit intomicropython:master
base:master
Choose a base branch
Loading
fromdpgeorge:py-asmthumb-implement-armv6m-long-jump

Conversation

dpgeorge
Copy link
Member

Summary

Implement long jumps (greater than +/- 2k code distance) for armv6m targets, eg RPI_PICO.

With this change, all tests (except thread tests) now pass on RPI_PICO when using the native emitter:

(plug in RPI_PICO)$ cd tests$ ./run-tests.py -t a0 --via-mpy --emit native

Testing

Tested on an RPI_PICO as above. Prior to this PR 8 tests would fail due to large jumps not being implemented. Now they pass.

Trade-offs and Alternatives

All forwards jumps now take 8 or 10 bytes, whereas previously they took only 2 bytes. That's just because it's not possible to know in advance how long the jump is, and the emitter must commit to the size of the instruction in early passes (one day that could be improved by adding more assembler passes).

The jump can now clobber registerr1, which it uses as a temporary to calculate the long jump. Clobbering this register is OK, it's anyway used as a temporary in the native emitter and is never needed across jumps (butr0 is because it's used to return a value from the function, so that can't be used here as a temporary).

With this change, all tests (except thread tests) now pass on RPI_PICO whenusing the native emitter:    (plug in RPI_PICO)    $ cd tests    $ ./run-tests.py -t a0 --via-mpy --emit nativeSigned-off-by: Damien George <damien@micropython.org>
@dpgeorgedpgeorge added the py-coreRelates to py/ directory in source labelMay 13, 2025
@dpgeorge
Copy link
MemberAuthor

@agatti FYI

@github-actionsGitHub Actions
Copy link

Code size report:

   bare-arm:    +0 +0.000% minimal x86:    +0 +0.000%    unix x64:    +0 +0.000% standard      stm32:    +4 +0.001% PYBV10     mimxrt:   -16 -0.004% TEENSY40        rp2:  +112 +0.012% RPI_PICO_W       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS  qemu rv32:    +0 +0.000% VIRT_RV32

@dpgeorgedpgeorge added this to therelease-1.26.0 milestoneMay 13, 2025
@codecovCodecov
Copy link

codecovbot commentedMay 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.54%. Comparing base(f77fd62) to head(3e320ac).

Additional details and impacted files
@@           Coverage Diff           @@##           master   #17293   +/-   ##=======================================  Coverage   98.54%   98.54%           =======================================  Files         169      169             Lines       21897    21897           =======================================  Hits        21579    21579             Misses        318      318

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
py-coreRelates to py/ directory in source
Projects
None yet
Milestone
release-1.26.0
Development

Successfully merging this pull request may close these issues.

1 participant
@dpgeorge

[8]ページ先頭

©2009-2025 Movatter.jp