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

UM/MOD: Slightly improvements for entry and exit, more efficient loop structure. #406

Merged
merged 1 commit into from
Feb 21, 2021

Conversation

JeeeK
Copy link
Contributor

@JeeeK JeeeK commented Feb 20, 2021

First, the entry prevents the use of the stack pointer saved on the return-stack, in favour of pure register usage.
An early stack clean up saves duplicated code.
At last, the loop code is rearranged in that the 17th pass has been drawn into the entry section without the need for any undo measurements on exit. This simplifies the jumping cascade in the loop (and saves run-time too).

I'm sorry, but the modifications has not been tested yet. In the lack of an active development environment, I was not able to proof the correctness of these changes in run-time. The changes were made in accordance to the STM8 CPU programming manual.

@TG9541 TG9541 self-requested a review February 21, 2021 06:26
Copy link
Owner

@TG9541 TG9541 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JeeeK that's a nifty change, and since it's based on the PM alone it's all the more a feat! The automated test passes but I'll use @MrMarkB 's test scripts before merging. Thanks!

@TG9541 TG9541 merged commit 0c3dcaf into TG9541:master Feb 21, 2021
Picatout pushed a commit to Picatout/stm8_eForth that referenced this pull request Feb 22, 2021
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