Skip to content

Zend fiber support for sparc64 (OpenBSD) #13382

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

Closed
wants to merge 2 commits into from

Conversation

cjeker
Copy link
Contributor

@cjeker cjeker commented Feb 13, 2024

Add the necessary asm functions for sparc64 to support Zend fibers.

This implements jump_fcontext() and make_fcontext() for sparc64_sysv_elf and allows to run modern php on OpenBSD/sparc64.

All fiber related test pass on my OpenBSD sparc64 machine.

@cjeker cjeker requested a review from iluuu1994 as a code owner February 13, 2024 09:54
@iluuu1994 iluuu1994 requested review from trowski and removed request for iluuu1994 February 13, 2024 09:57
@devnexen
Copy link
Member

You know already the existence of boostorg/context, ideally the jump_fcontext/make_fcontext parts would need to be upstreamed.

@cjeker
Copy link
Contributor Author

cjeker commented Feb 13, 2024

You know already the existence of boostorg/context, ideally the jump_fcontext/make_fcontext parts would need to be upstreamed.

Already done, see boostorg/context#251

This was tested on OpenBSD sparc64 and all fiber related tests pass.
On OpenBSD stackghost prevents the modification of the return address
and therefor an extra trampoline is needed in make_fcontext(). This
should not matter on other OS implementing sysv ABI and the trampoline
should work there as well.
Copy link
Member

@trowski trowski left a comment

Choose a reason for hiding this comment

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

This LGTM, but I'd like to see it receive feedback and be merged upstream before merging it here.

@cjeker
Copy link
Contributor Author

cjeker commented Mar 12, 2024

Upstream merged the code.

@devnexen devnexen closed this in 4bf4c24 Mar 12, 2024
@devnexen
Copy link
Member

Thanks !

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

Successfully merging this pull request may close these issues.

3 participants